Fixed some sem check init.
This commit is contained in:
@@ -684,6 +684,12 @@ add_child :: (checker : *Semantic_Checker, handle : Type_Variable_Handle, child
|
||||
}
|
||||
|
||||
init_semantic_checker :: (checker : *Semantic_Checker, root : *AST_Node, path : string) {
|
||||
checker.current_buffer_index = 0;
|
||||
checker.current_sampler_index = 0;
|
||||
checker.current_texture_index = 0;
|
||||
|
||||
array_reserve(*checker.result.messages, 16);
|
||||
|
||||
checker.program_root = root;
|
||||
checker.path = path;
|
||||
|
||||
@@ -1663,6 +1669,9 @@ check :: (result : *Compile_Result) {
|
||||
checker.current_sampler_index = 0;
|
||||
checker.current_texture_index = 0;
|
||||
array_reserve(*checker.result.messages, 16);
|
||||
|
||||
init_semantic_checker(*checker, file.ast_root, file.file.path);
|
||||
|
||||
add_hlsl_builtins(*checker);
|
||||
|
||||
type_check(*checker, file.ast_root);
|
||||
|
||||
Reference in New Issue
Block a user