[PATCH] winevulkan: Add copyright headers to files generated from vk.xml.
Józef Kucia
jkucia at codeweavers.com
Wed Jun 6 05:15:33 CDT 2018
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
This patch could be applied after 147041.
---
dlls/vulkan-1/vulkan-1.spec | 34 ++++++++++++++++++++++++++++++++++
dlls/winevulkan/make_vulkan | 26 +++++++++++++++++++-------
dlls/winevulkan/vulkan_thunks.c | 37 ++++++++++++++++++++++++++++++++++++-
dlls/winevulkan/vulkan_thunks.h | 37 ++++++++++++++++++++++++++++++++++++-
dlls/winevulkan/winevulkan.spec | 34 ++++++++++++++++++++++++++++++++++
include/wine/vulkan.h | 37 ++++++++++++++++++++++++++++++++++++-
include/wine/vulkan_driver.h | 37 ++++++++++++++++++++++++++++++++++++-
7 files changed, 231 insertions(+), 11 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 3d457749b46a..0a4e85e96859 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -1,4 +1,38 @@
# Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+#
+# This file is generated from Vulkan vk.xml file covered
+# by the following copyright and permission notice:
+#
+# Copyright (c) 2015-2018 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ---- Exceptions to the Apache 2.0 License: ----
+#
+# As an exception, if you use this Software to generate code and portions of
+# this Software are embedded into the generated code as a result, you may
+# redistribute such product without providing attribution as would otherwise
+# be required by Sections 4(a), 4(b) and 4(d) of the License.
+#
+# In addition, if you combine or link code generated by this Software with
+# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+# ("`Combined Software`") and if a court of competent jurisdiction determines
+# that the patent provision (Section 3), the indemnity provision (Section 9)
+# or other Section of the License conflicts with the conditions of the
+# applicable GPL or LGPL license, you may retroactively and prospectively
+# choose to deem waived or otherwise exclude such Section(s) of the License,
+# but only in their entirety and only with respect to the Combined Software.
+#
@ stdcall vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr) winevulkan.wine_vkAcquireNextImageKHR
@ stdcall vkAllocateCommandBuffers(ptr ptr ptr) winevulkan.wine_vkAllocateCommandBuffers
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 69ea807389e7..ea64c052fa5f 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -1893,9 +1893,19 @@ class VkGenerator(object):
if not any(s.name == conv.struct.name for s in self.host_structs):
self.host_structs.append(conv.struct)
- def generate_thunks_c(self, f, prefix):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ def _generate_copyright(self, f, spec_file=False):
+ c = "# " if spec_file else " * "
+ f.write("# " if spec_file else "/* ")
+ f.write("Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n")
+ lines = ["", "This file is generated from Vulkan vk.xml file covered",
+ "by the following copyright and permission notice:"]
+ lines.extend([l.rstrip(" ") for l in self.registry.copyright.splitlines()])
+ for line in lines:
+ f.write("{0}{1}".format("# " if spec_file else " * ", line).rstrip(" ") + "\n")
+ f.write("\n" if spec_file else " */\n\n")
+ def generate_thunks_c(self, f, prefix):
+ self._generate_copyright(f)
f.write("#include \"config.h\"\n")
f.write("#include \"wine/port.h\"\n\n")
@@ -2011,7 +2021,7 @@ class VkGenerator(object):
f.write("}\n")
def generate_thunks_h(self, f, prefix):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_THUNKS_H\n")
f.write("#define __WINE_VULKAN_THUNKS_H\n\n")
@@ -2109,7 +2119,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_THUNKS_H */\n")
def generate_vulkan_h(self, f):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_H\n")
f.write("#define __WINE_VULKAN_H\n\n")
@@ -2203,7 +2213,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_H */\n")
def generate_vulkan_driver_h(self, f):
- f.write("/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */\n\n")
+ self._generate_copyright(f)
f.write("#ifndef __WINE_VULKAN_DRIVER_H\n")
f.write("#define __WINE_VULKAN_DRIVER_H\n\n")
@@ -2231,7 +2241,7 @@ class VkGenerator(object):
f.write("#endif /* __WINE_VULKAN_DRIVER_H */\n")
def generate_vulkan_spec(self, f):
- f.write("# Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n\n")
+ self._generate_copyright(f, spec_file=True)
f.write("@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
f.write("@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
@@ -2252,7 +2262,7 @@ class VkGenerator(object):
f.write("@ stub {0}\n".format(func.name))
def generate_vulkan_loader_spec(self, f):
- f.write("# Automatically generated from Vulkan vk.xml; DO NOT EDIT!\n\n")
+ self._generate_copyright(f, spec_file=True)
# Export symbols for all Vulkan Core functions.
for func in self.registry.funcs.values():
@@ -2303,6 +2313,8 @@ class VkRegistry(object):
self._parse_features(root)
self._parse_extensions(root)
+ self.copyright = root.find('./comment').text
+
def _mark_command_required(self, command):
""" Helper function to mark a certain command and the datatypes it needs as required."""
def mark_bitmask_dependencies(bitmask, types):
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c
index cdb229d7df32..2f89fdb5bde4 100644
--- a/dlls/winevulkan/vulkan_thunks.c
+++ b/dlls/winevulkan/vulkan_thunks.c
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#include "config.h"
#include "wine/port.h"
diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h
index f193c4310761..55645afd4735 100644
--- a/dlls/winevulkan/vulkan_thunks.h
+++ b/dlls/winevulkan/vulkan_thunks.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_THUNKS_H
#define __WINE_VULKAN_THUNKS_H
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 551c7fd89724..b923c6422518 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -1,4 +1,38 @@
# Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+#
+# This file is generated from Vulkan vk.xml file covered
+# by the following copyright and permission notice:
+#
+# Copyright (c) 2015-2018 The Khronos Group Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ---- Exceptions to the Apache 2.0 License: ----
+#
+# As an exception, if you use this Software to generate code and portions of
+# this Software are embedded into the generated code as a result, you may
+# redistribute such product without providing attribution as would otherwise
+# be required by Sections 4(a), 4(b) and 4(d) of the License.
+#
+# In addition, if you combine or link code generated by this Software with
+# software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+# ("`Combined Software`") and if a court of competent jurisdiction determines
+# that the patent provision (Section 3), the indemnity provision (Section 9)
+# or other Section of the License conflicts with the conditions of the
+# applicable GPL or LGPL license, you may retroactively and prospectively
+# choose to deem waived or otherwise exclude such Section(s) of the License,
+# but only in their entirety and only with respect to the Combined Software.
+#
@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index 74ff22b52e08..93e0d0118ff8 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_H
#define __WINE_VULKAN_H
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h
index 60d16dd52a24..c11cf33e9c88 100644
--- a/include/wine/vulkan_driver.h
+++ b/include/wine/vulkan_driver.h
@@ -1,4 +1,39 @@
-/* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
+/* Automatically generated from Vulkan vk.xml; DO NOT EDIT!
+ *
+ * This file is generated from Vulkan vk.xml file covered
+ * by the following copyright and permission notice:
+ *
+ * Copyright (c) 2015-2018 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * ---- Exceptions to the Apache 2.0 License: ----
+ *
+ * As an exception, if you use this Software to generate code and portions of
+ * this Software are embedded into the generated code as a result, you may
+ * redistribute such product without providing attribution as would otherwise
+ * be required by Sections 4(a), 4(b) and 4(d) of the License.
+ *
+ * In addition, if you combine or link code generated by this Software with
+ * software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
+ * ("`Combined Software`") and if a court of competent jurisdiction determines
+ * that the patent provision (Section 3), the indemnity provision (Section 9)
+ * or other Section of the License conflicts with the conditions of the
+ * applicable GPL or LGPL license, you may retroactively and prospectively
+ * choose to deem waived or otherwise exclude such Section(s) of the License,
+ * but only in their entirety and only with respect to the Combined Software.
+ *
+ */
#ifndef __WINE_VULKAN_DRIVER_H
#define __WINE_VULKAN_DRIVER_H
--
2.16.4
More information about the wine-devel
mailing list