winevulkan: Add copyright headers to files generated from vk.xml.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-06-06 12:15:33 +02:00 committed by Alexandre Julliard
parent e4164e2b87
commit a333c2ef07
7 changed files with 231 additions and 11 deletions

View File

@ -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

View File

@ -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):

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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