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

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Fischer <greg@lunarg.com>2021-07-12 12:51:08 +0300
committerGitHub <noreply@github.com>2021-07-12 12:51:08 +0300
commit3b6abf41cc726513bd0401ebe35fb8e7a3819ce7 (patch)
tree36409933cae2c109243e82b210076156cb687411 /Android.mk
parentc26baf4c93085248ae6619b254d0d4baf9d1f4a5 (diff)
Add non-semantic vulkan extended instruction set (#4362)
This is based on a legacy commit which installs a local grammar. A followup commit will change to the grammar in SPIRV-Headers. Co-authored-by: baldurk <baldurk@baldurk.org>
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 1bc844d40..bdcdda9a2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -181,6 +181,7 @@ SPV_GLSL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.glsl.st
SPV_OPENCL_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.opencl.std.100.grammar.json
SPV_DEBUGINFO_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.debuginfo.grammar.json
SPV_CLDEBUGINFO100_GRAMMAR=$(SPVHEADERS_LOCAL_PATH)/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
+SPV_VKDEBUGINFO100_GRAMMAR=$(LOCAL_PATH)/source/extinst.nonsemantic.vulkan.debuginfo.100.grammar.json
define gen_spvtools_grammar_tables
$(call generate-file-dir,$(1)/core.insts-unified1.inc)
@@ -212,6 +213,7 @@ $(LOCAL_PATH)/source/ext_inst.cpp: \
$(1)/opencl.std.insts.inc \
$(1)/debuginfo.insts.inc \
$(1)/opencl.debuginfo.100.insts.inc \
+ $(1)/nonsemantic.vulkan.debuginfo.100.insts.inc \
$(1)/spv-amd-gcn-shader.insts.inc \
$(1)/spv-amd-shader-ballot.insts.inc \
$(1)/spv-amd-shader-explicit-vertex-parameter.insts.inc \
@@ -241,6 +243,7 @@ endef
# We generate language-specific headers for DebugInfo and OpenCL.DebugInfo.100
$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),DebugInfo,$(SPV_DEBUGINFO_GRAMMAR)))
$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),OpenCLDebugInfo100,$(SPV_CLDEBUGINFO100_GRAMMAR)))
+$(eval $(call gen_spvtools_lang_headers,$(SPVTOOLS_OUT_PATH),NonSemanticVulkanDebugInfo100,$(SPV_VKDEBUGINFO100_GRAMMAR)))
define gen_spvtools_vendor_tables
@@ -255,9 +258,22 @@ $(1)/$(2).insts.inc : \
@echo "[$(TARGET_ARCH_ABI)] Vendor extended instruction set: $(2) tables <= grammar"
$(LOCAL_PATH)/source/ext_inst.cpp: $(1)/$(2).insts.inc
endef
+define gen_spvtools_vendor_tables_local
+$(call generate-file-dir,$(1)/$(2).insts.inc)
+$(1)/$(2).insts.inc : \
+ $(LOCAL_PATH)/utils/generate_grammar_tables.py \
+ $(LOCAL_PATH)/source/extinst.$(2).grammar.json
+ @$(HOST_PYTHON) $(LOCAL_PATH)/utils/generate_grammar_tables.py \
+ --extinst-vendor-grammar=$(LOCAL_PATH)/source/extinst.$(2).grammar.json \
+ --vendor-insts-output=$(1)/$(2).insts.inc \
+ --vendor-operand-kind-prefix=$(3)
+ @echo "[$(TARGET_ARCH_ABI)] Vendor extended instruction set: $(2) tables <= grammar"
+$(LOCAL_PATH)/source/ext_inst.cpp: $(1)/$(2).insts.inc
+endef
# Vendor and debug extended instruction sets, with grammars from SPIRV-Tools source tree.
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),debuginfo,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),opencl.debuginfo.100,"CLDEBUG100_"))
+$(eval $(call gen_spvtools_vendor_tables_local,$(SPVTOOLS_OUT_PATH),nonsemantic.vulkan.debuginfo.100,"VKDEBUG100_"))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-gcn-shader,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-shader-ballot,""))
$(eval $(call gen_spvtools_vendor_tables,$(SPVTOOLS_OUT_PATH),spv-amd-shader-explicit-vertex-parameter,""))