1# Copyright 2015 Google Inc. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5headerLoc=../third_party/vulkan/vulkan.h 6outFile=tempVkInterface 7 8if [ ! -e "$outFile" ] ; then 9 echo 'I AM HERE' 10 touch "$outFile" 11fi 12 13chmod 700 $outFile 14 15echo '// *******************************************' > $outFile 16echo '// Place these lines into GrVkInterface.cpp::validate' >> $outFile 17echo '// *******************************************' >> $outFile 18sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/NULL == fFunctions.f\2 ||/p' $headerLoc >> $outFile 19sed -i '1,/NULL/ s/^NULL/if (NULL/' $outFile 20sed -i '5,$ s/^/ /' $outFile 21sed -i '$ s/ ||/) {/' $outFile 22 23echo '' >> $outFile 24echo '// *******************************************' >> $outFile 25echo '// Place these lines into GrVkInterface.h' >> $outFile 26echo '// *******************************************' >> $outFile 27sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/VkPtr<PFN_vk\2> f\2;/p' $headerLoc >> $outFile 28 29echo '' >> $outFile 30echo '// *******************************************' >> $outFile 31echo '// Place these lines into GrVkInterface.cpp::GrVKCreateInterface' >> $outFile 32echo '// *******************************************' >> $outFile 33sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/GET_PROC(\2);/p' $headerLoc >> $outFile 34 35