diff options
author | Pierre Moreau <dev@pmoreau.org> | 2016-02-28 21:58:07 +0100 |
---|---|---|
committer | Pierre Moreau <dev@pmoreau.org> | 2016-03-13 18:51:17 +0100 |
commit | 3ddf533b86c65dbcddc5baacffc1bd215001fdbb (patch) | |
tree | 13d98f64dffd705a43b2b514b6016b593b584a5e /tools | |
parent | 6f2d15e0a99e7b503edd27f0f3f036007fb5748f (diff) |
gen_spirv: Check for non-small letter after prefix
Previously, searching for `ExecutionMode` would match against `ExecutionModel`
as well, which is not the desired behaviour.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/spirv-tool/gen_spirv.bash | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/spirv-tool/gen_spirv.bash b/tools/spirv-tool/gen_spirv.bash index fb7dce9..e198640 100644 --- a/tools/spirv-tool/gen_spirv.bash +++ b/tools/spirv-tool/gen_spirv.bash @@ -15,7 +15,7 @@ prefix=$1 echo "template<> inline void SPIRVMap<$prefix, std::string>::init() {" -cat $spirvHeader | sed -n -e "/^ *${prefix}/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\([0x]*[0-9][0-9]*\).*:\1 \2:p" | while read a b; do +cat $spirvHeader | sed -n -e "/^ *${prefix}[^a-z]/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\([0x]*[0-9][0-9]*\).*:\1 \2:p" | while read a b; do #printf "_SPIRV_OP(%s, %s)\n" $a $b printf " add(${prefix}%s, \"%s\");\n" $a $a #i=$((i+1)) @@ -38,7 +38,7 @@ echo "bool isValid(spv::$prefix V) { switch(V) {" -cat $spirvHeader | sed -n -e "/^ *${prefix}/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\(.*\).*:\1 \2:p" | while read a b; do + cat $spirvHeader | sed -n -e "/^ *${prefix}[^a-z]/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\(.*\).*:\1 \2:p" | while read a b; do if [[ $a == CapabilityNone ]]; then continue fi @@ -71,7 +71,7 @@ else " fi -cat $spirvHeader | sed -n -e "/^ *${prefix}/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\([0xX]*[0-9a-fA-F][0-9a-fA-F]*\).*:\1 \2:p" | while read a b; do +cat $spirvHeader | sed -n -e "/^ *${prefix}[^a-z]/s:^ *${prefix}\([^= ][^= ]*\)[= ][= ]*\([0xX]*[0-9a-fA-F][0-9a-fA-F]*\).*:\1 \2:p" | while read a b; do if [[ $a == CapabilityNone ]]; then continue fi |