mirror of
https://github.com/KhronosGroup/Vulkan-Headers.git
synced 2025-06-03 00:57:42 +00:00
Update for Vulkan-Docs 1.2.143
This commit is contained in:
parent
db1a98c6cc
commit
9d2dfca53b
24 changed files with 402 additions and 479 deletions
|
@ -1,32 +1,6 @@
|
|||
// Copyright (c) 2015-2020 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.
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
|
||||
// This header is generated from the Khronos Vulkan XML API Registry.
|
||||
|
@ -79,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
static_assert( VK_HEADER_VERSION == 142 , "Wrong VK_HEADER_VERSION!" );
|
||||
static_assert( VK_HEADER_VERSION == 143 , "Wrong VK_HEADER_VERSION!" );
|
||||
|
||||
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
|
||||
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
|
||||
|
@ -13487,16 +13461,21 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
operator std::tuple<Result&, T&>() VULKAN_HPP_NOEXCEPT { return std::tuple<Result&, T&>(result, value); }
|
||||
|
||||
#if !defined(VULKAN_HPP_DISABLE_IMPLICIT_RESULT_VALUE_CAST)
|
||||
operator T const& () const VULKAN_HPP_NOEXCEPT
|
||||
operator T const& () const & VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
operator T& () VULKAN_HPP_NOEXCEPT
|
||||
operator T& () & VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
operator T const&& () const && VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::move( value );
|
||||
}
|
||||
|
||||
operator T&& () && VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return std::move( value );
|
||||
|
@ -84550,6 +84529,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
template <> struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, PhysicalDeviceFeatures2>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDevicePipelineExecutablePropertiesFeaturesKHR, DeviceCreateInfo>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDevicePointClippingProperties, PhysicalDeviceProperties2>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, PhysicalDeviceFeatures2>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDevicePrivateDataFeaturesEXT, DeviceCreateInfo>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, PhysicalDeviceFeatures2>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDeviceProtectedMemoryFeatures, DeviceCreateInfo>{ enum { value = true }; };
|
||||
template <> struct StructExtends<PhysicalDeviceProtectedMemoryProperties, PhysicalDeviceProperties2>{ enum { value = true }; };
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -53,7 +43,7 @@ extern "C" {
|
|||
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0
|
||||
|
||||
// Version of this file
|
||||
#define VK_HEADER_VERSION 142
|
||||
#define VK_HEADER_VERSION 143
|
||||
|
||||
// Complete version of this file
|
||||
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION)
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -4,17 +4,7 @@
|
|||
/*
|
||||
** Copyright (c) 2015-2020 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.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Base class for working-group-specific style conventions,
|
||||
# used in generation.
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
"""Base class for source/header/doc generators, as well as some utility functions."""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
@ -351,9 +341,6 @@ class OutputGenerator:
|
|||
bitpos = int(value, 0)
|
||||
numVal = 1 << bitpos
|
||||
value = '0x%08x' % numVal
|
||||
if not self.genOpts.conventions.valid_flag_bit(bitpos):
|
||||
msg='Enum {} uses bit position {}, which may result in undefined behavior or unexpected enumerant scalar data type'
|
||||
self.logMsg('warn', msg.format(name, bitpos))
|
||||
if bitpos >= 32:
|
||||
value = value + 'ULL'
|
||||
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
|
||||
|
@ -442,10 +429,43 @@ class OutputGenerator:
|
|||
"""Generate the C declaration for an enum"""
|
||||
groupElem = groupinfo.elem
|
||||
|
||||
# Determine the required bit width for the enum group.
|
||||
# 32 is the default, which generates C enum types for the values.
|
||||
bitwidth = 32
|
||||
|
||||
# If the constFlagBits preference is set, 64 is the default for bitmasks
|
||||
if self.genOpts.conventions.constFlagBits and groupElem.get('type') == 'bitmask':
|
||||
return self.buildEnumCDecl_Bitmask(groupinfo, groupName)
|
||||
bitwidth = 64
|
||||
|
||||
# Check for an explicitly defined bitwidth, which will override any defaults.
|
||||
if groupElem.get('bitwidth'):
|
||||
try:
|
||||
bitwidth = int(groupElem.get('bitwidth'))
|
||||
except ValueError as ve:
|
||||
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for ', groupName, ' - must be an integer value\n')
|
||||
exit(1)
|
||||
|
||||
# Bitmask types support 64-bit flags, so have different handling
|
||||
if groupElem.get('type') == 'bitmask':
|
||||
|
||||
# Validate the bitwidth and generate values appropriately
|
||||
# Bitmask flags up to 64-bit are generated as static const uint64_t values
|
||||
# Bitmask flags up to 32-bit are generated as C enum values
|
||||
if bitwidth > 64:
|
||||
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for bitmask type ', groupName, ' - must be less than or equal to 64\n')
|
||||
exit(1)
|
||||
elif bitwidth > 32:
|
||||
return self.buildEnumCDecl_Bitmask(groupinfo, groupName)
|
||||
else:
|
||||
return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
|
||||
else:
|
||||
return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
|
||||
# Validate the bitwidth and generate values appropriately
|
||||
# Enum group types up to 32-bit are generated as C enum values
|
||||
if bitwidth > 32:
|
||||
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for enum type ', groupName, ' - must be less than or equal to 32\n')
|
||||
exit(1)
|
||||
else:
|
||||
return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
|
||||
|
||||
def buildEnumCDecl_Bitmask(self, groupinfo, groupName):
|
||||
"""Generate the C declaration for an "enum" that is actually a
|
||||
|
@ -455,14 +475,24 @@ class OutputGenerator:
|
|||
|
||||
# Prefix
|
||||
body = "// Flag bits for " + flagTypeName + "\n"
|
||||
|
||||
# Maximum allowable value for a flag (unsigned 64-bit integer)
|
||||
maxValidValue = 2**(64) - 1
|
||||
minValidValue = 0
|
||||
|
||||
# Loop over the nested 'enum' tags.
|
||||
for elem in groupElem.findall('enum'):
|
||||
# Convert the value to an integer and use that to track min/max.
|
||||
# Values of form -(number) are accepted but nothing more complex.
|
||||
# Should catch exceptions here for more complex constructs. Not yet.
|
||||
(_, strVal) = self.enumToValue(elem, True)
|
||||
(numVal, strVal) = self.enumToValue(elem, True)
|
||||
name = elem.get('name')
|
||||
|
||||
# Range check for the enum value
|
||||
if numVal is not None and (numVal > maxValidValue or numVal < minValidValue):
|
||||
self.logMsg('error', 'Allowable range for flag types in C is [', minValidValue, ',', maxValidValue, '], but', name, 'flag has a value outside of this (', strVal, ')\n')
|
||||
exit(1)
|
||||
|
||||
body += "static const {} {} = {};\n".format(flagTypeName, name, strVal)
|
||||
|
||||
# Postfix
|
||||
|
@ -489,6 +519,11 @@ class OutputGenerator:
|
|||
|
||||
# @@ Should use the type="bitmask" attribute instead
|
||||
isEnum = ('FLAG_BITS' not in expandPrefix)
|
||||
|
||||
# Allowable range for a C enum - which is that of a signed 32-bit integer
|
||||
maxValidValue = 2**(32 - 1) - 1
|
||||
minValidValue = (maxValidValue * -1) - 1
|
||||
|
||||
|
||||
# Get a list of nested 'enum' tags.
|
||||
enums = groupElem.findall('enum')
|
||||
|
@ -524,6 +559,12 @@ class OutputGenerator:
|
|||
else:
|
||||
aliasText.append(decl)
|
||||
|
||||
# Range check for the enum value
|
||||
if numVal is not None and (numVal > maxValidValue or numVal < minValidValue):
|
||||
self.logMsg('error', 'Allowable range for C enum types is [', minValidValue, ',', maxValidValue, '], but', name, 'has a value outside of this (', strVal, ')\n')
|
||||
exit(1)
|
||||
|
||||
|
||||
# Don't track min/max for non-numbers (numVal is None)
|
||||
if isEnum and numVal is not None and elem.get('extends') is None:
|
||||
if minName is None:
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import pdb
|
||||
|
@ -110,17 +100,7 @@ def makeGenOpts(args):
|
|||
'/*',
|
||||
'** Copyright (c) 2015-2020 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.',
|
||||
'** SPDX-License-Identifier: Apache-2.0',
|
||||
'*/',
|
||||
''
|
||||
]
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
#!/usr/bin/python3 -i
|
||||
#
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
# Copyright 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
"""Types and classes for manipulating an API registry."""
|
||||
|
||||
import copy
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
# Copyright (c) 2018-2019 Collabora, Ltd.
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
def getElemName(elem, default=None):
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,33 +3,7 @@
|
|||
<comment>
|
||||
Copyright (c) 2015-2020 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.
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
</comment>
|
||||
|
||||
<comment>
|
||||
|
@ -157,7 +131,7 @@ server.
|
|||
<type category="define">// Vulkan 1.2 version number
|
||||
#define <name>VK_API_VERSION_1_2</name> <type>VK_MAKE_VERSION</type>(1, 2, 0)// Patch version should always be set to 0</type>
|
||||
<type category="define">// Version of this file
|
||||
#define <name>VK_HEADER_VERSION</name> 142</type>
|
||||
#define <name>VK_HEADER_VERSION</name> 143</type>
|
||||
<type category="define" requires="VK_HEADER_VERSION">// Complete version of this file
|
||||
#define <name>VK_HEADER_VERSION_COMPLETE</name> <type>VK_MAKE_VERSION</type>(1, 2, VK_HEADER_VERSION)</type>
|
||||
|
||||
|
@ -1918,7 +1892,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||
<member>const <type>void</type>* <name>pNext</name></member>
|
||||
<member><type>VkPrivateDataSlotCreateFlagsEXT</type> <name>flags</name></member>
|
||||
</type>
|
||||
<type category="struct" name="VkPhysicalDevicePrivateDataFeaturesEXT">
|
||||
<type category="struct" name="VkPhysicalDevicePrivateDataFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
|
||||
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
|
||||
<member><type>void</type>* <name>pNext</name></member>
|
||||
<member><type>VkBool32</type> <name>privateData</name></member>
|
||||
|
@ -13111,7 +13085,7 @@ typedef void <name>CAMetalLayer</name>;
|
|||
<enum extends="VkResult" offset="3" name="VK_OPERATION_NOT_DEFERRED_KHR" />
|
||||
</require>
|
||||
</extension>
|
||||
<extension name="VK_KHR_pipeline_executable_properties" number="270" type="device" author="KHR" contact="Jason Ekstrand @jekstrand" specialuse="devtools" supported="vulkan">
|
||||
<extension name="VK_KHR_pipeline_executable_properties" number="270" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jason Ekstrand @jekstrand" specialuse="devtools" supported="vulkan">
|
||||
<require>
|
||||
<enum value="1" name="VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION"/>
|
||||
<enum value=""VK_KHR_pipeline_executable_properties"" name="VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME"/>
|
||||
|
|
|
@ -2,17 +2,7 @@
|
|||
#
|
||||
# Copyright (c) 2013-2020 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.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Working-group-specific style conventions,
|
||||
# used in generation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue