Skip to content

Commit

Permalink
Extract SPV version numner from the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Feb 1, 2023
1 parent afbc357 commit b7e5742
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ bench:
validate-spv: $(SNAPSHOTS_BASE_OUT)/spv/*.spvasm
@set -e && for file in $^ ; do \
echo "Validating" $${file#"$(SNAPSHOTS_BASE_OUT)/"}; \
cat $${file} | spirv-as --target-env vulkan1.0 -o - | spirv-val; \
version_line=$$(head -2 $${file} | tail -1); \
echo "version $${version_line}";\
echo "version cut2 spv$${version_line:11:3}";\
cat $${file} | spirv-as --target-env spv$${version_line:11:3} -o - | spirv-val; \
done

validate-msl: $(SNAPSHOTS_BASE_OUT)/msl/*.msl
Expand Down

0 comments on commit b7e5742

Please sign in to comment.