spirv: Generate spirv_info.c
The old table based spirv_*_to_string functions would return NULL for any values "inside" the table that didn't have entries. The tables also needed to be updated by hand each time a new spirv.h was imported. Generate the file instead. v2: Make this script work more like src/mesa/main/format_fallback.py. Suggested by Jason. Remove SCons supports. Suggested by Jason and Emil. Put all the build work in Makefile.nir.am in lieu of adding a new Makefile.spirv.am. Suggested by Emil. Add support for Android builds based on code provided by Emil. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Suggested-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
committed by
Jason Ekstrand
parent
de765ec9dc
commit
2dd4e2ece3
@@ -94,3 +94,10 @@ nir_opt_algebraic_deps := \
|
||||
$(intermediates)/nir/nir_opt_algebraic.c: $(nir_opt_algebraic_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(nir_opt_algebraic_gen) $< > $@
|
||||
|
||||
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
|
||||
$(SPIRV_GENERATED_FILES))
|
||||
|
||||
$(intermediates)/spirv/spirv_info.c: $(LOCAL_PATH)/spirv/spirv_info_c.py $(LOCAL_PATH)/spirv/spirv.core.grammar.json
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(LOCAL_PATH)/spirv/spirv_info_c.py $(LOCAL_PATH)/spirv/spirv.core.grammar.json $@ || ($(RM) $@; false)
|
||||
|
||||
Reference in New Issue
Block a user