From 48cf268defad66f58f1aa03b4835e5583be96b2f Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Mon, 22 Feb 2016 09:11:32 -0500 Subject: Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time. R=robertphillips@google.com TBR=bsalomon@google.com BUG=skia:4955 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002 Review URL: https://codereview.chromium.org/1718693002 --- tools/generate_vk_interface.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tools/generate_vk_interface.sh (limited to 'tools/generate_vk_interface.sh') diff --git a/tools/generate_vk_interface.sh b/tools/generate_vk_interface.sh new file mode 100644 index 0000000000..84eaee3b8e --- /dev/null +++ b/tools/generate_vk_interface.sh @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +headerLoc=../third_party/vulkan/vulkan.h +outFile=tempVkInterface + +if [ ! -e "$outFile" ] ; then + echo 'I AM HERE' + touch "$outFile" +fi + +chmod 700 $outFile + +echo '// *******************************************' > $outFile +echo '// Place these lines into GrVkInterface.cpp::validate' >> $outFile +echo '// *******************************************' >> $outFile +sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/NULL == fFunctions.f\2 ||/p' $headerLoc >> $outFile +sed -i '1,/NULL/ s/^NULL/if (NULL/' $outFile +sed -i '5,$ s/^/ /' $outFile +sed -i '$ s/ ||/) {/' $outFile + +echo '' >> $outFile +echo '// *******************************************' >> $outFile +echo '// Place these lines into GrVkInterface.h' >> $outFile +echo '// *******************************************' >> $outFile +sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/VkPtr f\2;/p' $headerLoc >> $outFile + +echo '' >> $outFile +echo '// *******************************************' >> $outFile +echo '// Place these lines into GrVkInterface.cpp::GrVKCreateInterface' >> $outFile +echo '// *******************************************' >> $outFile +sed -n 's/^VKAPI_ATTR \(VkResult\|void\) VKAPI_CALL vk\([a-zA-Z]*\).*/GET_PROC(\2);/p' $headerLoc >> $outFile + -- cgit v1.2.3