From bc59efe23c44ef6301626699b869dc9daabeb511 Mon Sep 17 00:00:00 2001 From: Markus Tavenrath Date: Tue, 26 Jul 2016 16:28:30 +0200 Subject: [PATCH] Remove nvidia references --- README.md | 19 ++++--------------- VulkanHppGenerator.cpp | 40 ++++++++++------------------------------ vulkan/vulkan.hpp | 27 --------------------------- 3 files changed, 14 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index e638540..e0d5b1b 100644 --- a/README.md +++ b/README.md @@ -182,11 +182,11 @@ Depending on exceptions being enabled or disabled, the return type of some funct With exceptions enabled (the default) there are four different cases on the return types: * Just one possible success code -* * no output value -> return type is ```void``` -* * one output value -> return type is T, which is the type of the output value + * no output value -> return type is ```void``` + * one output value -> return type is T, which is the type of the output value * Multiple possible success codes -* * no output value -> return type is ```vk::Result``` -* * one output value -> return type is a structure ```vk::ResultValue``` with a member ```result``` of type ```vk::Result``` holding the actual result code, and a member ```value``` of type T, which is the type of the output value, holding that output value. + * no output value -> return type is ```vk::Result``` + * one output value -> return type is a structure ```vk::ResultValue``` with a member ```result``` of type ```vk::Result``` holding the actual result code, and a member ```value``` of type T, which is the type of the output value, holding that output value. With exceptions disabled, the return type of those wrapper functions where the wrapped function has just one possible success code is different: * no output value -> return type is ```vk::Result``` @@ -213,14 +213,3 @@ To build the header for a given vk.xml specification continue with the following # Samples Brad Davis started to port Sascha Willems Samples to vulkan.hpp. You can find his work in his [repository](https://github.com/jherico/Vulkan). - -# Providing Pull Requests - -NVIDIA is happy to review and consider pull requests for merging into the main tree of vulkan.hpp for bug fixes and features. Before providing a pull request to NVIDIA, please note the following: - -* A pull request provided to this repo by a developer constitutes permission from the developer for NVIDIA to merge the provided - changes or any NVIDIA modified version of these changes to the repo. NVIDIA may remove or change the code at any time and in any - way deemed appropriate. Due to the required paperwork please refrain from providing pull requests for simple changes and file an issue - describing a bug or the desired change instead. -* Not all pull requests can be or will be accepted. NVIDIA will close pull requests that it does not intend to merge. -* The modified files and any new files must include the unmodified NVIDIA copyright header seen at the top of all shipping files. diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 48b4491..435afc7 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -27,34 +27,6 @@ #include -const std::string nvidiaLicenseHeader( -"// Copyright(c) 2015-2016, NVIDIA CORPORATION. All rights reserved.\n" -"//\n" -"// Redistribution and use in source and binary forms, with or without\n" -"// modification, are permitted provided that the following conditions\n" -"// are met:\n" -"// * Redistributions of source code must retain the above copyright\n" -"// notice, this list of conditions and the following disclaimer.\n" -"// * Redistributions in binary form must reproduce the above copyright\n" -"// notice, this list of conditions and the following disclaimer in the\n" -"// documentation and/or other materials provided with the distribution.\n" -"// * Neither the name of NVIDIA CORPORATION nor the names of its\n" -"// contributors may be used to endorse or promote products derived\n" -"// from this software without specific prior written permission.\n" -"//\n" -"// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n" -"// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" -"// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n" -"// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n" -"// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n" -"// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n" -"// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n" -"// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n" -"// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" -"// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" -"// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" -); - const std::string exceptionHeader( "#if defined(_MSC_VER) && (_MSC_VER == 1800)\n" "# define noexcept _NOEXCEPT\n" @@ -429,6 +401,14 @@ std::string const createResultValueHeader = ( "\n" ); +// trim from start +std::string trim(std::string const& input) +{ + std::string result = input; + result.erase(result.begin(), std::find_if(result.begin(), result.end(), std::not1(std::ptr_fun(std::isspace)))); + return result; +} + // trim from end std::string trimEnd(std::string const& input) { @@ -3043,6 +3023,7 @@ int main( int argc, char **argv ) else if (value == "comment") { readComment(child, vkData.vulkanLicenseHeader); + vkData.vulkanLicenseHeader = trim(vkData.vulkanLicenseHeader); } else if (value == "enums") { @@ -3072,8 +3053,7 @@ int main( int argc, char **argv ) createDefaults(vkData, defaultValues); std::ofstream ofs(VULKAN_HPP); - ofs << nvidiaLicenseHeader << std::endl - << vkData.vulkanLicenseHeader << std::endl + ofs << vkData.vulkanLicenseHeader << std::endl << std::endl << std::endl << "#ifndef VULKAN_HPP" << std::endl diff --git a/vulkan/vulkan.hpp b/vulkan/vulkan.hpp index 89815ed..f4b85a0 100644 --- a/vulkan/vulkan.hpp +++ b/vulkan/vulkan.hpp @@ -1,30 +1,3 @@ -// Copyright(c) 2015-2016, NVIDIA CORPORATION. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of NVIDIA CORPORATION nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - // Copyright (c) 2015-2016 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a