Update Vulkan and related libraries to 1.3.250.0
This commit is contained in:
parent
e7d2e49688
commit
1b642d283c
|
@ -425,7 +425,7 @@ License: Apache-2.0
|
|||
|
||||
Files: ./thirdparty/spirv-reflect/
|
||||
Comment: SPIRV-Reflect
|
||||
Copyright: 2017-2018, Google Inc.
|
||||
Copyright: 2017-2022, Google Inc.
|
||||
License: Apache-2.0
|
||||
|
||||
Files: ./thirdparty/squish/
|
||||
|
@ -452,15 +452,15 @@ License: BSD-3-clause
|
|||
|
||||
Files: ./thirdparty/volk/
|
||||
Comment: volk
|
||||
Copyright: 2018-2019, Arseny Kapoulkine
|
||||
Copyright: 2018-2023, Arseny Kapoulkine
|
||||
License: Expat
|
||||
|
||||
Files: ./thirdparty/vulkan/
|
||||
Comment: Vulkan Headers
|
||||
Copyright: 2014-2021, The Khronos Group Inc.
|
||||
2014-2021, Valve Corporation
|
||||
2014-2021, LunarG, Inc.
|
||||
2015-2021, Google Inc.
|
||||
Copyright: 2014-2023, The Khronos Group Inc.
|
||||
2014-2023, Valve Corporation
|
||||
2014-2023, LunarG, Inc.
|
||||
2015-2023, Google Inc.
|
||||
License: Apache-2.0
|
||||
|
||||
Files: ./thirdparty/vulkan/vk_mem_alloc.h
|
||||
|
|
|
@ -141,15 +141,15 @@ const TBuiltInResource DefaultTBuiltInResource = {
|
|||
/* .maxDualSourceDrawBuffersEXT = */ 1,
|
||||
|
||||
/* .limits = */ {
|
||||
/* .nonInductiveForLoops = */ true,
|
||||
/* .whileLoops = */ true,
|
||||
/* .doWhileLoops = */ true,
|
||||
/* .generalUniformIndexing = */ true,
|
||||
/* .generalAttributeMatrixVectorIndexing = */ true,
|
||||
/* .generalVaryingIndexing = */ true,
|
||||
/* .generalSamplerIndexing = */ true,
|
||||
/* .generalVariableIndexing = */ true,
|
||||
/* .generalConstantMatrixVectorIndexing = */ true,
|
||||
/* .nonInductiveForLoops = */ 1,
|
||||
/* .whileLoops = */ 1,
|
||||
/* .doWhileLoops = */ 1,
|
||||
/* .generalUniformIndexing = */ 1,
|
||||
/* .generalAttributeMatrixVectorIndexing = */ 1,
|
||||
/* .generalVaryingIndexing = */ 1,
|
||||
/* .generalSamplerIndexing = */ 1,
|
||||
/* .generalVariableIndexing = */ 1,
|
||||
/* .generalConstantMatrixVectorIndexing = */ 1,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -213,7 +213,7 @@ a new version of the web instance.
|
|||
## glslang
|
||||
|
||||
- Upstream: https://github.com/KhronosGroup/glslang
|
||||
- Version: 11.12.0 / sdk-1.3.231.1 (5755de46b07e4374c05fb1081f65f7ae1f8cca81, 2022)
|
||||
- Version: 12.2.0 / sdk-1.3.250.0 (d1517d64cfca91f573af1bf7341dc3a5113349c0, 2023)
|
||||
- License: glslang
|
||||
|
||||
Version should be kept in sync with the one of the used Vulkan SDK (see `vulkan`
|
||||
|
@ -653,7 +653,7 @@ proposed by these libraries and better integrate them with Godot.
|
|||
## spirv-reflect
|
||||
|
||||
- Upstream: https://github.com/KhronosGroup/SPIRV-Reflect
|
||||
- Version: sdk-1.3.231.1 (b68b5a8a5d8ab5fce79e6596f3a731291046393a, 2022)
|
||||
- Version: sdk-1.3.250.0 (1fd43331f0bd77cc0f421745781f79a14d8f2bb1, 2023)
|
||||
- License: Apache 2.0
|
||||
|
||||
Now tracks Vulkan SDK releases, so keep it in sync with volk / vulkan.
|
||||
|
@ -731,7 +731,7 @@ folder.
|
|||
## volk
|
||||
|
||||
- Upstream: https://github.com/zeux/volk
|
||||
- Version: sdk-1.3.231.1 (f29df7d2834c434b39169d5b2e4dde8c05a5adc1, 2022)
|
||||
- Version: sdk-1.3.250.0 (b3bc21e584f97400b6884cb2a541a56c6a5ddba3, 2023)
|
||||
- License: MIT
|
||||
|
||||
Unless there is a specific reason to package a more recent version, please stick
|
||||
|
@ -750,7 +750,7 @@ Files extracted from upstream source:
|
|||
## vulkan
|
||||
|
||||
- Upstream: https://github.com/KhronosGroup/Vulkan-Headers
|
||||
- Version: sdk-1.3.231.1 (98f440ce6868c94f5ec6e198cc1adda4760e8849, 2022)
|
||||
- Version: sdk-1.3.250 (bae9700cd9425541a0f6029957f005e5ad3ef660, 2023)
|
||||
- License: Apache 2.0
|
||||
|
||||
The vendored version should be kept in sync with volk, see above.
|
||||
|
@ -761,7 +761,7 @@ Files extracted from upstream source:
|
|||
- `LICENSE.txt`
|
||||
|
||||
`vk_enum_string_helper.h` is taken from the matching `Vulkan-ValidationLayers`
|
||||
SDK release: https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/master/layers/generated/vk_enum_string_helper.h
|
||||
SDK release: https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/layers/vulkan/generated/vk_enum_string_helper.h
|
||||
|
||||
`vk_mem_alloc.h` is taken from https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
|
||||
Version: 3.0.1 (2022-06-10), commit `cfdc0f8775ab3258a3b9c4e47d8ce4b6f52a5441`
|
||||
|
|
|
@ -102,7 +102,7 @@ bool InitThread()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr)
|
||||
return true;
|
||||
|
||||
if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
|
||||
|
@ -130,8 +130,8 @@ bool DetachThread()
|
|||
//
|
||||
// Function is re-entrant and this thread may not have been initialized.
|
||||
//
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
|
||||
if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) {
|
||||
if (!OS_SetTLSValue(ThreadInitializeIndex, nullptr)) {
|
||||
assert(0 && "DetachThread(): Unable to clear init flag.");
|
||||
success = false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
** Copyright (c) 2022 ARM Limited
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
** of this software and/or associated documentation files (the "Materials"),
|
||||
** to deal in the Materials without restriction, including without limitation
|
||||
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
** and/or sell copies of the Materials, and to permit persons to whom the
|
||||
** Materials are furnished to do so, subject to the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included in
|
||||
** all copies or substantial portions of the Materials.
|
||||
**
|
||||
** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
|
||||
** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
|
||||
** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
|
||||
** IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef GLSLextARM_H
|
||||
#define GLSLextARM_H
|
||||
|
||||
static const int GLSLextARMVersion = 100;
|
||||
static const int GLSLextARMRevision = 1;
|
||||
|
||||
static const char * const E_SPV_ARM_core_builtins = "SPV_ARM_core_builtins";
|
||||
|
||||
#endif // #ifndef GLSLextARM_H
|
|
@ -39,6 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
|
|||
static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
|
||||
static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max";
|
||||
static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64";
|
||||
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
|
||||
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
||||
|
||||
#endif // #ifndef GLSLextEXT_H
|
||||
|
|
|
@ -54,5 +54,6 @@ static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_w
|
|||
static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
|
||||
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
|
||||
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
|
||||
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
|
||||
|
||||
#endif // #ifndef GLSLextKHR_H
|
||||
|
|
|
@ -81,4 +81,7 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix";
|
|||
//SPV_NV_shader_sm_builtins
|
||||
const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins";
|
||||
|
||||
//SPV_NV_shader_execution_reorder
|
||||
const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder";
|
||||
|
||||
#endif // #ifndef GLSLextNV_H
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace spv {
|
|||
#include "GLSL.ext.EXT.h"
|
||||
#include "GLSL.ext.AMD.h"
|
||||
#include "GLSL.ext.NV.h"
|
||||
#include "GLSL.ext.ARM.h"
|
||||
#include "NonSemanticDebugPrintf.h"
|
||||
}
|
||||
|
||||
|
@ -174,7 +175,7 @@ protected:
|
|||
spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct,
|
||||
glslang::TLayoutPacking, const glslang::TQualifier&);
|
||||
void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking,
|
||||
const glslang::TQualifier&, spv::Id);
|
||||
const glslang::TQualifier&, spv::Id, const std::vector<spv::Id>& spvMembers);
|
||||
spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim);
|
||||
spv::Id accessChainLoad(const glslang::TType& type);
|
||||
void accessChainStore(const glslang::TType& type, spv::Id rvalue);
|
||||
|
@ -277,12 +278,10 @@ protected:
|
|||
// requiring local translation to and from SPIR-V type on every access.
|
||||
// Maps <builtin-variable-id -> AST-required-type-id>
|
||||
std::unordered_map<spv::Id, spv::Id> forceType;
|
||||
|
||||
// Used later for generating OpTraceKHR/OpExecuteCallableKHR
|
||||
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[2];
|
||||
|
||||
// Used by Task shader while generating opearnds for OpEmitMeshTasksEXT
|
||||
spv::Id taskPayloadID;
|
||||
// Used later for generating OpTraceKHR/OpExecuteCallableKHR/OpHitObjectRecordHit*/OpHitObjectGetShaderBindingTableData
|
||||
std::unordered_map<unsigned int, glslang::TIntermSymbol *> locationToSymbol[4];
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -294,8 +293,6 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile
|
|||
{
|
||||
#ifdef GLSLANG_WEB
|
||||
return spv::SourceLanguageESSL;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
return spv::SourceLanguageGLSL;
|
||||
#endif
|
||||
|
||||
switch (source) {
|
||||
|
@ -354,6 +351,7 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
|
|||
case glslang::EsdRect: return spv::DimRect;
|
||||
case glslang::EsdBuffer: return spv::DimBuffer;
|
||||
case glslang::EsdSubpass: return spv::DimSubpassData;
|
||||
case glslang::EsdAttachmentEXT: return spv::DimTileImageDataEXT;
|
||||
default:
|
||||
assert(0);
|
||||
return spv::Dim2D;
|
||||
|
@ -378,10 +376,9 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type)
|
|||
}
|
||||
|
||||
// Translate glslang type to SPIR-V block decorations.
|
||||
spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useStorageBuffer)
|
||||
spv::Decoration TranslateBlockDecoration(const glslang::TStorageQualifier storage, bool useStorageBuffer)
|
||||
{
|
||||
if (type.getBasicType() == glslang::EbtBlock) {
|
||||
switch (type.getQualifier().storage) {
|
||||
switch (storage) {
|
||||
case glslang::EvqUniform: return spv::DecorationBlock;
|
||||
case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock;
|
||||
case glslang::EvqVaryingIn: return spv::DecorationBlock;
|
||||
|
@ -393,12 +390,12 @@ spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useSto
|
|||
case glslang::EvqHitAttr: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableData: return spv::DecorationBlock;
|
||||
case glslang::EvqCallableDataIn: return spv::DecorationBlock;
|
||||
case glslang::EvqHitObjectAttrNV: return spv::DecorationBlock;
|
||||
#endif
|
||||
default:
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return spv::DecorationMax;
|
||||
}
|
||||
|
@ -470,6 +467,7 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T
|
|||
case glslang::EvqHitAttr:
|
||||
case glslang::EvqCallableData:
|
||||
case glslang::EvqCallableDataIn:
|
||||
case glslang::EvqHitObjectAttrNV:
|
||||
return spv::DecorationMax;
|
||||
#endif
|
||||
default:
|
||||
|
@ -1013,6 +1011,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||
return spv::BuiltInRayTmaxKHR;
|
||||
case glslang::EbvCullMask:
|
||||
return spv::BuiltInCullMaskKHR;
|
||||
case glslang::EbvPositionFetch:
|
||||
return spv::BuiltInHitTriangleVertexPositionsKHR;
|
||||
case glslang::EbvInstanceCustomIndex:
|
||||
return spv::BuiltInInstanceCustomIndexKHR;
|
||||
case glslang::EbvHitT:
|
||||
|
@ -1108,6 +1108,28 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
|
|||
builder.addExtension(spv::E_SPV_NV_shader_sm_builtins);
|
||||
builder.addCapability(spv::CapabilityShaderSMBuiltinsNV);
|
||||
return spv::BuiltInSMIDNV;
|
||||
|
||||
// ARM builtins
|
||||
case glslang::EbvCoreCountARM:
|
||||
builder.addExtension(spv::E_SPV_ARM_core_builtins);
|
||||
builder.addCapability(spv::CapabilityCoreBuiltinsARM);
|
||||
return spv::BuiltInCoreCountARM;
|
||||
case glslang::EbvCoreIDARM:
|
||||
builder.addExtension(spv::E_SPV_ARM_core_builtins);
|
||||
builder.addCapability(spv::CapabilityCoreBuiltinsARM);
|
||||
return spv::BuiltInCoreIDARM;
|
||||
case glslang::EbvCoreMaxIDARM:
|
||||
builder.addExtension(spv::E_SPV_ARM_core_builtins);
|
||||
builder.addCapability(spv::CapabilityCoreBuiltinsARM);
|
||||
return spv::BuiltInCoreMaxIDARM;
|
||||
case glslang::EbvWarpIDARM:
|
||||
builder.addExtension(spv::E_SPV_ARM_core_builtins);
|
||||
builder.addCapability(spv::CapabilityCoreBuiltinsARM);
|
||||
return spv::BuiltInWarpIDARM;
|
||||
case glslang::EbvWarpMaxIDARM:
|
||||
builder.addExtension(spv::E_SPV_ARM_core_builtins);
|
||||
builder.addCapability(spv::CapabilityCoreBuiltinsARM);
|
||||
return spv::BuiltInWarpMaxIDARM;
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
@ -1278,7 +1300,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
|
|||
// Translate glslang type to SPIR-V storage class.
|
||||
spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type)
|
||||
{
|
||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||
if (type.getBasicType() == glslang::EbtRayQuery || type.getBasicType() == glslang::EbtHitObjectNV)
|
||||
return spv::StorageClassPrivate;
|
||||
#ifndef GLSLANG_WEB
|
||||
if (type.getQualifier().isSpirvByReference()) {
|
||||
|
@ -1290,12 +1312,17 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||
return spv::StorageClassInput;
|
||||
if (type.getQualifier().isPipeOutput())
|
||||
return spv::StorageClassOutput;
|
||||
if (type.getQualifier().storage == glslang::EvqTileImageEXT || type.isAttachmentEXT()) {
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT);
|
||||
return spv::StorageClassTileImageEXT;
|
||||
}
|
||||
|
||||
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl ||
|
||||
type.getQualifier().storage == glslang::EvqUniform) {
|
||||
if (type.isAtomic())
|
||||
return spv::StorageClassAtomicCounter;
|
||||
if (type.containsOpaque())
|
||||
if (type.containsOpaque() && !glslangIntermediate->getBindlessMode())
|
||||
return spv::StorageClassUniformConstant;
|
||||
}
|
||||
|
||||
|
@ -1335,6 +1362,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
||||
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
||||
case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClassTaskPayloadWorkgroupEXT;
|
||||
case glslang::EvqHitObjectAttrNV: return spv::StorageClassHitObjectAttributeNV;
|
||||
case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass);
|
||||
#endif
|
||||
default:
|
||||
|
@ -1660,6 +1688,24 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||
builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
|
||||
}
|
||||
|
||||
if (glslangIntermediate->getNonCoherentColorAttachmentReadEXT()) {
|
||||
builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentColorAttachmentReadEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
}
|
||||
|
||||
if (glslangIntermediate->getNonCoherentDepthAttachmentReadEXT()) {
|
||||
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentDepthAttachmentReadEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
}
|
||||
|
||||
if (glslangIntermediate->getNonCoherentStencilAttachmentReadEXT()) {
|
||||
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentStencilAttachmentReadEXT);
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
}
|
||||
|
||||
if (glslangIntermediate->isDepthReplacing())
|
||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
|
||||
|
||||
|
@ -1837,12 +1883,15 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||
builder.addCapability(spv::CapabilityRayTracingNV);
|
||||
builder.addExtension("SPV_NV_ray_tracing");
|
||||
}
|
||||
if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable)
|
||||
{
|
||||
if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) {
|
||||
if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) {
|
||||
builder.addCapability(spv::CapabilityRayCullMaskKHR);
|
||||
builder.addExtension("SPV_KHR_ray_cull_mask");
|
||||
}
|
||||
if (extensions.find("GL_EXT_ray_tracing_position_fetch") != extensions.end()) {
|
||||
builder.addCapability(spv::CapabilityRayTracingPositionFetchKHR);
|
||||
builder.addExtension("SPV_KHR_ray_tracing_position_fetch");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1984,6 +2033,10 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector<unsigned int>& out)
|
|||
//
|
||||
void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
|
||||
{
|
||||
// We update the line information even though no code might be generated here
|
||||
// This is helpful to yield correct lines for control flow instructions
|
||||
builder.setLine(symbol->getLoc().line, symbol->getLoc().getFilename());
|
||||
|
||||
SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder);
|
||||
if (symbol->getType().isStruct())
|
||||
glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId();
|
||||
|
@ -2135,6 +2188,9 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
|
|||
node->getRight()->traverse(this);
|
||||
spv::Id rValue = accessChainLoad(node->getRight()->getType());
|
||||
|
||||
// reset line number for assignment
|
||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
||||
|
||||
if (node->getOp() != glslang::EOpAssign) {
|
||||
// the left is also an r-value
|
||||
builder.setAccessChain(lValue);
|
||||
|
@ -2561,6 +2617,35 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||
|
||||
spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags;
|
||||
|
||||
const auto hitObjectOpsWithLvalue = [](glslang::TOperator op) {
|
||||
switch(op) {
|
||||
case glslang::EOpReorderThreadNV:
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (node->getOp() == glslang::EOpAtomicCounterIncrement ||
|
||||
node->getOp() == glslang::EOpAtomicCounterDecrement ||
|
||||
|
@ -2575,7 +2660,8 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
|
||||
node->getOp() == glslang::EOpRayQueryTerminate ||
|
||||
node->getOp() == glslang::EOpRayQueryConfirmIntersection ||
|
||||
(node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) {
|
||||
(node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference()) ||
|
||||
hitObjectOpsWithLvalue(node->getOp())) {
|
||||
operand = builder.accessChainGetLValue(); // Special case l-value operands
|
||||
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
||||
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
|
||||
|
@ -2710,6 +2796,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand);
|
||||
return false;
|
||||
case glslang::EOpReorderThreadNV:
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operand);
|
||||
return false;
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordEmptyNV, operand);
|
||||
return false;
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
@ -3201,6 +3293,48 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock);
|
||||
noReturnValue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
case glslang::EOpHitObjectRecordEmptyNV:
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
case glslang::EOpReorderThreadNV:
|
||||
noReturnValue = true;
|
||||
//Fallthrough
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder);
|
||||
builder.addCapability(spv::CapabilityShaderInvocationReorderNV);
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
|
||||
builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch);
|
||||
builder.addCapability(spv::CapabilityRayQueryPositionFetchKHR);
|
||||
noReturnValue = true;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case glslang::EOpDebugPrintf:
|
||||
|
@ -3258,6 +3392,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
lvalue = true;
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
if (arg == 0)
|
||||
lvalue = true;
|
||||
break;
|
||||
|
||||
case glslang::EOpRayQueryInitialize:
|
||||
case glslang::EOpRayQueryTerminate:
|
||||
case glslang::EOpRayQueryConfirmIntersection:
|
||||
|
@ -3358,6 +3508,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference())
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpReorderThreadNV:
|
||||
//Three variants of reorderThreadNV, two of them use hitObjectNV
|
||||
if (arg == 0 && glslangOperands.size() != 2)
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
|
||||
if (arg == 0 || arg == 2)
|
||||
lvalue = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
@ -3450,17 +3609,30 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject ||
|
||||
glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT
|
||||
)) {
|
||||
bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst();
|
||||
operands.push_back(builder.makeIntConstant(cond ? 1 : 0));
|
||||
} else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) {
|
||||
const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1);
|
||||
(arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) ||
|
||||
(arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) {
|
||||
const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0;
|
||||
|
||||
const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
auto itNode = locationToSymbol[set].find(location);
|
||||
visitSymbol(itNode->second);
|
||||
spv::Id symId = getSymbolId(itNode->second);
|
||||
operands.push_back(symId);
|
||||
} else if ((arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitNV) ||
|
||||
(arg == 13 && glslangOp == glslang::EOpHitObjectRecordHitMotionNV) ||
|
||||
(arg == 11 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexNV) ||
|
||||
(arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexMotionNV) ||
|
||||
(arg == 1 && glslangOp == glslang::EOpHitObjectGetAttributesNV)) {
|
||||
const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
const int set = 2;
|
||||
auto itNode = locationToSymbol[set].find(location);
|
||||
visitSymbol(itNode->second);
|
||||
spv::Id symId = getSymbolId(itNode->second);
|
||||
|
@ -3504,6 +3676,19 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
|
||||
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
|
||||
result = 0;
|
||||
} else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) {
|
||||
std::vector<spv::IdImmediate> idImmOps;
|
||||
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed
|
||||
|
||||
spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3),
|
||||
builder.makeUintConstant(3), 0);
|
||||
// do the op
|
||||
spv::Id result = builder.createOp(spv::OpRayQueryGetIntersectionTriangleVertexPositionsKHR, typeId, idImmOps);
|
||||
// store the result to the pointer (out param 'm')
|
||||
builder.createStore(result, operands[2]);
|
||||
result = 0;
|
||||
} else
|
||||
#endif
|
||||
if (atomic) {
|
||||
|
@ -3656,10 +3841,11 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
// Find a way of executing both sides and selecting the right result.
|
||||
const auto executeBothSides = [&]() -> void {
|
||||
// execute both sides
|
||||
spv::Id resultType = convertGlslangToSpvType(node->getType());
|
||||
node->getTrueBlock()->traverse(this);
|
||||
spv::Id trueValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType());
|
||||
node->getFalseBlock()->traverse(this);
|
||||
spv::Id falseValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType());
|
||||
spv::Id falseValue = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType());
|
||||
|
||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
||||
|
||||
|
@ -3668,8 +3854,8 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
return;
|
||||
|
||||
// emit code to select between trueValue and falseValue
|
||||
|
||||
// see if OpSelect can handle it
|
||||
// see if OpSelect can handle the result type, and that the SPIR-V types
|
||||
// of the inputs match the result type.
|
||||
if (isOpSelectable()) {
|
||||
// Emit OpSelect for this selection.
|
||||
|
||||
|
@ -3681,10 +3867,18 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
builder.getNumComponents(trueValue)));
|
||||
}
|
||||
|
||||
// If the types do not match, it is because of mismatched decorations on aggregates.
|
||||
// Since isOpSelectable only lets us get here for SPIR-V >= 1.4, we can use OpCopyObject
|
||||
// to get matching types.
|
||||
if (builder.getTypeId(trueValue) != resultType) {
|
||||
trueValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, trueValue);
|
||||
}
|
||||
if (builder.getTypeId(falseValue) != resultType) {
|
||||
falseValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, falseValue);
|
||||
}
|
||||
|
||||
// OpSelect
|
||||
result = builder.createTriOp(spv::OpSelect,
|
||||
convertGlslangToSpvType(node->getType()), condition,
|
||||
trueValue, falseValue);
|
||||
result = builder.createTriOp(spv::OpSelect, resultType, condition, trueValue, falseValue);
|
||||
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainRValue(result);
|
||||
|
@ -3692,7 +3886,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
// We need control flow to select the result.
|
||||
// TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path.
|
||||
result = builder.createVariable(TranslatePrecisionDecoration(node->getType()),
|
||||
spv::StorageClassFunction, convertGlslangToSpvType(node->getType()));
|
||||
spv::StorageClassFunction, resultType);
|
||||
|
||||
// Selection control:
|
||||
const spv::SelectionControlMask control = TranslateSelectionControl(*node);
|
||||
|
@ -3701,10 +3895,15 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
spv::Builder::If ifBuilder(condition, control, builder);
|
||||
|
||||
// emit the "then" statement
|
||||
builder.createStore(trueValue, result);
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(result);
|
||||
multiTypeStore(node->getType(), trueValue);
|
||||
|
||||
ifBuilder.makeBeginElse();
|
||||
// emit the "else" statement
|
||||
builder.createStore(falseValue, result);
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(result);
|
||||
multiTypeStore(node->getType(), falseValue);
|
||||
|
||||
// finish off the control flow
|
||||
ifBuilder.makeEndIf();
|
||||
|
@ -3731,16 +3930,26 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
|
|||
// emit the "then" statement
|
||||
if (node->getTrueBlock() != nullptr) {
|
||||
node->getTrueBlock()->traverse(this);
|
||||
if (result != spv::NoResult)
|
||||
builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result);
|
||||
if (result != spv::NoResult) {
|
||||
spv::Id load = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType());
|
||||
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(result);
|
||||
multiTypeStore(node->getType(), load);
|
||||
}
|
||||
}
|
||||
|
||||
if (node->getFalseBlock() != nullptr) {
|
||||
ifBuilder.makeBeginElse();
|
||||
// emit the "else" statement
|
||||
node->getFalseBlock()->traverse(this);
|
||||
if (result != spv::NoResult)
|
||||
builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result);
|
||||
if (result != spv::NoResult) {
|
||||
spv::Id load = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType());
|
||||
|
||||
builder.clearAccessChain();
|
||||
builder.setAccessChainLValue(result);
|
||||
multiTypeStore(node->getType(), load);
|
||||
}
|
||||
}
|
||||
|
||||
// finish off the control flow
|
||||
|
@ -4286,6 +4495,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||
case glslang::EbtString:
|
||||
// no type used for OpString
|
||||
return 0;
|
||||
|
||||
case glslang::EbtHitObjectNV: {
|
||||
builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder);
|
||||
builder.addCapability(spv::CapabilityShaderInvocationReorderNV);
|
||||
spvType = builder.makeHitObjectNVType();
|
||||
}
|
||||
break;
|
||||
#ifndef GLSLANG_WEB
|
||||
case glslang::EbtSpirvType: {
|
||||
// GL_EXT_spirv_intrinsics
|
||||
|
@ -4537,7 +4753,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy
|
|||
structMap[explicitLayout][qualifier.layoutMatrix][glslangMembers] = spvType;
|
||||
|
||||
// Decorate it
|
||||
decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType);
|
||||
decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType, spvMembers);
|
||||
|
||||
for (int i = 0; i < (int)deferredForwardPointers.size(); ++i) {
|
||||
auto it = deferredForwardPointers[i];
|
||||
|
@ -4551,7 +4767,8 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||
const glslang::TTypeList* glslangMembers,
|
||||
glslang::TLayoutPacking explicitLayout,
|
||||
const glslang::TQualifier& qualifier,
|
||||
spv::Id spvType)
|
||||
spv::Id spvType,
|
||||
const std::vector<spv::Id>& spvMembers)
|
||||
{
|
||||
// Name and decorate the non-hidden members
|
||||
int offset = -1;
|
||||
|
@ -4704,7 +4921,19 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||
|
||||
// Decorate the structure
|
||||
builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix));
|
||||
builder.addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer()));
|
||||
const auto basicType = type.getBasicType();
|
||||
const auto typeStorageQualifier = type.getQualifier().storage;
|
||||
if (basicType == glslang::EbtBlock) {
|
||||
builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer()));
|
||||
} else if (basicType == glslang::EbtStruct && glslangIntermediate->getSpv().vulkan > 0) {
|
||||
const auto hasRuntimeArray = !spvMembers.empty() && builder.getOpCode(spvMembers.back()) == spv::OpTypeRuntimeArray;
|
||||
if (hasRuntimeArray) {
|
||||
builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer()));
|
||||
}
|
||||
}
|
||||
|
||||
if (qualifier.hasHitObjectShaderRecordNV())
|
||||
builder.addDecoration(spvType, spv::DecorationHitObjectShaderRecordBufferNV);
|
||||
}
|
||||
|
||||
// Turn the expression forming the array size into an id.
|
||||
|
@ -4741,6 +4970,16 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
|
|||
spv::Builder::AccessChain::CoherentFlags coherentFlags = builder.getAccessChain().coherentFlags;
|
||||
coherentFlags |= TranslateCoherent(type);
|
||||
|
||||
spv::MemoryAccessMask accessMask = spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask);
|
||||
// If the value being loaded is HelperInvocation, SPIR-V 1.6 is being generated (so that
|
||||
// SPV_EXT_demote_to_helper_invocation is in core) and the memory model is in use, add
|
||||
// the Volatile MemoryAccess semantic.
|
||||
if (type.getQualifier().builtIn == glslang::EbvHelperInvocation &&
|
||||
glslangIntermediate->usingVulkanMemoryModel() &&
|
||||
glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||
accessMask = spv::MemoryAccessMask(accessMask | spv::MemoryAccessVolatileMask);
|
||||
}
|
||||
|
||||
unsigned int alignment = builder.getAccessChain().alignment;
|
||||
alignment |= type.getBufferReferenceAlignment();
|
||||
|
||||
|
@ -4748,7 +4987,7 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type)
|
|||
TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags),
|
||||
TranslateNonUniformDecoration(type.getQualifier()),
|
||||
nominalTypeId,
|
||||
spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask),
|
||||
accessMask,
|
||||
TranslateMemoryScope(coherentFlags),
|
||||
alignment);
|
||||
|
||||
|
@ -5075,7 +5314,7 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier,
|
|||
return true;
|
||||
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
|
||||
return paramType.getBasicType() == glslang::EbtBlock;
|
||||
return paramType.containsOpaque() || // sampler, etc.
|
||||
return (paramType.containsOpaque() && !glslangIntermediate->getBindlessMode()) || // sampler, etc.
|
||||
#ifndef GLSLANG_WEB
|
||||
paramType.getQualifier().isSpirvByReference() || // spirv_by_reference
|
||||
#endif
|
||||
|
@ -5222,6 +5461,10 @@ void TGlslangToSpvTraverser::collectRayTracingLinkerObjects()
|
|||
set = 1;
|
||||
break;
|
||||
|
||||
case glslang::EvqHitObjectAttrNV:
|
||||
set = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
set = -1;
|
||||
}
|
||||
|
@ -5370,6 +5613,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
|
|||
if (i == 7)
|
||||
lvalue = true;
|
||||
break;
|
||||
case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
|
||||
if (i == 2)
|
||||
lvalue = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -5529,6 +5776,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||
return result;
|
||||
}
|
||||
|
||||
if (cracked.attachmentEXT) {
|
||||
if (opIt != arguments.end()) {
|
||||
spv::IdImmediate sample = { true, *opIt };
|
||||
operands.push_back(sample);
|
||||
}
|
||||
spv::Id result = builder.createOp(spv::OpColorAttachmentReadEXT, resultType(), operands);
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
builder.setPrecision(result, precision);
|
||||
return result;
|
||||
}
|
||||
|
||||
spv::IdImmediate coord = { true, *(opIt++) };
|
||||
operands.push_back(coord);
|
||||
if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) {
|
||||
|
@ -6866,12 +7124,102 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
|||
case glslang::EOpConvUvec2ToAccStruct:
|
||||
unaryOp = spv::OpConvertUToAccelerationStructureKHR;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
unaryOp = spv::OpHitObjectIsEmptyNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
unaryOp = spv::OpHitObjectIsMissNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
unaryOp = spv::OpHitObjectIsHitNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectRayOriginNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectRayDirectionNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldRayOriginNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldRayDirectionNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
unaryOp = spv::OpHitObjectGetObjectToWorldNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
unaryOp = spv::OpHitObjectGetWorldToObjectNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
unaryOp = spv::OpHitObjectGetRayTMinNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
unaryOp = spv::OpHitObjectGetRayTMaxNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetPrimitiveIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
unaryOp = spv::OpHitObjectGetInstanceIdNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetInstanceCustomIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetGeometryIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
unaryOp = spv::OpHitObjectGetHitKindNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
unaryOp = spv::OpHitObjectGetCurrentTimeNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
unaryOp = spv::OpHitObjectGetShaderBindingTableRecordIndexNV;
|
||||
break;
|
||||
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV;
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
case glslang::EOpCopyObject:
|
||||
unaryOp = spv::OpCopyObject;
|
||||
break;
|
||||
|
||||
case glslang::EOpDepthAttachmentReadEXT:
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||
unaryOp = spv::OpDepthAttachmentReadEXT;
|
||||
decorations.precision = spv::NoPrecision;
|
||||
break;
|
||||
case glslang::EOpStencilAttachmentReadEXT:
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||
unaryOp = spv::OpStencilAttachmentReadEXT;
|
||||
decorations.precision = spv::DecorationRelaxedPrecision;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -8607,6 +8955,122 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||
case glslang::EOpCooperativeMatrixMulAdd:
|
||||
opCode = spv::OpCooperativeMatrixMulAddNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectTraceRayNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectTraceRayNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectTraceRayMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectTraceRayMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitWithIndexNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordMissNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordMissNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectRecordMissMotionNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectRecordMissMotionNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectExecuteShaderNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectExecuteShaderNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectIsEmptyNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsEmptyNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectIsMissNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsMissNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectIsHitNV:
|
||||
typeId = builder.makeBoolType();
|
||||
opCode = spv::OpHitObjectIsHitNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetRayTMinNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetRayTMinNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetRayTMaxNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetRayTMaxNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectRayOriginNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetObjectRayOriginNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectRayDirectionNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetObjectRayDirectionNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldRayOriginNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetWorldRayOriginNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldRayDirectionNV:
|
||||
typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
|
||||
opCode = spv::OpHitObjectGetWorldRayDirectionNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetWorldToObjectNV:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpHitObjectGetWorldToObjectNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetObjectToWorldNV:
|
||||
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
|
||||
opCode = spv::OpHitObjectGetObjectToWorldNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetInstanceCustomIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetInstanceCustomIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetInstanceIdNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetInstanceIdNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetGeometryIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetGeometryIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetPrimitiveIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 1);
|
||||
opCode = spv::OpHitObjectGetPrimitiveIndexNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetHitKindNV:
|
||||
typeId = builder.makeIntegerType(32, 0);
|
||||
opCode = spv::OpHitObjectGetHitKindNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetCurrentTimeNV:
|
||||
typeId = builder.makeFloatType(32);
|
||||
opCode = spv::OpHitObjectGetCurrentTimeNV;
|
||||
break;
|
||||
case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
typeId = builder.makeIntegerType(32, 0);
|
||||
opCode = spv::OpHitObjectGetShaderBindingTableRecordIndexNV;
|
||||
return 0;
|
||||
case glslang::EOpHitObjectGetAttributesNV:
|
||||
builder.createNoResultOp(spv::OpHitObjectGetAttributesNV, operands);
|
||||
return 0;
|
||||
case glslang::EOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
typeId = builder.makeVectorType(builder.makeUintType(32), 2);
|
||||
opCode = spv::OpHitObjectGetShaderRecordBufferHandleNV;
|
||||
break;
|
||||
case glslang::EOpReorderThreadNV: {
|
||||
if (operands.size() == 2) {
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHintNV, operands);
|
||||
} else {
|
||||
builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operands);
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
break;
|
||||
#endif // GLSLANG_WEB
|
||||
default:
|
||||
return 0;
|
||||
|
@ -8846,6 +9310,30 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
|||
return builder.createOp(spv::OpReadClockKHR, typeId, args);
|
||||
}
|
||||
#endif
|
||||
case glslang::EOpStencilAttachmentReadEXT:
|
||||
case glslang::EOpDepthAttachmentReadEXT:
|
||||
{
|
||||
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||
|
||||
spv::Decoration precision;
|
||||
spv::Op spv_op;
|
||||
if (op == glslang::EOpStencilAttachmentReadEXT)
|
||||
{
|
||||
precision = spv::DecorationRelaxedPrecision;
|
||||
spv_op = spv::OpStencilAttachmentReadEXT;
|
||||
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
precision = spv::NoPrecision;
|
||||
spv_op = spv::OpDepthAttachmentReadEXT;
|
||||
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||
}
|
||||
|
||||
std::vector<spv::Id> args; // Dummy args
|
||||
spv::Id result = builder.createOp(spv_op, typeId, args);
|
||||
return builder.setPrecision(result, precision);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -8916,13 +9404,17 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
}
|
||||
|
||||
if (symbol->getQualifier().hasLocation()) {
|
||||
if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing)
|
||||
if (!(glslangIntermediate->isRayTracingStage() &&
|
||||
(glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) ||
|
||||
glslangIntermediate->IsRequestedExtension(glslang::E_GL_NV_shader_invocation_reorder))
|
||||
&& (builder.getStorageClass(id) == spv::StorageClassRayPayloadKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingRayPayloadKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassCallableDataKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR))) {
|
||||
// Location values are used to link TraceRayKHR and ExecuteCallableKHR to corresponding variables
|
||||
// but are not valid in SPIRV since they are supported only for Input/Output Storage classes.
|
||||
builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR ||
|
||||
builder.getStorageClass(id) == spv::StorageClassHitObjectAttributeNV))) {
|
||||
// Location values are used to link TraceRayKHR/ExecuteCallableKHR/HitObjectGetAttributesNV
|
||||
// to corresponding variables but are not valid in SPIRV since they are supported only
|
||||
// for Input/Output Storage classes.
|
||||
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
||||
}
|
||||
}
|
||||
|
@ -8968,6 +9460,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
|
||||
// Add volatile decoration to HelperInvocation for spirv1.6 and beyond
|
||||
if (builtIn == spv::BuiltInHelperInvocation &&
|
||||
!glslangIntermediate->usingVulkanMemoryModel() &&
|
||||
glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) {
|
||||
builder.addDecoration(id, spv::DecorationVolatile);
|
||||
}
|
||||
|
@ -9060,10 +9553,10 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||
std::vector<spv::Id> operandIds;
|
||||
assert(!decorateId.second.empty());
|
||||
for (auto extraOperand : decorateId.second) {
|
||||
if (extraOperand->getQualifier().isSpecConstant())
|
||||
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||
else
|
||||
if (extraOperand->getQualifier().isFrontEndConstant())
|
||||
operandIds.push_back(createSpvConstant(*extraOperand));
|
||||
else
|
||||
operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode()));
|
||||
}
|
||||
builder.addDecorationId(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
|
||||
}
|
||||
|
@ -9559,7 +10052,7 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
|
|||
// Write SPIR-V out to a text file with 32-bit hexadecimal words
|
||||
void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, const char* varName)
|
||||
{
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
std::ofstream out;
|
||||
out.open(baseName, std::ios::binary | std::ios::out);
|
||||
if (out.fail())
|
||||
|
@ -9606,7 +10099,7 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>&
|
|||
{
|
||||
TIntermNode* root = intermediate.getTreeRoot();
|
||||
|
||||
if (root == 0)
|
||||
if (root == nullptr)
|
||||
return;
|
||||
|
||||
SpvOptions defaultOptions;
|
||||
|
|
|
@ -36,10 +36,6 @@
|
|||
#include "SPVRemapper.h"
|
||||
#include "doc.h"
|
||||
|
||||
#if !defined (use_cpp11)
|
||||
// ... not supported before C++11
|
||||
#else // defined (use_cpp11)
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include "../glslang/Include/Common.h"
|
||||
|
@ -1528,5 +1524,3 @@ namespace spv {
|
|||
|
||||
} // namespace SPV
|
||||
|
||||
#endif // defined (use_cpp11)
|
||||
|
||||
|
|
|
@ -43,12 +43,6 @@
|
|||
|
||||
namespace spv {
|
||||
|
||||
// MSVC defines __cplusplus as an older value, even when it supports almost all of 11.
|
||||
// We handle that here by making our own symbol.
|
||||
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700)
|
||||
# define use_cpp11 1
|
||||
#endif
|
||||
|
||||
class spirvbin_base_t
|
||||
{
|
||||
public:
|
||||
|
@ -74,27 +68,6 @@ public:
|
|||
|
||||
} // namespace SPV
|
||||
|
||||
#if !defined (use_cpp11)
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
|
||||
namespace spv {
|
||||
class spirvbin_t : public spirvbin_base_t
|
||||
{
|
||||
public:
|
||||
spirvbin_t(int /*verbose = 0*/) { }
|
||||
|
||||
void remap(std::vector<std::uint32_t>& /*spv*/, unsigned int /*opts = 0*/)
|
||||
{
|
||||
printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n");
|
||||
exit(5);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace SPV
|
||||
|
||||
#else // defined (use_cpp11)
|
||||
|
||||
#include <functional>
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
|
@ -308,5 +281,4 @@ private:
|
|||
|
||||
} // namespace SPV
|
||||
|
||||
#endif // defined (use_cpp11)
|
||||
#endif // SPIRVREMAPPER_H
|
||||
|
|
|
@ -71,9 +71,9 @@ Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogg
|
|||
addressModel(AddressingModelLogical),
|
||||
memoryModel(MemoryModelGLSL450),
|
||||
builderNumber(magicNumber),
|
||||
buildPoint(0),
|
||||
buildPoint(nullptr),
|
||||
uniqueId(0),
|
||||
entryPointFunction(0),
|
||||
entryPointFunction(nullptr),
|
||||
generatingOpCodeForSpecConst(false),
|
||||
logger(buildLogger)
|
||||
{
|
||||
|
@ -144,6 +144,7 @@ void Builder::addLine(Id fileName, int lineNum, int column)
|
|||
|
||||
void Builder::addDebugScopeAndLine(Id fileName, int lineNum, int column)
|
||||
{
|
||||
assert(!currentDebugScopeId.empty());
|
||||
if (currentDebugScopeId.top() != lastDebugScopeId) {
|
||||
spv::Id resultId = getUniqueId();
|
||||
Instruction* scopeInst = new Instruction(resultId, makeVoidType(), OpExtInst);
|
||||
|
@ -650,9 +651,13 @@ Id Builder::makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTyp
|
|||
type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic));
|
||||
type->addIdOperand(debugId[returnType]);
|
||||
for (auto const paramType : paramTypes) {
|
||||
assert(isPointerType(paramType) || isArrayType(paramType));
|
||||
if (isPointerType(paramType) || isArrayType(paramType)) {
|
||||
type->addIdOperand(debugId[getContainedTypeId(paramType)]);
|
||||
}
|
||||
else {
|
||||
type->addIdOperand(debugId[paramType]);
|
||||
}
|
||||
}
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
return typeId;
|
||||
|
@ -1067,6 +1072,12 @@ Id Builder::makeDebugCompilationUnit() {
|
|||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(sourceInst));
|
||||
module.mapInstruction(sourceInst);
|
||||
nonSemanticShaderCompilationUnitId = resultId;
|
||||
|
||||
// We can reasonably assume that makeDebugCompilationUnit will be called before any of
|
||||
// debug-scope stack. Function scopes and lexical scopes will occur afterward.
|
||||
assert(currentDebugScopeId.empty());
|
||||
currentDebugScopeId.push(nonSemanticShaderCompilationUnitId);
|
||||
|
||||
return resultId;
|
||||
}
|
||||
|
||||
|
@ -1096,6 +1107,8 @@ Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id c
|
|||
Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber)
|
||||
{
|
||||
assert(name != nullptr);
|
||||
assert(!currentDebugScopeId.empty());
|
||||
|
||||
Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst);
|
||||
inst->addIdOperand(nonSemanticShaderDebugInfo);
|
||||
inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLocalVariable);
|
||||
|
@ -1176,6 +1189,21 @@ Id Builder::makeRayQueryType()
|
|||
|
||||
return type->getResultId();
|
||||
}
|
||||
|
||||
Id Builder::makeHitObjectNVType()
|
||||
{
|
||||
Instruction *type;
|
||||
if (groupedTypes[OpTypeHitObjectNV].size() == 0) {
|
||||
type = new Instruction(getUniqueId(), NoType, OpTypeHitObjectNV);
|
||||
groupedTypes[OpTypeHitObjectNV].push_back(type);
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||
module.mapInstruction(type);
|
||||
} else {
|
||||
type = groupedTypes[OpTypeHitObjectNV].back();
|
||||
}
|
||||
|
||||
return type->getResultId();
|
||||
}
|
||||
#endif
|
||||
|
||||
Id Builder::getDerefTypeId(Id resultId) const
|
||||
|
@ -1675,7 +1703,7 @@ Id Builder::importNonSemanticShaderDebugInfoInstructions()
|
|||
|
||||
Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector<Id>& comps)
|
||||
{
|
||||
Instruction* constant = 0;
|
||||
Instruction* constant = nullptr;
|
||||
bool found = false;
|
||||
for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) {
|
||||
constant = groupedConstants[typeClass][i];
|
||||
|
@ -1702,7 +1730,7 @@ Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector<Id>
|
|||
|
||||
Id Builder::findStructConstant(Id typeId, const std::vector<Id>& comps)
|
||||
{
|
||||
Instruction* constant = 0;
|
||||
Instruction* constant = nullptr;
|
||||
bool found = false;
|
||||
for (int i = 0; i < (int)groupedStructConstants[typeId].size(); ++i) {
|
||||
constant = groupedStructConstants[typeId][i];
|
||||
|
@ -2047,11 +2075,16 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const
|
|||
assert(paramTypes.size() == paramNames.size());
|
||||
for(size_t p = 0; p < paramTypes.size(); ++p)
|
||||
{
|
||||
auto const& paramType = paramTypes[p];
|
||||
assert(isPointerType(paramType) || isArrayType(paramType));
|
||||
assert(debugId[getContainedTypeId(paramType)] != 0);
|
||||
auto getParamTypeId = [this](Id const& typeId) {
|
||||
if (isPointerType(typeId) || isArrayType(typeId)) {
|
||||
return getContainedTypeId(typeId);
|
||||
}
|
||||
else {
|
||||
return typeId;
|
||||
}
|
||||
};
|
||||
auto const& paramName = paramNames[p];
|
||||
auto const debugLocalVariableId = createDebugLocalVariable(debugId[getContainedTypeId(paramType)], paramName, p+1);
|
||||
auto const debugLocalVariableId = createDebugLocalVariable(debugId[getParamTypeId(paramTypes[p])], paramName, p+1);
|
||||
debugId[firstParamId + p] = debugLocalVariableId;
|
||||
|
||||
makeDebugDeclare(debugLocalVariableId, firstParamId + p);
|
||||
|
@ -2095,6 +2128,8 @@ Id Builder::makeDebugFunction(Function* function, Id nameId, Id funcTypeId) {
|
|||
}
|
||||
|
||||
Id Builder::makeDebugLexicalBlock(uint32_t line) {
|
||||
assert(!currentDebugScopeId.empty());
|
||||
|
||||
Id lexId = getUniqueId();
|
||||
auto lex = new Instruction(lexId, makeVoidType(), OpExtInst);
|
||||
lex->addIdOperand(nonSemanticShaderDebugInfo);
|
||||
|
@ -2734,52 +2769,49 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const
|
|||
Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather,
|
||||
bool noImplicitLod, const TextureParameters& parameters, ImageOperandsMask signExtensionMask)
|
||||
{
|
||||
static const int maxTextureArgs = 10;
|
||||
Id texArgs[maxTextureArgs] = {};
|
||||
std::vector<Id> texArgs;
|
||||
|
||||
//
|
||||
// Set up the fixed arguments
|
||||
//
|
||||
int numArgs = 0;
|
||||
bool explicitLod = false;
|
||||
texArgs[numArgs++] = parameters.sampler;
|
||||
texArgs[numArgs++] = parameters.coords;
|
||||
texArgs.push_back(parameters.sampler);
|
||||
texArgs.push_back(parameters.coords);
|
||||
if (parameters.Dref != NoResult)
|
||||
texArgs[numArgs++] = parameters.Dref;
|
||||
texArgs.push_back(parameters.Dref);
|
||||
if (parameters.component != NoResult)
|
||||
texArgs[numArgs++] = parameters.component;
|
||||
texArgs.push_back(parameters.component);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (parameters.granularity != NoResult)
|
||||
texArgs[numArgs++] = parameters.granularity;
|
||||
texArgs.push_back(parameters.granularity);
|
||||
if (parameters.coarse != NoResult)
|
||||
texArgs[numArgs++] = parameters.coarse;
|
||||
texArgs.push_back(parameters.coarse);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set up the optional arguments
|
||||
//
|
||||
int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments
|
||||
++numArgs; // speculatively make room for the mask operand
|
||||
size_t optArgNum = texArgs.size(); // the position of the mask for the optional arguments, if any.
|
||||
ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand
|
||||
if (parameters.bias) {
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask);
|
||||
texArgs[numArgs++] = parameters.bias;
|
||||
texArgs.push_back(parameters.bias);
|
||||
}
|
||||
if (parameters.lod) {
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
|
||||
texArgs[numArgs++] = parameters.lod;
|
||||
texArgs.push_back(parameters.lod);
|
||||
explicitLod = true;
|
||||
} else if (parameters.gradX) {
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsGradMask);
|
||||
texArgs[numArgs++] = parameters.gradX;
|
||||
texArgs[numArgs++] = parameters.gradY;
|
||||
texArgs.push_back(parameters.gradX);
|
||||
texArgs.push_back(parameters.gradY);
|
||||
explicitLod = true;
|
||||
} else if (noImplicitLod && ! fetch && ! gather) {
|
||||
// have to explicitly use lod of 0 if not allowed to have them be implicit, and
|
||||
// we would otherwise be about to issue an implicit instruction
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsLodMask);
|
||||
texArgs[numArgs++] = makeFloatConstant(0.0);
|
||||
texArgs.push_back(makeFloatConstant(0.0));
|
||||
explicitLod = true;
|
||||
}
|
||||
if (parameters.offset) {
|
||||
|
@ -2789,24 +2821,24 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||
addCapability(CapabilityImageGatherExtended);
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask);
|
||||
}
|
||||
texArgs[numArgs++] = parameters.offset;
|
||||
texArgs.push_back(parameters.offset);
|
||||
}
|
||||
if (parameters.offsets) {
|
||||
addCapability(CapabilityImageGatherExtended);
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask);
|
||||
texArgs[numArgs++] = parameters.offsets;
|
||||
texArgs.push_back(parameters.offsets);
|
||||
}
|
||||
#ifndef GLSLANG_WEB
|
||||
if (parameters.sample) {
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask);
|
||||
texArgs[numArgs++] = parameters.sample;
|
||||
texArgs.push_back(parameters.sample);
|
||||
}
|
||||
if (parameters.lodClamp) {
|
||||
// capability if this bit is used
|
||||
addCapability(CapabilityMinLod);
|
||||
|
||||
mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask);
|
||||
texArgs[numArgs++] = parameters.lodClamp;
|
||||
texArgs.push_back(parameters.lodClamp);
|
||||
}
|
||||
if (parameters.nonprivate) {
|
||||
mask = mask | ImageOperandsNonPrivateTexelKHRMask;
|
||||
|
@ -2816,10 +2848,9 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||
}
|
||||
#endif
|
||||
mask = mask | signExtensionMask;
|
||||
if (mask == ImageOperandsMaskNone)
|
||||
--numArgs; // undo speculative reservation for the mask argument
|
||||
else
|
||||
texArgs[optArgNum] = mask;
|
||||
// insert the operand for the mask, if any bits were set.
|
||||
if (mask != ImageOperandsMaskNone)
|
||||
texArgs.insert(texArgs.begin() + optArgNum, mask);
|
||||
|
||||
//
|
||||
// Set up the instruction
|
||||
|
@ -2923,11 +2954,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse,
|
|||
|
||||
// Build the SPIR-V instruction
|
||||
Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
|
||||
for (int op = 0; op < optArgNum; ++op)
|
||||
for (size_t op = 0; op < optArgNum; ++op)
|
||||
textureInst->addIdOperand(texArgs[op]);
|
||||
if (optArgNum < numArgs)
|
||||
if (optArgNum < texArgs.size())
|
||||
textureInst->addImmediateOperand(texArgs[optArgNum]);
|
||||
for (int op = optArgNum + 1; op < numArgs; ++op)
|
||||
for (size_t op = optArgNum + 1; op < texArgs.size(); ++op)
|
||||
textureInst->addIdOperand(texArgs[op]);
|
||||
setPrecision(textureInst->getResultId(), precision);
|
||||
buildPoint->addInstruction(std::unique_ptr<Instruction>(textureInst));
|
||||
|
@ -3332,7 +3363,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) :
|
|||
builder(gb),
|
||||
condition(cond),
|
||||
control(ctrl),
|
||||
elseBlock(0)
|
||||
elseBlock(nullptr)
|
||||
{
|
||||
function = &builder.getBuildPoint()->getParent();
|
||||
|
||||
|
|
|
@ -240,6 +240,8 @@ public:
|
|||
Id makeAccelerationStructureType();
|
||||
// rayQueryEXT type
|
||||
Id makeRayQueryType();
|
||||
// hitObjectNV type
|
||||
Id makeHitObjectNVType();
|
||||
|
||||
// For querying about types.
|
||||
Id getTypeId(Id resultId) const { return module.getTypeId(resultId); }
|
||||
|
@ -414,7 +416,7 @@ public:
|
|||
// The returned pointer is only valid for the lifetime of this builder.
|
||||
Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name,
|
||||
const std::vector<Id>& paramTypes, const std::vector<char const*>& paramNames,
|
||||
const std::vector<std::vector<Decoration>>& precisions, Block **entry = 0);
|
||||
const std::vector<std::vector<Decoration>>& precisions, Block **entry = nullptr);
|
||||
|
||||
// Create a return. An 'implicit' return is one not appearing in the source
|
||||
// code. In the case of an implicit return, no post-return block is inserted.
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace spv {
|
|||
#include "GLSL.ext.EXT.h"
|
||||
#include "GLSL.ext.AMD.h"
|
||||
#include "GLSL.ext.NV.h"
|
||||
#include "GLSL.ext.ARM.h"
|
||||
}
|
||||
|
||||
namespace spv {
|
||||
|
|
|
@ -212,8 +212,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
|
|||
optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass());
|
||||
if (options->optimizeSize) {
|
||||
optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass());
|
||||
if (intermediate.getStage() == EShLanguage::EShLangVertex)
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsSafePass());
|
||||
}
|
||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
||||
optimizer.RegisterPass(spvtools::CreateCFGCleanupPass());
|
||||
|
@ -224,6 +223,56 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector
|
|||
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
|
||||
}
|
||||
|
||||
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
std::unordered_set<uint32_t>* live_locs,
|
||||
std::unordered_set<uint32_t>* live_builtins,
|
||||
spv::SpvBuildLogger*)
|
||||
{
|
||||
spvtools::Optimizer optimizer(target_env);
|
||||
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
|
||||
|
||||
optimizer.RegisterPass(spvtools::CreateAnalyzeLiveInputPass(live_locs, live_builtins));
|
||||
|
||||
spvtools::OptimizerOptions spvOptOptions;
|
||||
optimizer.SetTargetEnv(target_env);
|
||||
spvOptOptions.set_run_validator(false);
|
||||
return optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
|
||||
}
|
||||
|
||||
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
std::unordered_set<uint32_t>* live_locs,
|
||||
std::unordered_set<uint32_t>* live_builtins,
|
||||
spv::SpvBuildLogger*)
|
||||
{
|
||||
spvtools::Optimizer optimizer(target_env);
|
||||
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
|
||||
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputStoresPass(live_locs, live_builtins));
|
||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputComponentsPass());
|
||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true));
|
||||
|
||||
spvtools::OptimizerOptions spvOptOptions;
|
||||
optimizer.SetTargetEnv(target_env);
|
||||
spvOptOptions.set_run_validator(false);
|
||||
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
|
||||
}
|
||||
|
||||
void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
spv::SpvBuildLogger*)
|
||||
{
|
||||
spvtools::Optimizer optimizer(target_env);
|
||||
optimizer.SetMessageConsumer(OptimizerMesssageConsumer);
|
||||
|
||||
optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass());
|
||||
optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass());
|
||||
|
||||
spvtools::OptimizerOptions spvOptOptions;
|
||||
optimizer.SetTargetEnv(target_env);
|
||||
spvOptOptions.set_run_validator(false);
|
||||
optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions);
|
||||
}
|
||||
|
||||
// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
|
||||
// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
|
||||
// optimization is disabled.
|
||||
|
|
|
@ -65,6 +65,9 @@ struct SpvOptions {
|
|||
|
||||
#if ENABLE_OPT
|
||||
|
||||
// Translate glslang's view of target versioning to what SPIRV-Tools uses.
|
||||
spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, spv::SpvBuildLogger* logger);
|
||||
|
||||
// Use the SPIRV-Tools disassembler to print SPIR-V using a SPV_ENV_UNIVERSAL_1_3 environment.
|
||||
void SpirvToolsDisassemble(std::ostream& out, const std::vector<unsigned int>& spirv);
|
||||
|
||||
|
@ -80,6 +83,22 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector<
|
|||
void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector<unsigned int>& spirv,
|
||||
spv::SpvBuildLogger*, const SpvOptions*);
|
||||
|
||||
// Apply the SPIRV-Tools EliminateDeadInputComponents pass to generated SPIR-V. Put result in |spirv|.
|
||||
void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
spv::SpvBuildLogger*);
|
||||
|
||||
// Apply the SPIRV-Tools AnalyzeDeadOutputStores pass to generated SPIR-V. Put result in |live_locs|.
|
||||
// Return true if the result is valid.
|
||||
bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
std::unordered_set<uint32_t>* live_locs,
|
||||
std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
|
||||
|
||||
// Apply the SPIRV-Tools EliminateDeadOutputStores and AggressiveDeadCodeElimination passes to generated SPIR-V using
|
||||
// |live_locs|. Put result in |spirv|.
|
||||
void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector<unsigned int>& spirv,
|
||||
std::unordered_set<uint32_t>* live_locs,
|
||||
std::unordered_set<uint32_t>* live_builtins, spv::SpvBuildLogger*);
|
||||
|
||||
// Apply the SPIRV-Tools optimizer to strip debug info from SPIR-V. This is implicitly done by
|
||||
// SpirvToolsTransform if spvOptions->stripDebugInfo is set, but can be called separately if
|
||||
// optimization is disabled.
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace spv {
|
|||
#include "GLSL.std.450.h"
|
||||
#include "GLSL.ext.AMD.h"
|
||||
#include "GLSL.ext.NV.h"
|
||||
#include "GLSL.ext.ARM.h"
|
||||
#include "NonSemanticShaderDebugInfo100.h"
|
||||
}
|
||||
}
|
||||
const char* GlslStd450DebugNames[spv::GLSLstd450Count];
|
||||
|
@ -62,6 +64,7 @@ namespace spv {
|
|||
|
||||
static const char* GLSLextAMDGetDebugNames(const char*, unsigned);
|
||||
static const char* GLSLextNVGetDebugNames(const char*, unsigned);
|
||||
static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned);
|
||||
|
||||
static void Kill(std::ostream& out, const char* message)
|
||||
{
|
||||
|
@ -76,6 +79,7 @@ enum ExtInstSet {
|
|||
GLSLextNVInst,
|
||||
OpenCLExtInst,
|
||||
NonSemanticDebugPrintfExtInst,
|
||||
NonSemanticShaderDebugInfo100
|
||||
};
|
||||
|
||||
// Container class for a single instance of a SPIR-V stream, with methods for disassembly.
|
||||
|
@ -501,6 +505,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
extInstSet = OpenCLExtInst;
|
||||
} else if (strcmp("NonSemantic.DebugPrintf", name) == 0) {
|
||||
extInstSet = NonSemanticDebugPrintfExtInst;
|
||||
} else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) {
|
||||
extInstSet = NonSemanticShaderDebugInfo100;
|
||||
} else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 ||
|
||||
strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 ||
|
||||
strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 ||
|
||||
|
@ -526,6 +532,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
|
|||
out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")";
|
||||
} else if (extInstSet == NonSemanticDebugPrintfExtInst) {
|
||||
out << "(DebugPrintf)";
|
||||
} else if (extInstSet == NonSemanticShaderDebugInfo100) {
|
||||
out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")";
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -749,6 +757,59 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint)
|
|||
return "Bad";
|
||||
}
|
||||
|
||||
static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint)
|
||||
{
|
||||
switch (entrypoint) {
|
||||
case NonSemanticShaderDebugInfo100DebugInfoNone: return "DebugInfoNone";
|
||||
case NonSemanticShaderDebugInfo100DebugCompilationUnit: return "DebugCompilationUnit";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeBasic: return "DebugTypeBasic";
|
||||
case NonSemanticShaderDebugInfo100DebugTypePointer: return "DebugTypePointer";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeQualifier: return "DebugTypeQualifier";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeArray: return "DebugTypeArray";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeVector: return "DebugTypeVector";
|
||||
case NonSemanticShaderDebugInfo100DebugTypedef: return "DebugTypedef";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeFunction: return "DebugTypeFunction";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeEnum: return "DebugTypeEnum";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeComposite: return "DebugTypeComposite";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeMember: return "DebugTypeMember";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeInheritance: return "DebugTypeInheritance";
|
||||
case NonSemanticShaderDebugInfo100DebugTypePtrToMember: return "DebugTypePtrToMember";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeTemplate: return "DebugTypeTemplate";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: return "DebugTypeTemplateParameter";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: return "DebugTypeTemplateTemplateParameter";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: return "DebugTypeTemplateParameterPack";
|
||||
case NonSemanticShaderDebugInfo100DebugGlobalVariable: return "DebugGlobalVariable";
|
||||
case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: return "DebugFunctionDeclaration";
|
||||
case NonSemanticShaderDebugInfo100DebugFunction: return "DebugFunction";
|
||||
case NonSemanticShaderDebugInfo100DebugLexicalBlock: return "DebugLexicalBlock";
|
||||
case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: return "DebugLexicalBlockDiscriminator";
|
||||
case NonSemanticShaderDebugInfo100DebugScope: return "DebugScope";
|
||||
case NonSemanticShaderDebugInfo100DebugNoScope: return "DebugNoScope";
|
||||
case NonSemanticShaderDebugInfo100DebugInlinedAt: return "DebugInlinedAt";
|
||||
case NonSemanticShaderDebugInfo100DebugLocalVariable: return "DebugLocalVariable";
|
||||
case NonSemanticShaderDebugInfo100DebugInlinedVariable: return "DebugInlinedVariable";
|
||||
case NonSemanticShaderDebugInfo100DebugDeclare: return "DebugDeclare";
|
||||
case NonSemanticShaderDebugInfo100DebugValue: return "DebugValue";
|
||||
case NonSemanticShaderDebugInfo100DebugOperation: return "DebugOperation";
|
||||
case NonSemanticShaderDebugInfo100DebugExpression: return "DebugExpression";
|
||||
case NonSemanticShaderDebugInfo100DebugMacroDef: return "DebugMacroDef";
|
||||
case NonSemanticShaderDebugInfo100DebugMacroUndef: return "DebugMacroUndef";
|
||||
case NonSemanticShaderDebugInfo100DebugImportedEntity: return "DebugImportedEntity";
|
||||
case NonSemanticShaderDebugInfo100DebugSource: return "DebugSource";
|
||||
case NonSemanticShaderDebugInfo100DebugFunctionDefinition: return "DebugFunctionDefinition";
|
||||
case NonSemanticShaderDebugInfo100DebugSourceContinued: return "DebugSourceContinued";
|
||||
case NonSemanticShaderDebugInfo100DebugLine: return "DebugLine";
|
||||
case NonSemanticShaderDebugInfo100DebugNoLine: return "DebugNoLine";
|
||||
case NonSemanticShaderDebugInfo100DebugBuildIdentifier: return "DebugBuildIdentifier";
|
||||
case NonSemanticShaderDebugInfo100DebugStoragePath: return "DebugStoragePath";
|
||||
case NonSemanticShaderDebugInfo100DebugEntryPoint: return "DebugEntryPoint";
|
||||
case NonSemanticShaderDebugInfo100DebugTypeMatrix: return "DebugTypeMatrix";
|
||||
default: return "Bad";
|
||||
}
|
||||
|
||||
return "Bad";
|
||||
}
|
||||
|
||||
void Disassemble(std::ostream& out, const std::vector<unsigned int>& stream)
|
||||
{
|
||||
SpirvStream SpirvStream(out, stream);
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace spv {
|
|||
#include "GLSL.ext.EXT.h"
|
||||
#include "GLSL.ext.AMD.h"
|
||||
#include "GLSL.ext.NV.h"
|
||||
#include "GLSL.ext.ARM.h"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,6 +215,10 @@ const char* ExecutionModeString(int mode)
|
|||
case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL";
|
||||
case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL";
|
||||
|
||||
case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT";
|
||||
case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT";
|
||||
case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT";
|
||||
|
||||
case ExecutionModeCeiling:
|
||||
default: return "Bad";
|
||||
}
|
||||
|
@ -245,6 +250,8 @@ const char* StorageClassString(int StorageClass)
|
|||
|
||||
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
||||
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
|
||||
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
|
||||
case StorageClassTileImageEXT: return "TileImageEXT";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
|
@ -319,6 +326,8 @@ const char* DecorationString(int decoration)
|
|||
case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE";
|
||||
case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT";
|
||||
case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT";
|
||||
|
||||
case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,6 +409,7 @@ const char* BuiltInString(int builtIn)
|
|||
case BuiltInRayTminKHR: return "RayTminKHR";
|
||||
case BuiltInRayTmaxKHR: return "RayTmaxKHR";
|
||||
case BuiltInCullMaskKHR: return "CullMaskKHR";
|
||||
case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR";
|
||||
case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR";
|
||||
case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR";
|
||||
case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR";
|
||||
|
@ -439,6 +449,11 @@ const char* BuiltInString(int builtIn)
|
|||
case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT";
|
||||
case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT";
|
||||
case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT";
|
||||
case BuiltInCoreCountARM: return "CoreCountARM";
|
||||
case BuiltInCoreIDARM: return "CoreIDARM";
|
||||
case BuiltInCoreMaxIDARM: return "CoreMaxIDARM";
|
||||
case BuiltInWarpIDARM: return "WarpIDARM";
|
||||
case BuiltInWarpMaxIDARM: return "BuiltInWarpMaxIDARM";
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
|
@ -454,6 +469,7 @@ const char* DimensionString(int dim)
|
|||
case 4: return "Rect";
|
||||
case 5: return "Buffer";
|
||||
case 6: return "SubpassData";
|
||||
case DimTileImageDataEXT: return "TileImageDataEXT";
|
||||
|
||||
default: return "Bad";
|
||||
}
|
||||
|
@ -941,6 +957,8 @@ const char* CapabilityString(int info)
|
|||
case CapabilityRayQueryKHR: return "RayQueryKHR";
|
||||
case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR";
|
||||
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
|
||||
case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR";
|
||||
case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR";
|
||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||
case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV";
|
||||
case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR";
|
||||
|
@ -980,6 +998,10 @@ const char* CapabilityString(int info)
|
|||
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
|
||||
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
|
||||
|
||||
case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT";
|
||||
case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT";
|
||||
case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT";
|
||||
|
||||
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
||||
|
||||
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
||||
|
@ -998,7 +1020,9 @@ const char* CapabilityString(int info)
|
|||
case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
|
||||
case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
|
||||
case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR";
|
||||
case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM";
|
||||
|
||||
case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV";
|
||||
default: return "Bad";
|
||||
}
|
||||
}
|
||||
|
@ -1441,6 +1465,7 @@ const char* OpcodeString(int op)
|
|||
case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR";
|
||||
case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR";
|
||||
case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR";
|
||||
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR";
|
||||
|
||||
case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV";
|
||||
case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV";
|
||||
|
@ -1453,6 +1478,44 @@ const char* OpcodeString(int op)
|
|||
case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT";
|
||||
case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT";
|
||||
|
||||
case OpTypeHitObjectNV: return "OpTypeHitObjectNV";
|
||||
case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV";
|
||||
case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV";
|
||||
case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV";
|
||||
case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV";
|
||||
case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV";
|
||||
case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV";
|
||||
case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV";
|
||||
case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV";
|
||||
case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV";
|
||||
case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV";
|
||||
case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV";
|
||||
case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV";
|
||||
case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV";
|
||||
case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV";
|
||||
case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV";
|
||||
case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV";
|
||||
case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV";
|
||||
case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV";
|
||||
case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV";
|
||||
case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV";
|
||||
case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV";
|
||||
case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV";
|
||||
case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV";
|
||||
case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV";
|
||||
case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV";
|
||||
case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV";
|
||||
case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV";
|
||||
case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV";
|
||||
case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV";
|
||||
case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV";
|
||||
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
|
||||
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
|
||||
|
||||
case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT";
|
||||
case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT";
|
||||
case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT";
|
||||
|
||||
default:
|
||||
return "Bad";
|
||||
}
|
||||
|
@ -1607,7 +1670,7 @@ void Parameterize()
|
|||
DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'");
|
||||
DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'");
|
||||
|
||||
OperandClassParams[OperandSource].set(0, SourceString, 0);
|
||||
OperandClassParams[OperandSource].set(0, SourceString, nullptr);
|
||||
OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr);
|
||||
OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr);
|
||||
OperandClassParams[OperandMemory].set(0, MemoryString, nullptr);
|
||||
|
@ -1639,7 +1702,7 @@ void Parameterize()
|
|||
OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
|
||||
OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
|
||||
OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
|
||||
OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0);
|
||||
OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr);
|
||||
|
||||
// set name of operator, an initial set of <id> style operands, and the description
|
||||
|
||||
|
@ -2980,6 +3043,10 @@ void Parameterize()
|
|||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'");
|
||||
InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'");
|
||||
InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'");
|
||||
|
@ -3030,6 +3097,196 @@ void Parameterize()
|
|||
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
|
||||
|
||||
InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false);
|
||||
|
||||
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'");
|
||||
InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'");
|
||||
InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'");
|
||||
InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true);
|
||||
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'");
|
||||
InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'");
|
||||
InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'");
|
||||
InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
|
||||
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
|
||||
|
||||
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'");
|
||||
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||
InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||
InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||
}
|
||||
|
||||
}; // end spv namespace
|
||||
|
|
|
@ -190,7 +190,7 @@ protected:
|
|||
// Parameterize an enumerant
|
||||
class EnumParameters {
|
||||
public:
|
||||
EnumParameters() : desc(0) { }
|
||||
EnumParameters() : desc(nullptr) { }
|
||||
const char* desc;
|
||||
};
|
||||
|
||||
|
@ -198,7 +198,7 @@ public:
|
|||
class EnumDefinition : public EnumParameters {
|
||||
public:
|
||||
EnumDefinition() :
|
||||
ceiling(0), bitmask(false), getName(0), enumParams(0), operandParams(0) { }
|
||||
ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { }
|
||||
void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false)
|
||||
{
|
||||
ceiling = ceil;
|
||||
|
|
|
@ -23,19 +23,6 @@
|
|||
#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
namespace std {
|
||||
bool isnan(double f)
|
||||
{
|
||||
return ::_isnan(f) != 0;
|
||||
}
|
||||
bool isinf(double f)
|
||||
{
|
||||
return ::_finite(f) == 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "bitutils.h"
|
||||
|
||||
namespace spvutils {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
// the Binary Section of the SPIR-V specification.
|
||||
|
||||
// Enumeration tokens for SPIR-V, in various styles:
|
||||
// C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
// C, C++, C++11, JSON, Lua, Python, C#, D, Beef
|
||||
//
|
||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
|
@ -36,6 +36,8 @@
|
|||
// - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
// - Beef will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
// e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
//
|
||||
// Some tokens act like mask values, which can be OR'd together,
|
||||
// while others are mutually exclusive. The mask-like ones have
|
||||
|
@ -66,6 +68,7 @@ enum SourceLanguage {
|
|||
SourceLanguageOpenCL_CPP = 4,
|
||||
SourceLanguageHLSL = 5,
|
||||
SourceLanguageCPP_for_OpenCL = 6,
|
||||
SourceLanguageSYCL = 7,
|
||||
SourceLanguageMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -153,6 +156,9 @@ enum ExecutionMode {
|
|||
ExecutionModeSubgroupsPerWorkgroupId = 37,
|
||||
ExecutionModeLocalSizeId = 38,
|
||||
ExecutionModeLocalSizeHintId = 39,
|
||||
ExecutionModeNonCoherentColorAttachmentReadEXT = 4169,
|
||||
ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170,
|
||||
ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171,
|
||||
ExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
||||
ExecutionModePostDepthCoverage = 4446,
|
||||
ExecutionModeDenormPreserve = 4459,
|
||||
|
@ -192,6 +198,8 @@ enum ExecutionMode {
|
|||
ExecutionModeNoGlobalOffsetINTEL = 5895,
|
||||
ExecutionModeNumSIMDWorkitemsINTEL = 5896,
|
||||
ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
|
||||
ExecutionModeStreamingInterfaceINTEL = 6154,
|
||||
ExecutionModeNamedBarrierCountINTEL = 6417,
|
||||
ExecutionModeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -209,6 +217,7 @@ enum StorageClass {
|
|||
StorageClassAtomicCounter = 10,
|
||||
StorageClassImage = 11,
|
||||
StorageClassStorageBuffer = 12,
|
||||
StorageClassTileImageEXT = 4172,
|
||||
StorageClassCallableDataKHR = 5328,
|
||||
StorageClassCallableDataNV = 5328,
|
||||
StorageClassIncomingCallableDataKHR = 5329,
|
||||
|
@ -223,6 +232,7 @@ enum StorageClass {
|
|||
StorageClassShaderRecordBufferNV = 5343,
|
||||
StorageClassPhysicalStorageBuffer = 5349,
|
||||
StorageClassPhysicalStorageBufferEXT = 5349,
|
||||
StorageClassHitObjectAttributeNV = 5385,
|
||||
StorageClassTaskPayloadWorkgroupEXT = 5402,
|
||||
StorageClassCodeSectionINTEL = 5605,
|
||||
StorageClassDeviceOnlyINTEL = 5936,
|
||||
|
@ -238,6 +248,7 @@ enum Dim {
|
|||
DimRect = 4,
|
||||
DimBuffer = 5,
|
||||
DimSubpassData = 6,
|
||||
DimTileImageDataEXT = 4173,
|
||||
DimMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -448,6 +459,7 @@ enum FunctionParameterAttribute {
|
|||
FunctionParameterAttributeNoCapture = 5,
|
||||
FunctionParameterAttributeNoWrite = 6,
|
||||
FunctionParameterAttributeNoReadWrite = 7,
|
||||
FunctionParameterAttributeRuntimeAlignedINTEL = 5940,
|
||||
FunctionParameterAttributeMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -518,6 +530,7 @@ enum Decoration {
|
|||
DecorationRestrictPointerEXT = 5355,
|
||||
DecorationAliasedPointer = 5356,
|
||||
DecorationAliasedPointerEXT = 5356,
|
||||
DecorationHitObjectShaderRecordBufferNV = 5386,
|
||||
DecorationBindlessSamplerNV = 5398,
|
||||
DecorationBindlessImageNV = 5399,
|
||||
DecorationBoundSamplerNV = 5400,
|
||||
|
@ -556,12 +569,27 @@ enum Decoration {
|
|||
DecorationPrefetchINTEL = 5902,
|
||||
DecorationStallEnableINTEL = 5905,
|
||||
DecorationFuseLoopsInFunctionINTEL = 5907,
|
||||
DecorationMathOpDSPModeINTEL = 5909,
|
||||
DecorationAliasScopeINTEL = 5914,
|
||||
DecorationNoAliasINTEL = 5915,
|
||||
DecorationInitiationIntervalINTEL = 5917,
|
||||
DecorationMaxConcurrencyINTEL = 5918,
|
||||
DecorationPipelineEnableINTEL = 5919,
|
||||
DecorationBufferLocationINTEL = 5921,
|
||||
DecorationIOPipeStorageINTEL = 5944,
|
||||
DecorationFunctionFloatingPointModeINTEL = 6080,
|
||||
DecorationSingleElementVectorINTEL = 6085,
|
||||
DecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||
DecorationMediaBlockIOINTEL = 6140,
|
||||
DecorationConduitKernelArgumentINTEL = 6175,
|
||||
DecorationRegisterMapKernelArgumentINTEL = 6176,
|
||||
DecorationMMHostInterfaceAddressWidthINTEL = 6177,
|
||||
DecorationMMHostInterfaceDataWidthINTEL = 6178,
|
||||
DecorationMMHostInterfaceLatencyINTEL = 6179,
|
||||
DecorationMMHostInterfaceReadWriteModeINTEL = 6180,
|
||||
DecorationMMHostInterfaceMaxBurstINTEL = 6181,
|
||||
DecorationMMHostInterfaceWaitRequestINTEL = 6182,
|
||||
DecorationStableKernelArgumentINTEL = 6183,
|
||||
DecorationMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -607,6 +635,11 @@ enum BuiltIn {
|
|||
BuiltInSubgroupLocalInvocationId = 41,
|
||||
BuiltInVertexIndex = 42,
|
||||
BuiltInInstanceIndex = 43,
|
||||
BuiltInCoreIDARM = 4160,
|
||||
BuiltInCoreCountARM = 4161,
|
||||
BuiltInCoreMaxIDARM = 4162,
|
||||
BuiltInWarpIDARM = 4163,
|
||||
BuiltInWarpMaxIDARM = 4164,
|
||||
BuiltInSubgroupEqMask = 4416,
|
||||
BuiltInSubgroupEqMaskKHR = 4416,
|
||||
BuiltInSubgroupGeMask = 4417,
|
||||
|
@ -684,6 +717,7 @@ enum BuiltIn {
|
|||
BuiltInHitKindKHR = 5333,
|
||||
BuiltInHitKindNV = 5333,
|
||||
BuiltInCurrentRayTimeNV = 5334,
|
||||
BuiltInHitTriangleVertexPositionsKHR = 5335,
|
||||
BuiltInIncomingRayFlagsKHR = 5351,
|
||||
BuiltInIncomingRayFlagsNV = 5351,
|
||||
BuiltInRayGeometryIndexKHR = 5352,
|
||||
|
@ -725,6 +759,8 @@ enum LoopControlShift {
|
|||
LoopControlMaxInterleavingINTELShift = 21,
|
||||
LoopControlSpeculatedIterationsINTELShift = 22,
|
||||
LoopControlNoFusionINTELShift = 23,
|
||||
LoopControlLoopCountINTELShift = 24,
|
||||
LoopControlMaxReinvocationDelayINTELShift = 25,
|
||||
LoopControlMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -747,6 +783,8 @@ enum LoopControlMask {
|
|||
LoopControlMaxInterleavingINTELMask = 0x00200000,
|
||||
LoopControlSpeculatedIterationsINTELMask = 0x00400000,
|
||||
LoopControlNoFusionINTELMask = 0x00800000,
|
||||
LoopControlLoopCountINTELMask = 0x01000000,
|
||||
LoopControlMaxReinvocationDelayINTELMask = 0x02000000,
|
||||
};
|
||||
|
||||
enum FunctionControlShift {
|
||||
|
@ -819,6 +857,8 @@ enum MemoryAccessShift {
|
|||
MemoryAccessMakePointerVisibleKHRShift = 4,
|
||||
MemoryAccessNonPrivatePointerShift = 5,
|
||||
MemoryAccessNonPrivatePointerKHRShift = 5,
|
||||
MemoryAccessAliasScopeINTELMaskShift = 16,
|
||||
MemoryAccessNoAliasINTELMaskShift = 17,
|
||||
MemoryAccessMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -833,6 +873,8 @@ enum MemoryAccessMask {
|
|||
MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
|
||||
MemoryAccessNonPrivatePointerMask = 0x00000020,
|
||||
MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
|
||||
MemoryAccessAliasScopeINTELMaskMask = 0x00010000,
|
||||
MemoryAccessNoAliasINTELMaskMask = 0x00020000,
|
||||
};
|
||||
|
||||
enum Scope {
|
||||
|
@ -946,6 +988,10 @@ enum Capability {
|
|||
CapabilityShaderLayer = 69,
|
||||
CapabilityShaderViewportIndex = 70,
|
||||
CapabilityUniformDecoration = 71,
|
||||
CapabilityCoreBuiltinsARM = 4165,
|
||||
CapabilityTileImageColorReadAccessEXT = 4166,
|
||||
CapabilityTileImageDepthReadAccessEXT = 4167,
|
||||
CapabilityTileImageStencilReadAccessEXT = 4168,
|
||||
CapabilityFragmentShadingRateKHR = 4422,
|
||||
CapabilitySubgroupBallotKHR = 4423,
|
||||
CapabilityDrawParameters = 4427,
|
||||
|
@ -1025,6 +1071,7 @@ enum Capability {
|
|||
CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
||||
CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
|
||||
CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||
CapabilityRayTracingPositionFetchKHR = 5336,
|
||||
CapabilityRayTracingNV = 5340,
|
||||
CapabilityRayTracingMotionBlurNV = 5341,
|
||||
CapabilityVulkanMemoryModel = 5345,
|
||||
|
@ -1042,7 +1089,10 @@ enum Capability {
|
|||
CapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||
CapabilityDemoteToHelperInvocation = 5379,
|
||||
CapabilityDemoteToHelperInvocationEXT = 5379,
|
||||
CapabilityRayTracingOpacityMicromapEXT = 5381,
|
||||
CapabilityShaderInvocationReorderNV = 5383,
|
||||
CapabilityBindlessTextureNV = 5390,
|
||||
CapabilityRayQueryPositionFetchKHR = 5391,
|
||||
CapabilitySubgroupShuffleINTEL = 5568,
|
||||
CapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
CapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||
|
@ -1075,9 +1125,13 @@ enum Capability {
|
|||
CapabilityFPGAMemoryAccessesINTEL = 5898,
|
||||
CapabilityFPGAClusterAttributesINTEL = 5904,
|
||||
CapabilityLoopFuseINTEL = 5906,
|
||||
CapabilityFPGADSPControlINTEL = 5908,
|
||||
CapabilityMemoryAccessAliasingINTEL = 5910,
|
||||
CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
|
||||
CapabilityFPGABufferLocationINTEL = 5920,
|
||||
CapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||
CapabilityUSMStorageClassesINTEL = 5935,
|
||||
CapabilityRuntimeAlignedAttributeINTEL = 5939,
|
||||
CapabilityIOPipesINTEL = 5943,
|
||||
CapabilityBlockingPipesINTEL = 5945,
|
||||
CapabilityFPGARegINTEL = 5948,
|
||||
|
@ -1091,12 +1145,16 @@ enum Capability {
|
|||
CapabilityDotProductKHR = 6019,
|
||||
CapabilityRayCullMaskKHR = 6020,
|
||||
CapabilityBitInstructions = 6025,
|
||||
CapabilityGroupNonUniformRotateKHR = 6026,
|
||||
CapabilityAtomicFloat32AddEXT = 6033,
|
||||
CapabilityAtomicFloat64AddEXT = 6034,
|
||||
CapabilityLongConstantCompositeINTEL = 6089,
|
||||
CapabilityOptNoneINTEL = 6094,
|
||||
CapabilityAtomicFloat16AddEXT = 6095,
|
||||
CapabilityDebugInfoModuleINTEL = 6114,
|
||||
CapabilitySplitBarrierINTEL = 6141,
|
||||
CapabilityFPGAArgumentInterfacesINTEL = 6174,
|
||||
CapabilityGroupUniformArithmeticKHR = 6400,
|
||||
CapabilityMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -1111,6 +1169,7 @@ enum RayFlagsShift {
|
|||
RayFlagsCullNoOpaqueKHRShift = 7,
|
||||
RayFlagsSkipTrianglesKHRShift = 8,
|
||||
RayFlagsSkipAABBsKHRShift = 9,
|
||||
RayFlagsForceOpacityMicromap2StateEXTShift = 10,
|
||||
RayFlagsMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
|
@ -1126,6 +1185,7 @@ enum RayFlagsMask {
|
|||
RayFlagsCullNoOpaqueKHRMask = 0x00000080,
|
||||
RayFlagsSkipTrianglesKHRMask = 0x00000100,
|
||||
RayFlagsSkipAABBsKHRMask = 0x00000200,
|
||||
RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
|
||||
};
|
||||
|
||||
enum RayQueryIntersection {
|
||||
|
@ -1546,12 +1606,16 @@ enum Op {
|
|||
OpPtrEqual = 401,
|
||||
OpPtrNotEqual = 402,
|
||||
OpPtrDiff = 403,
|
||||
OpColorAttachmentReadEXT = 4160,
|
||||
OpDepthAttachmentReadEXT = 4161,
|
||||
OpStencilAttachmentReadEXT = 4162,
|
||||
OpTerminateInvocation = 4416,
|
||||
OpSubgroupBallotKHR = 4421,
|
||||
OpSubgroupFirstInvocationKHR = 4422,
|
||||
OpSubgroupAllKHR = 4428,
|
||||
OpSubgroupAnyKHR = 4429,
|
||||
OpSubgroupAllEqualKHR = 4430,
|
||||
OpGroupNonUniformRotateKHR = 4431,
|
||||
OpSubgroupReadInvocationKHR = 4432,
|
||||
OpTraceRayKHR = 4445,
|
||||
OpExecuteCallableKHR = 4446,
|
||||
|
@ -1588,6 +1652,39 @@ enum Op {
|
|||
OpFragmentMaskFetchAMD = 5011,
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpReadClockKHR = 5056,
|
||||
OpHitObjectRecordHitMotionNV = 5249,
|
||||
OpHitObjectRecordHitWithIndexMotionNV = 5250,
|
||||
OpHitObjectRecordMissMotionNV = 5251,
|
||||
OpHitObjectGetWorldToObjectNV = 5252,
|
||||
OpHitObjectGetObjectToWorldNV = 5253,
|
||||
OpHitObjectGetObjectRayDirectionNV = 5254,
|
||||
OpHitObjectGetObjectRayOriginNV = 5255,
|
||||
OpHitObjectTraceRayMotionNV = 5256,
|
||||
OpHitObjectGetShaderRecordBufferHandleNV = 5257,
|
||||
OpHitObjectGetShaderBindingTableRecordIndexNV = 5258,
|
||||
OpHitObjectRecordEmptyNV = 5259,
|
||||
OpHitObjectTraceRayNV = 5260,
|
||||
OpHitObjectRecordHitNV = 5261,
|
||||
OpHitObjectRecordHitWithIndexNV = 5262,
|
||||
OpHitObjectRecordMissNV = 5263,
|
||||
OpHitObjectExecuteShaderNV = 5264,
|
||||
OpHitObjectGetCurrentTimeNV = 5265,
|
||||
OpHitObjectGetAttributesNV = 5266,
|
||||
OpHitObjectGetHitKindNV = 5267,
|
||||
OpHitObjectGetPrimitiveIndexNV = 5268,
|
||||
OpHitObjectGetGeometryIndexNV = 5269,
|
||||
OpHitObjectGetInstanceIdNV = 5270,
|
||||
OpHitObjectGetInstanceCustomIndexNV = 5271,
|
||||
OpHitObjectGetWorldRayDirectionNV = 5272,
|
||||
OpHitObjectGetWorldRayOriginNV = 5273,
|
||||
OpHitObjectGetRayTMaxNV = 5274,
|
||||
OpHitObjectGetRayTMinNV = 5275,
|
||||
OpHitObjectIsEmptyNV = 5276,
|
||||
OpHitObjectIsHitNV = 5277,
|
||||
OpHitObjectIsMissNV = 5278,
|
||||
OpReorderThreadWithHitObjectNV = 5279,
|
||||
OpReorderThreadWithHintNV = 5280,
|
||||
OpTypeHitObjectNV = 5281,
|
||||
OpImageSampleFootprintNV = 5283,
|
||||
OpEmitMeshTasksEXT = 5294,
|
||||
OpSetMeshOutputsEXT = 5295,
|
||||
|
@ -1600,6 +1697,7 @@ enum Op {
|
|||
OpTraceNV = 5337,
|
||||
OpTraceMotionNV = 5338,
|
||||
OpTraceRayMotionNV = 5339,
|
||||
OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340,
|
||||
OpTypeAccelerationStructureKHR = 5341,
|
||||
OpTypeAccelerationStructureNV = 5341,
|
||||
OpExecuteCallableNV = 5344,
|
||||
|
@ -1820,6 +1918,9 @@ enum Op {
|
|||
OpArbitraryFloatPowRINTEL = 5881,
|
||||
OpArbitraryFloatPowNINTEL = 5882,
|
||||
OpLoopControlINTEL = 5887,
|
||||
OpAliasDomainDeclINTEL = 5911,
|
||||
OpAliasScopeDeclINTEL = 5912,
|
||||
OpAliasScopeListDeclINTEL = 5913,
|
||||
OpFixedSqrtINTEL = 5923,
|
||||
OpFixedRecipINTEL = 5924,
|
||||
OpFixedRsqrtINTEL = 5925,
|
||||
|
@ -1858,10 +1959,23 @@ enum Op {
|
|||
OpTypeStructContinuedINTEL = 6090,
|
||||
OpConstantCompositeContinuedINTEL = 6091,
|
||||
OpSpecConstantCompositeContinuedINTEL = 6092,
|
||||
OpControlBarrierArriveINTEL = 6142,
|
||||
OpControlBarrierWaitINTEL = 6143,
|
||||
OpGroupIMulKHR = 6401,
|
||||
OpGroupFMulKHR = 6402,
|
||||
OpGroupBitwiseAndKHR = 6403,
|
||||
OpGroupBitwiseOrKHR = 6404,
|
||||
OpGroupBitwiseXorKHR = 6405,
|
||||
OpGroupLogicalAndKHR = 6406,
|
||||
OpGroupLogicalOrKHR = 6407,
|
||||
OpGroupLogicalXorKHR = 6408,
|
||||
OpMax = 0x7fffffff,
|
||||
};
|
||||
|
||||
#ifdef SPV_ENABLE_UTILITY_CODE
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
||||
*hasResult = *hasResultType = false;
|
||||
switch (opcode) {
|
||||
|
@ -2210,12 +2324,16 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
||||
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
||||
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
||||
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
|
||||
|
@ -2246,10 +2364,43 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case OpReadClockKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break;
|
||||
case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break;
|
||||
case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
|
||||
|
@ -2257,6 +2408,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
|
||||
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
||||
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
||||
|
@ -2473,6 +2625,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break;
|
||||
case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break;
|
||||
|
@ -2511,23 +2666,64 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||
case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break;
|
||||
}
|
||||
}
|
||||
#endif /* SPV_ENABLE_UTILITY_CODE */
|
||||
|
||||
// Overload operator| for mask bit combining
|
||||
// Overload bitwise operators for mask bit combining
|
||||
|
||||
inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); }
|
||||
inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); }
|
||||
inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); }
|
||||
inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); }
|
||||
inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); }
|
||||
inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); }
|
||||
inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); }
|
||||
inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); }
|
||||
inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); }
|
||||
inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); }
|
||||
inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); }
|
||||
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
|
||||
inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); }
|
||||
inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); }
|
||||
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
|
||||
inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); }
|
||||
inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); }
|
||||
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); }
|
||||
inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
|
||||
inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); }
|
||||
inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); }
|
||||
inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
|
||||
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
|
||||
|
||||
} // end namespace spv
|
||||
|
||||
#endif // #ifndef spirv_HPP
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void DeleteUniformMap(TUniformMap* map)
|
|||
|
||||
TShHandleBase* ConstructBindings()
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DeleteBindingList(TShHandleBase* bindingList)
|
||||
|
|
|
@ -65,6 +65,7 @@ enum TBasicType {
|
|||
EbtAccStruct,
|
||||
EbtReference,
|
||||
EbtRayQuery,
|
||||
EbtHitObjectNV,
|
||||
#ifndef GLSLANG_WEB
|
||||
// SPIR-V type defined by spirv_type
|
||||
EbtSpirvType,
|
||||
|
@ -104,6 +105,7 @@ enum TStorageQualifier {
|
|||
EvqHitAttr,
|
||||
EvqCallableData,
|
||||
EvqCallableDataIn,
|
||||
EvqHitObjectAttrNV,
|
||||
|
||||
EvqtaskPayloadSharedEXT,
|
||||
|
||||
|
@ -132,6 +134,8 @@ enum TStorageQualifier {
|
|||
EvqFragDepth,
|
||||
EvqFragStencil,
|
||||
|
||||
EvqTileImageEXT,
|
||||
|
||||
// end of list
|
||||
EvqLast
|
||||
};
|
||||
|
@ -316,6 +320,15 @@ enum TBuiltInVariable {
|
|||
EbvByteAddressBuffer,
|
||||
EbvRWByteAddressBuffer,
|
||||
|
||||
// ARM specific core builtins
|
||||
EbvCoreCountARM,
|
||||
EbvCoreIDARM,
|
||||
EbvCoreMaxIDARM,
|
||||
EbvWarpIDARM,
|
||||
EbvWarpMaxIDARM,
|
||||
|
||||
EbvPositionFetch,
|
||||
|
||||
EbvLast
|
||||
};
|
||||
|
||||
|
@ -368,6 +381,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
|||
case EvqCallableData: return "callableDataNV"; break;
|
||||
case EvqCallableDataIn: return "callableDataInNV"; break;
|
||||
case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break;
|
||||
case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break;
|
||||
default: return "unknown qualifier";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#else
|
||||
#include <cmath>
|
||||
#endif
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <list>
|
||||
|
@ -54,7 +55,7 @@
|
|||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700)
|
||||
#if defined(__ANDROID__)
|
||||
#include <sstream>
|
||||
namespace std {
|
||||
template<typename T>
|
||||
|
@ -66,7 +67,7 @@ std::string to_string(const T& val) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API)
|
||||
#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API
|
||||
#include <basetsd.h>
|
||||
#ifndef snprintf
|
||||
#define snprintf sprintf_s
|
||||
|
@ -82,22 +83,6 @@ std::string to_string(const T& val) {
|
|||
#define UINT_PTR uintptr_t
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
#include <stdlib.h>
|
||||
inline long long int strtoll (const char* str, char** endptr, int base)
|
||||
{
|
||||
return _strtoi64(str, endptr, base);
|
||||
}
|
||||
inline unsigned long long int strtoull (const char* str, char** endptr, int base)
|
||||
{
|
||||
return _strtoui64(str, endptr, base);
|
||||
}
|
||||
inline long long int atoll (const char* str)
|
||||
{
|
||||
return strtoll(str, NULL, 10);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#ifndef _POOLALLOC_INCLUDED_
|
||||
#define _POOLALLOC_INCLUDED_
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifndef NDEBUG
|
||||
# define GUARD_BLOCKS // define to enable guard block sanity checking
|
||||
#endif
|
||||
|
||||
|
@ -74,7 +74,7 @@ namespace glslang {
|
|||
|
||||
class TAllocation {
|
||||
public:
|
||||
TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) :
|
||||
TAllocation(size_t size, unsigned char* mem, TAllocation* prev = nullptr) :
|
||||
size(size), mem(mem), prevAlloc(prev) {
|
||||
// Allocations are bracketed:
|
||||
// [allocationHeader][initialGuardBlock][userData][finalGuardBlock]
|
||||
|
@ -171,7 +171,7 @@ public:
|
|||
void popAll();
|
||||
|
||||
//
|
||||
// Call allocate() to actually acquire memory. Returns 0 if no memory
|
||||
// Call allocate() to actually acquire memory. Returns nullptr if no memory
|
||||
// available, otherwise a properly aligned pointer to 'numBytes' of memory.
|
||||
//
|
||||
void* allocate(size_t numBytes);
|
||||
|
@ -189,7 +189,7 @@ protected:
|
|||
struct tHeader {
|
||||
tHeader(tHeader* nextPage, size_t pageCount) :
|
||||
#ifdef GUARD_BLOCKS
|
||||
lastAllocation(0),
|
||||
lastAllocation(nullptr),
|
||||
#endif
|
||||
nextPage(nextPage), pageCount(pageCount) { }
|
||||
|
||||
|
|
|
@ -58,9 +58,9 @@ class TShHandleBase {
|
|||
public:
|
||||
TShHandleBase() { pool = new glslang::TPoolAllocator; }
|
||||
virtual ~TShHandleBase() { delete pool; }
|
||||
virtual TCompiler* getAsCompiler() { return 0; }
|
||||
virtual TLinker* getAsLinker() { return 0; }
|
||||
virtual TUniformMap* getAsUniformMap() { return 0; }
|
||||
virtual TCompiler* getAsCompiler() { return nullptr; }
|
||||
virtual TLinker* getAsLinker() { return nullptr; }
|
||||
virtual TUniformMap* getAsUniformMap() { return nullptr; }
|
||||
virtual glslang::TPoolAllocator* getPool() const { return pool; }
|
||||
private:
|
||||
glslang::TPoolAllocator* pool;
|
||||
|
@ -123,11 +123,11 @@ public:
|
|||
infoSink(iSink),
|
||||
executable(e),
|
||||
haveReturnableObjectCode(false),
|
||||
appAttributeBindings(0),
|
||||
fixedAttributeBindings(0),
|
||||
excludedAttributes(0),
|
||||
appAttributeBindings(nullptr),
|
||||
fixedAttributeBindings(nullptr),
|
||||
excludedAttributes(nullptr),
|
||||
excludedCount(0),
|
||||
uniformBindings(0) { }
|
||||
uniformBindings(nullptr) { }
|
||||
virtual TLinker* getAsLinker() { return this; }
|
||||
virtual ~TLinker() { }
|
||||
virtual bool link(TCompilerList&, TUniformMap*) = 0;
|
||||
|
@ -137,7 +137,7 @@ public:
|
|||
virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
|
||||
virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
|
||||
virtual ShBindingTable* getUniformBindings() const { return uniformBindings; }
|
||||
virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here
|
||||
virtual const void* getObjectCode() const { return nullptr; } // a real compiler would be returning object code here
|
||||
virtual TInfoSink& getInfoSink() { return infoSink; }
|
||||
TInfoSink& infoSink;
|
||||
protected:
|
||||
|
|
|
@ -72,6 +72,7 @@ enum TSamplerDim {
|
|||
EsdRect,
|
||||
EsdBuffer,
|
||||
EsdSubpass, // goes only with non-sampled image (image is true)
|
||||
EsdAttachmentEXT,
|
||||
EsdNumDims
|
||||
};
|
||||
|
||||
|
@ -90,6 +91,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
bool isBuffer() const { return false; }
|
||||
bool isRect() const { return false; }
|
||||
bool isSubpass() const { return false; }
|
||||
bool isAttachmentEXT() const { return false; }
|
||||
bool isCombined() const { return true; }
|
||||
bool isImage() const { return false; }
|
||||
bool isImageClass() const { return false; }
|
||||
|
@ -122,8 +124,9 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
bool isBuffer() const { return dim == EsdBuffer; }
|
||||
bool isRect() const { return dim == EsdRect; }
|
||||
bool isSubpass() const { return dim == EsdSubpass; }
|
||||
bool isAttachmentEXT() const { return dim == EsdAttachmentEXT; }
|
||||
bool isCombined() const { return combined; }
|
||||
bool isImage() const { return image && !isSubpass(); }
|
||||
bool isImage() const { return image && !isSubpass() && !isAttachmentEXT();}
|
||||
bool isImageClass() const { return image; }
|
||||
bool isMultiSample() const { return ms; }
|
||||
bool isExternal() const { return external; }
|
||||
|
@ -214,6 +217,15 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
dim = EsdSubpass;
|
||||
ms = m;
|
||||
}
|
||||
|
||||
// make an AttachmentEXT
|
||||
void setAttachmentEXT(TBasicType t)
|
||||
{
|
||||
clear();
|
||||
type = t;
|
||||
image = true;
|
||||
dim = EsdAttachmentEXT;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool operator==(const TSampler& right) const
|
||||
|
@ -264,7 +276,9 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
default: break;
|
||||
}
|
||||
if (isImageClass()) {
|
||||
if (isSubpass())
|
||||
if (isAttachmentEXT())
|
||||
s.append("attachmentEXT");
|
||||
else if (isSubpass())
|
||||
s.append("subpass");
|
||||
else
|
||||
s.append("image");
|
||||
|
@ -289,6 +303,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
case EsdRect: s.append("2DRect"); break;
|
||||
case EsdBuffer: s.append("Buffer"); break;
|
||||
case EsdSubpass: s.append("Input"); break;
|
||||
case EsdAttachmentEXT: s.append(""); break;
|
||||
#endif
|
||||
default: break; // some compilers want this
|
||||
}
|
||||
|
@ -429,6 +444,12 @@ enum TLayoutFormat {
|
|||
ElfR16ui,
|
||||
ElfR8ui,
|
||||
ElfR64ui,
|
||||
ElfExtSizeGuard, // to help with comparisons
|
||||
ElfSize1x8,
|
||||
ElfSize1x16,
|
||||
ElfSize1x32,
|
||||
ElfSize2x32,
|
||||
ElfSize4x32,
|
||||
|
||||
ElfCount
|
||||
};
|
||||
|
@ -863,6 +884,9 @@ public:
|
|||
bool isAnyCallable() const {
|
||||
return storage == EvqCallableData || storage == EvqCallableDataIn;
|
||||
}
|
||||
bool isHitObjectAttrNV() const {
|
||||
return storage == EvqHitObjectAttrNV;
|
||||
}
|
||||
|
||||
// True if this type of IO is supposed to be arrayed with extra level for per-vertex data
|
||||
bool isArrayedIo(EShLanguage language) const
|
||||
|
@ -898,6 +922,9 @@ public:
|
|||
// -2048 as the default value indicating layoutSecondaryViewportRelative is not set
|
||||
layoutSecondaryViewportRelativeOffset = -2048;
|
||||
layoutShaderRecord = false;
|
||||
layoutHitObjectShaderRecordNV = false;
|
||||
layoutBindlessSampler = false;
|
||||
layoutBindlessImage = false;
|
||||
layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd;
|
||||
layoutFormat = ElfNone;
|
||||
#endif
|
||||
|
@ -997,10 +1024,14 @@ public:
|
|||
bool layoutViewportRelative;
|
||||
int layoutSecondaryViewportRelativeOffset;
|
||||
bool layoutShaderRecord;
|
||||
bool layoutHitObjectShaderRecordNV;
|
||||
|
||||
// GL_EXT_spirv_intrinsics
|
||||
int spirvStorageClass;
|
||||
TSpirvDecorate* spirvDecorate;
|
||||
|
||||
bool layoutBindlessSampler;
|
||||
bool layoutBindlessImage;
|
||||
#endif
|
||||
|
||||
bool hasUniformLayout() const
|
||||
|
@ -1123,6 +1154,7 @@ public:
|
|||
TLayoutFormat getFormat() const { return layoutFormat; }
|
||||
bool isPushConstant() const { return layoutPushConstant; }
|
||||
bool isShaderRecord() const { return layoutShaderRecord; }
|
||||
bool hasHitObjectShaderRecordNV() const { return layoutHitObjectShaderRecordNV; }
|
||||
bool hasBufferReference() const { return layoutBufferReference; }
|
||||
bool hasBufferReferenceAlign() const
|
||||
{
|
||||
|
@ -1132,6 +1164,14 @@ public:
|
|||
{
|
||||
return nonUniform;
|
||||
}
|
||||
bool isBindlessSampler() const
|
||||
{
|
||||
return layoutBindlessSampler;
|
||||
}
|
||||
bool isBindlessImage() const
|
||||
{
|
||||
return layoutBindlessImage;
|
||||
}
|
||||
|
||||
// GL_EXT_spirv_intrinsics
|
||||
bool hasSprivDecorate() const { return spirvDecorate != nullptr; }
|
||||
|
@ -1241,6 +1281,11 @@ public:
|
|||
case ElfR8ui: return "r8ui";
|
||||
case ElfR64ui: return "r64ui";
|
||||
case ElfR64i: return "r64i";
|
||||
case ElfSize1x8: return "size1x8";
|
||||
case ElfSize1x16: return "size1x16";
|
||||
case ElfSize1x32: return "size1x32";
|
||||
case ElfSize2x32: return "size2x32";
|
||||
case ElfSize4x32: return "size4x32";
|
||||
default: return "none";
|
||||
}
|
||||
}
|
||||
|
@ -1364,6 +1409,9 @@ struct TShaderQualifiers {
|
|||
bool earlyFragmentTests; // fragment input
|
||||
bool postDepthCoverage; // fragment input
|
||||
bool earlyAndLateFragmentTestsAMD; //fragment input
|
||||
bool nonCoherentColorAttachmentReadEXT; // fragment input
|
||||
bool nonCoherentDepthAttachmentReadEXT; // fragment input
|
||||
bool nonCoherentStencilAttachmentReadEXT; // fragment input
|
||||
TLayoutDepth layoutDepth;
|
||||
TLayoutStencil layoutStencil;
|
||||
bool blendEquation; // true if any blend equation was specified
|
||||
|
@ -1403,6 +1451,9 @@ struct TShaderQualifiers {
|
|||
earlyFragmentTests = false;
|
||||
earlyAndLateFragmentTestsAMD = false;
|
||||
postDepthCoverage = false;
|
||||
nonCoherentColorAttachmentReadEXT = false;
|
||||
nonCoherentDepthAttachmentReadEXT = false;
|
||||
nonCoherentStencilAttachmentReadEXT = false;
|
||||
layoutDepth = EldNone;
|
||||
layoutStencil = ElsNone;
|
||||
blendEquation = false;
|
||||
|
@ -1460,6 +1511,12 @@ struct TShaderQualifiers {
|
|||
earlyAndLateFragmentTestsAMD = true;
|
||||
if (src.postDepthCoverage)
|
||||
postDepthCoverage = true;
|
||||
if (src.nonCoherentColorAttachmentReadEXT)
|
||||
nonCoherentColorAttachmentReadEXT = true;
|
||||
if (src.nonCoherentDepthAttachmentReadEXT)
|
||||
nonCoherentDepthAttachmentReadEXT = true;
|
||||
if (src.nonCoherentStencilAttachmentReadEXT)
|
||||
nonCoherentStencilAttachmentReadEXT = true;
|
||||
if (src.layoutDepth)
|
||||
layoutDepth = src.layoutDepth;
|
||||
if (src.layoutStencil)
|
||||
|
@ -1575,6 +1632,7 @@ public:
|
|||
// "Image" is a superset of "Subpass"
|
||||
bool isImage() const { return basicType == EbtSampler && sampler.isImage(); }
|
||||
bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); }
|
||||
bool isAttachmentEXT() const { return basicType == EbtSampler && sampler.isAttachmentEXT(); }
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -1864,9 +1922,11 @@ public:
|
|||
virtual bool isArray() const { return arraySizes != nullptr; }
|
||||
virtual bool isSizedArray() const { return isArray() && arraySizes->isSized(); }
|
||||
virtual bool isUnsizedArray() const { return isArray() && !arraySizes->isSized(); }
|
||||
virtual bool isImplicitlySizedArray() const { return isArray() && arraySizes->isImplicitlySized(); }
|
||||
virtual bool isArrayVariablyIndexed() const { assert(isArray()); return arraySizes->isVariablyIndexed(); }
|
||||
virtual void setArrayVariablyIndexed() { assert(isArray()); arraySizes->setVariablyIndexed(); }
|
||||
virtual void updateImplicitArraySize(int size) { assert(isArray()); arraySizes->updateImplicitSize(size); }
|
||||
virtual void setImplicitlySized(bool isImplicitSized) { arraySizes->setImplicitlySized(isImplicitSized); }
|
||||
virtual bool isStruct() const { return basicType == EbtStruct || basicType == EbtBlock; }
|
||||
virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; }
|
||||
virtual bool isIntegerDomain() const
|
||||
|
@ -1890,14 +1950,17 @@ public:
|
|||
virtual bool isOpaque() const { return basicType == EbtSampler
|
||||
#ifndef GLSLANG_WEB
|
||||
|| basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery
|
||||
|| basicType == EbtHitObjectNV
|
||||
#endif
|
||||
; }
|
||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||
|
||||
// "Image" is a superset of "Subpass"
|
||||
virtual bool isAttachmentEXT() const { return basicType == EbtSampler && getSampler().isAttachmentEXT(); }
|
||||
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
|
||||
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
|
||||
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
|
||||
virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; }
|
||||
virtual bool isBindlessTexture() const { return isTexture() && qualifier.layoutBindlessSampler; }
|
||||
// Check the block-name convention of creating a block without populating it's members:
|
||||
virtual bool isUnusableName() const { return isStruct() && structure == nullptr; }
|
||||
virtual bool isParameterized() const { return typeParameters != nullptr; }
|
||||
|
@ -1954,6 +2017,11 @@ public:
|
|||
return contains([](const TType* t) { return t->isOpaque(); } );
|
||||
}
|
||||
|
||||
virtual bool containsSampler() const
|
||||
{
|
||||
return contains([](const TType* t) { return t->isTexture() || t->isImage(); });
|
||||
}
|
||||
|
||||
// Recursively checks if the type contains a built-in variable
|
||||
virtual bool containsBuiltIn() const
|
||||
{
|
||||
|
@ -2087,8 +2155,12 @@ public:
|
|||
// an explicit array.
|
||||
void adoptImplicitArraySizes(bool skipNonvariablyIndexed)
|
||||
{
|
||||
if (isUnsizedArray() && !(skipNonvariablyIndexed || isArrayVariablyIndexed()))
|
||||
if (isUnsizedArray() &&
|
||||
(qualifier.builtIn == EbvSampleMask ||
|
||||
!(skipNonvariablyIndexed || isArrayVariablyIndexed()))) {
|
||||
changeOuterArraySize(getImplicitArraySize());
|
||||
setImplicitlySized(true);
|
||||
}
|
||||
// For multi-dim per-view arrays, set unsized inner dimension size to 1
|
||||
if (qualifier.isPerView() && arraySizes && arraySizes->isInnerUnsized())
|
||||
arraySizes->clearInnerUnsized();
|
||||
|
@ -2283,8 +2355,16 @@ public:
|
|||
appendStr(" layoutSecondaryViewportRelativeOffset=");
|
||||
appendInt(qualifier.layoutSecondaryViewportRelativeOffset);
|
||||
}
|
||||
|
||||
if (qualifier.layoutShaderRecord)
|
||||
appendStr(" shaderRecordNV");
|
||||
if (qualifier.layoutHitObjectShaderRecordNV)
|
||||
appendStr(" hitobjectshaderrecordnv");
|
||||
|
||||
if (qualifier.layoutBindlessSampler)
|
||||
appendStr(" layoutBindlessSampler");
|
||||
if (qualifier.layoutBindlessImage)
|
||||
appendStr(" layoutBindlessImage");
|
||||
|
||||
appendStr(")");
|
||||
}
|
||||
|
@ -2544,6 +2624,7 @@ public:
|
|||
void setStruct(TTypeList* s) { assert(isStruct()); structure = s; }
|
||||
TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads
|
||||
void setBasicType(const TBasicType& t) { basicType = t; }
|
||||
void setVectorSize(int s) { vectorSize = s; }
|
||||
|
||||
int computeNumComponents() const
|
||||
{
|
||||
|
@ -2711,7 +2792,10 @@ public:
|
|||
bool sameArrayness(const TType& right) const
|
||||
{
|
||||
return ((arraySizes == nullptr && right.arraySizes == nullptr) ||
|
||||
(arraySizes != nullptr && right.arraySizes != nullptr && *arraySizes == *right.arraySizes));
|
||||
(arraySizes != nullptr && right.arraySizes != nullptr &&
|
||||
(*arraySizes == *right.arraySizes ||
|
||||
(arraySizes->isImplicitlySized() && right.arraySizes->isDefaultImplicitlySized()) ||
|
||||
(right.arraySizes->isImplicitlySized() && arraySizes->isDefaultImplicitlySized()))));
|
||||
}
|
||||
|
||||
// See if two type's arrayness match in everything except their outer dimension
|
||||
|
|
|
@ -222,7 +222,7 @@ protected:
|
|||
struct TArraySizes {
|
||||
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||
|
||||
TArraySizes() : implicitArraySize(1), variablyIndexed(false) { }
|
||||
TArraySizes() : implicitArraySize(0), implicitlySized(true), variablyIndexed(false){ }
|
||||
|
||||
// For breaking into two non-shared copies, independently modifiable.
|
||||
TArraySizes& operator=(const TArraySizes& from)
|
||||
|
@ -230,6 +230,7 @@ struct TArraySizes {
|
|||
implicitArraySize = from.implicitArraySize;
|
||||
variablyIndexed = from.variablyIndexed;
|
||||
sizes = from.sizes;
|
||||
implicitlySized = from.implicitlySized;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -256,11 +257,17 @@ struct TArraySizes {
|
|||
void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); }
|
||||
void addInnerSize(TArraySize pair) {
|
||||
sizes.push_back(pair.size, pair.node);
|
||||
implicitlySized = false;
|
||||
}
|
||||
void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); }
|
||||
void changeOuterSize(int s) { sizes.changeFront((unsigned)s); }
|
||||
int getImplicitSize() const { return implicitArraySize; }
|
||||
void updateImplicitSize(int s) { implicitArraySize = std::max(implicitArraySize, s); }
|
||||
void changeOuterSize(int s) {
|
||||
sizes.changeFront((unsigned)s);
|
||||
implicitlySized = false;
|
||||
}
|
||||
int getImplicitSize() const { return implicitArraySize > 0 ? implicitArraySize : 1; }
|
||||
void updateImplicitSize(int s) {
|
||||
implicitArraySize = (std::max)(implicitArraySize, s);
|
||||
}
|
||||
bool isInnerUnsized() const
|
||||
{
|
||||
for (int d = 1; d < sizes.size(); ++d) {
|
||||
|
@ -295,6 +302,9 @@ struct TArraySizes {
|
|||
|
||||
bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); }
|
||||
bool isSized() const { return getOuterSize() != UnsizedArraySize; }
|
||||
bool isImplicitlySized() const { return implicitlySized; }
|
||||
bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; }
|
||||
void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; }
|
||||
void dereference() { sizes.pop_front(); }
|
||||
void copyDereferenced(const TArraySizes& rhs)
|
||||
{
|
||||
|
@ -333,6 +343,7 @@ protected:
|
|||
// the implicit size of the array, if not variably indexed and
|
||||
// otherwise legal.
|
||||
int implicitArraySize;
|
||||
bool implicitlySized;
|
||||
bool variablyIndexed; // true if array is indexed with a non compile-time constant
|
||||
};
|
||||
|
||||
|
|
|
@ -157,28 +157,17 @@ typedef struct glslang_resource_s {
|
|||
int max_task_work_group_size_y_ext;
|
||||
int max_task_work_group_size_z_ext;
|
||||
int max_mesh_view_count_ext;
|
||||
union
|
||||
{
|
||||
int max_dual_source_draw_buffers_ext;
|
||||
|
||||
/* Incorrectly capitalized name retained for backward compatibility */
|
||||
int maxDualSourceDrawBuffersEXT;
|
||||
};
|
||||
|
||||
glslang_limits_t limits;
|
||||
} glslang_resource_t;
|
||||
|
||||
typedef struct glslang_input_s {
|
||||
glslang_source_t language;
|
||||
glslang_stage_t stage;
|
||||
glslang_client_t client;
|
||||
glslang_target_client_version_t client_version;
|
||||
glslang_target_language_t target_language;
|
||||
glslang_target_language_version_t target_language_version;
|
||||
/** Shader source code */
|
||||
const char* code;
|
||||
int default_version;
|
||||
glslang_profile_t default_profile;
|
||||
int force_default_version_and_profile;
|
||||
int forward_compatible;
|
||||
glslang_messages_t messages;
|
||||
const glslang_resource_t* resource;
|
||||
} glslang_input_t;
|
||||
|
||||
/* Inclusion result structure allocated by C include_local/include_system callbacks */
|
||||
typedef struct glsl_include_result_s {
|
||||
/* Header file name or NULL if inclusion failed */
|
||||
|
@ -208,6 +197,25 @@ typedef struct glsl_include_callbacks_s {
|
|||
glsl_free_include_result_func free_include_result;
|
||||
} glsl_include_callbacks_t;
|
||||
|
||||
typedef struct glslang_input_s {
|
||||
glslang_source_t language;
|
||||
glslang_stage_t stage;
|
||||
glslang_client_t client;
|
||||
glslang_target_client_version_t client_version;
|
||||
glslang_target_language_t target_language;
|
||||
glslang_target_language_version_t target_language_version;
|
||||
/** Shader source code */
|
||||
const char* code;
|
||||
int default_version;
|
||||
glslang_profile_t default_profile;
|
||||
int force_default_version_and_profile;
|
||||
int forward_compatible;
|
||||
glslang_messages_t messages;
|
||||
const glslang_resource_t* resource;
|
||||
glsl_include_callbacks_t callbacks;
|
||||
void* callbacks_ctx;
|
||||
} glslang_input_t;
|
||||
|
||||
/* SpvOptions counterpart */
|
||||
typedef struct glslang_spv_options_s {
|
||||
bool generate_debug_info;
|
||||
|
|
|
@ -827,6 +827,7 @@ enum TOperator {
|
|||
EOpSubpassLoadMS,
|
||||
EOpSparseImageLoad,
|
||||
EOpSparseImageLoadLod,
|
||||
EOpColorAttachmentReadEXT, // Fragment only
|
||||
|
||||
EOpImageGuardEnd,
|
||||
|
||||
|
@ -969,6 +970,41 @@ enum TOperator {
|
|||
EOpRayQueryGetIntersectionWorldToObject,
|
||||
|
||||
//
|
||||
// GL_NV_shader_invocation_reorder
|
||||
//
|
||||
|
||||
EOpHitObjectTraceRayNV,
|
||||
EOpHitObjectTraceRayMotionNV,
|
||||
EOpHitObjectRecordHitNV,
|
||||
EOpHitObjectRecordHitMotionNV,
|
||||
EOpHitObjectRecordHitWithIndexNV,
|
||||
EOpHitObjectRecordHitWithIndexMotionNV,
|
||||
EOpHitObjectRecordMissNV,
|
||||
EOpHitObjectRecordMissMotionNV,
|
||||
EOpHitObjectRecordEmptyNV,
|
||||
EOpHitObjectExecuteShaderNV,
|
||||
EOpHitObjectIsEmptyNV,
|
||||
EOpHitObjectIsMissNV,
|
||||
EOpHitObjectIsHitNV,
|
||||
EOpHitObjectGetRayTMinNV,
|
||||
EOpHitObjectGetRayTMaxNV,
|
||||
EOpHitObjectGetObjectRayOriginNV,
|
||||
EOpHitObjectGetObjectRayDirectionNV,
|
||||
EOpHitObjectGetWorldRayOriginNV,
|
||||
EOpHitObjectGetWorldRayDirectionNV,
|
||||
EOpHitObjectGetWorldToObjectNV,
|
||||
EOpHitObjectGetObjectToWorldNV,
|
||||
EOpHitObjectGetInstanceCustomIndexNV,
|
||||
EOpHitObjectGetInstanceIdNV,
|
||||
EOpHitObjectGetGeometryIndexNV,
|
||||
EOpHitObjectGetPrimitiveIndexNV,
|
||||
EOpHitObjectGetHitKindNV,
|
||||
EOpHitObjectGetShaderBindingTableRecordIndexNV,
|
||||
EOpHitObjectGetShaderRecordBufferHandleNV,
|
||||
EOpHitObjectGetAttributesNV,
|
||||
EOpHitObjectGetCurrentTimeNV,
|
||||
EOpReorderThreadNV,
|
||||
|
||||
// HLSL operations
|
||||
//
|
||||
|
||||
|
@ -1055,6 +1091,13 @@ enum TOperator {
|
|||
// Shader Clock Ops
|
||||
EOpReadClockSubgroupKHR,
|
||||
EOpReadClockDeviceKHR,
|
||||
|
||||
// GL_EXT_ray_tracing_position_fetch
|
||||
EOpRayQueryGetIntersectionTriangleVertexPositionsEXT,
|
||||
|
||||
// Shader tile image ops
|
||||
EOpStencilAttachmentReadEXT, // Fragment only
|
||||
EOpDepthAttachmentReadEXT, // Fragment only
|
||||
};
|
||||
|
||||
class TIntermTraverser;
|
||||
|
@ -1086,31 +1129,31 @@ public:
|
|||
virtual const glslang::TSourceLoc& getLoc() const { return loc; }
|
||||
virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; }
|
||||
virtual void traverse(glslang::TIntermTraverser*) = 0;
|
||||
virtual glslang::TIntermTyped* getAsTyped() { return 0; }
|
||||
virtual glslang::TIntermOperator* getAsOperator() { return 0; }
|
||||
virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return 0; }
|
||||
virtual glslang::TIntermAggregate* getAsAggregate() { return 0; }
|
||||
virtual glslang::TIntermUnary* getAsUnaryNode() { return 0; }
|
||||
virtual glslang::TIntermBinary* getAsBinaryNode() { return 0; }
|
||||
virtual glslang::TIntermSelection* getAsSelectionNode() { return 0; }
|
||||
virtual glslang::TIntermSwitch* getAsSwitchNode() { return 0; }
|
||||
virtual glslang::TIntermMethod* getAsMethodNode() { return 0; }
|
||||
virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; }
|
||||
virtual glslang::TIntermBranch* getAsBranchNode() { return 0; }
|
||||
virtual glslang::TIntermLoop* getAsLoopNode() { return 0; }
|
||||
virtual glslang::TIntermTyped* getAsTyped() { return nullptr; }
|
||||
virtual glslang::TIntermOperator* getAsOperator() { return nullptr; }
|
||||
virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return nullptr; }
|
||||
virtual glslang::TIntermAggregate* getAsAggregate() { return nullptr; }
|
||||
virtual glslang::TIntermUnary* getAsUnaryNode() { return nullptr; }
|
||||
virtual glslang::TIntermBinary* getAsBinaryNode() { return nullptr; }
|
||||
virtual glslang::TIntermSelection* getAsSelectionNode() { return nullptr; }
|
||||
virtual glslang::TIntermSwitch* getAsSwitchNode() { return nullptr; }
|
||||
virtual glslang::TIntermMethod* getAsMethodNode() { return nullptr; }
|
||||
virtual glslang::TIntermSymbol* getAsSymbolNode() { return nullptr; }
|
||||
virtual glslang::TIntermBranch* getAsBranchNode() { return nullptr; }
|
||||
virtual glslang::TIntermLoop* getAsLoopNode() { return nullptr; }
|
||||
|
||||
virtual const glslang::TIntermTyped* getAsTyped() const { return 0; }
|
||||
virtual const glslang::TIntermOperator* getAsOperator() const { return 0; }
|
||||
virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return 0; }
|
||||
virtual const glslang::TIntermAggregate* getAsAggregate() const { return 0; }
|
||||
virtual const glslang::TIntermUnary* getAsUnaryNode() const { return 0; }
|
||||
virtual const glslang::TIntermBinary* getAsBinaryNode() const { return 0; }
|
||||
virtual const glslang::TIntermSelection* getAsSelectionNode() const { return 0; }
|
||||
virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return 0; }
|
||||
virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; }
|
||||
virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; }
|
||||
virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; }
|
||||
virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; }
|
||||
virtual const glslang::TIntermTyped* getAsTyped() const { return nullptr; }
|
||||
virtual const glslang::TIntermOperator* getAsOperator() const { return nullptr; }
|
||||
virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return nullptr; }
|
||||
virtual const glslang::TIntermAggregate* getAsAggregate() const { return nullptr; }
|
||||
virtual const glslang::TIntermUnary* getAsUnaryNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermBinary* getAsBinaryNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSelection* getAsSelectionNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermMethod* getAsMethodNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermBranch* getAsBranchNode() const { return nullptr; }
|
||||
virtual const glslang::TIntermLoop* getAsLoopNode() const { return nullptr; }
|
||||
virtual ~TIntermNode() { }
|
||||
|
||||
protected:
|
||||
|
@ -1358,6 +1401,7 @@ struct TCrackedTextureOp {
|
|||
bool subpass;
|
||||
bool lodClamp;
|
||||
bool fragMask;
|
||||
bool attachmentEXT;
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -1414,6 +1458,7 @@ public:
|
|||
cracked.gather = false;
|
||||
cracked.grad = false;
|
||||
cracked.subpass = false;
|
||||
cracked.attachmentEXT = false;
|
||||
cracked.lodClamp = false;
|
||||
cracked.fragMask = false;
|
||||
|
||||
|
@ -1574,6 +1619,9 @@ public:
|
|||
case EOpSubpassLoadMS:
|
||||
cracked.subpass = true;
|
||||
break;
|
||||
case EOpColorAttachmentReadEXT:
|
||||
cracked.attachmentEXT = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
@ -1616,8 +1664,8 @@ protected:
|
|||
//
|
||||
class TIntermUnary : public TIntermOperator {
|
||||
public:
|
||||
TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {}
|
||||
TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {}
|
||||
TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(nullptr) {}
|
||||
TIntermUnary(TOperator o) : TIntermOperator(o), operand(nullptr) {}
|
||||
virtual void traverse(TIntermTraverser*);
|
||||
virtual void setOperand(TIntermTyped* o) { operand = o; }
|
||||
virtual TIntermTyped* getOperand() { return operand; }
|
||||
|
@ -1819,7 +1867,7 @@ public:
|
|||
|
||||
TIntermNode *getParentNode()
|
||||
{
|
||||
return path.size() == 0 ? NULL : path.back();
|
||||
return path.size() == 0 ? nullptr : path.back();
|
||||
}
|
||||
|
||||
const bool preVisit;
|
||||
|
|
|
@ -212,9 +212,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
|
|||
|
||||
case EbtInt64:
|
||||
if (rightUnionArray[i] == 0ll)
|
||||
newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll);
|
||||
else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll)
|
||||
newConstArray[i].setI64Const((long long)-0x8000000000000000ll);
|
||||
newConstArray[i].setI64Const(LLONG_MAX);
|
||||
else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN)
|
||||
newConstArray[i].setI64Const(LLONG_MIN);
|
||||
else
|
||||
newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const());
|
||||
break;
|
||||
|
@ -226,7 +226,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
|
|||
newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const());
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
|
|||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType);
|
||||
|
@ -1345,7 +1345,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons
|
|||
{
|
||||
TType dereferencedType(node->getType(), index);
|
||||
dereferencedType.getQualifier().storage = EvqConst;
|
||||
TIntermTyped* result = 0;
|
||||
TIntermTyped* result = nullptr;
|
||||
int size = dereferencedType.computeNumComponents();
|
||||
|
||||
// arrays, vectors, matrices, all use simple multiplicative math
|
||||
|
@ -1365,7 +1365,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons
|
|||
|
||||
result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc);
|
||||
|
||||
if (result == 0)
|
||||
if (result == nullptr)
|
||||
result = node;
|
||||
else
|
||||
result->setType(dereferencedType);
|
||||
|
@ -1387,7 +1387,7 @@ TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TSwizzleSelectors<T
|
|||
|
||||
TIntermTyped* result = addConstantUnion(constArray, node->getType(), loc);
|
||||
|
||||
if (result == 0)
|
||||
if (result == nullptr)
|
||||
result = node;
|
||||
else
|
||||
result->setType(TType(node->getBasicType(), EvqConst, selectors.size()));
|
||||
|
|
|
@ -147,10 +147,6 @@ EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECo
|
|||
#ifdef GLSLANG_WEB
|
||||
const Versioning* Es300Desktop130 = nullptr;
|
||||
const Versioning* Es310Desktop420 = nullptr;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
const Versioning* Es300Desktop130 = nullptr;
|
||||
const Versioning* Es310Desktop420 = nullptr;
|
||||
const Versioning* Es310Desktop450 = nullptr;
|
||||
#else
|
||||
const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr },
|
||||
{ EDesktopProfile, 0, 130, 0, nullptr },
|
||||
|
@ -420,7 +416,7 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function)
|
|||
// See if the tabled versioning information allows the current version.
|
||||
bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */)
|
||||
{
|
||||
#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
|
||||
#if defined(GLSLANG_WEB)
|
||||
// all entries in table are valid
|
||||
return true;
|
||||
#endif
|
||||
|
@ -505,7 +501,7 @@ TBuiltIns::TBuiltIns()
|
|||
prefixes[EbtFloat] = "";
|
||||
prefixes[EbtInt] = "i";
|
||||
prefixes[EbtUint] = "u";
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
prefixes[EbtFloat16] = "f16";
|
||||
prefixes[EbtInt8] = "i8";
|
||||
prefixes[EbtUint8] = "u8";
|
||||
|
@ -524,12 +520,11 @@ TBuiltIns::TBuiltIns()
|
|||
dimMap[Esd3D] = 3;
|
||||
dimMap[EsdCube] = 3;
|
||||
#ifndef GLSLANG_WEB
|
||||
#ifndef GLSLANG_ANGLE
|
||||
dimMap[Esd1D] = 1;
|
||||
#endif
|
||||
dimMap[EsdRect] = 2;
|
||||
dimMap[EsdBuffer] = 1;
|
||||
dimMap[EsdSubpass] = 2; // potentially unused for now
|
||||
dimMap[EsdAttachmentEXT] = 2; // potentially unused for now
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -551,9 +546,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
version = 450;
|
||||
profile = ECoreProfile;
|
||||
#endif
|
||||
addTabledBuiltins(version, profile, spvVersion);
|
||||
|
||||
|
@ -599,7 +591,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"vec4 fwidthCoarse(vec4 p);"
|
||||
);
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
TString derivativesAndControl16bits (
|
||||
"float16_t dFdx(float16_t);"
|
||||
"f16vec2 dFdx(f16vec2);"
|
||||
|
@ -1393,7 +1384,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n"
|
||||
);
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 430)) {
|
||||
|
@ -1431,7 +1421,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (profile != EEsProfile && version >= 440) {
|
||||
commonBuiltins.append(
|
||||
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);"
|
||||
|
@ -1511,7 +1500,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
if ((profile == EEsProfile && version >= 300) ||
|
||||
|
@ -1552,7 +1540,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
|
||||
commonBuiltins.append(
|
||||
"double fma(double, double, double);"
|
||||
|
@ -1570,7 +1557,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"f64vec4 fma(f64vec4, f64vec4, f64vec4 );"
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 400)) {
|
||||
|
@ -1588,7 +1574,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64
|
||||
commonBuiltins.append(
|
||||
"double frexp(double, out int);"
|
||||
|
@ -1621,7 +1606,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
"\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ((profile == EEsProfile && version >= 300) ||
|
||||
|
@ -1731,7 +1715,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
#ifndef GLSLANG_ANGLE
|
||||
//
|
||||
// Original-style texture functions existing in all stages.
|
||||
// (Per-stage functions below.)
|
||||
|
@ -1926,7 +1909,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
// Bitfield
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
|
@ -2069,7 +2051,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// GL_ARB_shader_ballot
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
commonBuiltins.append(
|
||||
|
@ -3390,7 +3371,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
if ((profile == EEsProfile && version >= 300 && version < 310) ||
|
||||
(profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix
|
||||
|
@ -3410,7 +3390,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// GL_AMD_gpu_shader_half_float/Explicit types
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) {
|
||||
commonBuiltins.append(
|
||||
|
@ -4184,7 +4163,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -4200,7 +4178,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion))
|
||||
stageBuiltins[EShLangVertex].append("vec4 ftransform();");
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
//
|
||||
// Original-style texture Functions with lod.
|
||||
//
|
||||
|
@ -4260,7 +4237,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
if ((profile != EEsProfile && version >= 150) ||
|
||||
(profile == EEsProfile && version >= 310)) {
|
||||
|
@ -4341,7 +4317,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
commonBuiltins.append("void debugPrintfEXT();\n");
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
// coopMatStoreNV perhaps ought to have "out" on the buf parameter, but
|
||||
// adding it introduces undesirable tempArgs on the stack. What we want
|
||||
|
@ -4465,7 +4440,24 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
// GL_EXT_shader_tile_image
|
||||
if (spvVersion.vulkan > 0) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"lowp uint stencilAttachmentReadEXT();"
|
||||
"lowp uint stencilAttachmentReadEXT(int);"
|
||||
"highp float depthAttachmentReadEXT();"
|
||||
"highp float depthAttachmentReadEXT(int);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
"vec4 colorAttachmentReadEXT(attachmentEXT);"
|
||||
"vec4 colorAttachmentReadEXT(attachmentEXT, int);"
|
||||
"ivec4 colorAttachmentReadEXT(iattachmentEXT);"
|
||||
"ivec4 colorAttachmentReadEXT(iattachmentEXT, int);"
|
||||
"uvec4 colorAttachmentReadEXT(uattachmentEXT);"
|
||||
"uvec4 colorAttachmentReadEXT(uattachmentEXT, int);"
|
||||
"\n");
|
||||
}
|
||||
|
||||
// GL_ARB_derivative_control
|
||||
if (profile != EEsProfile && version >= 400) {
|
||||
|
@ -4503,7 +4495,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"bool helperInvocationEXT();"
|
||||
"\n");
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// GL_AMD_shader_explicit_vertex_parameter
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
stageBuiltins[EShLangFragment].append(
|
||||
|
@ -4578,7 +4569,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query
|
||||
// Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/
|
||||
// GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch
|
||||
if (profile != EEsProfile && version >= 460) {
|
||||
commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);"
|
||||
"void rayQueryTerminateEXT(rayQueryEXT);"
|
||||
|
@ -4603,6 +4595,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);"
|
||||
"mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);"
|
||||
"mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);"
|
||||
"void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);"
|
||||
"\n");
|
||||
|
||||
stageBuiltins[EShLangRayGen].append(
|
||||
|
@ -4611,6 +4604,39 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV,uint,vec3,float,vec3,float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV,int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"void reorderThreadNV(uint, uint);"
|
||||
"void reorderThreadNV(hitObjectNV);"
|
||||
"void reorderThreadNV(hitObjectNV, uint, uint);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangIntersect].append(
|
||||
"bool reportIntersectionNV(float, uint);"
|
||||
|
@ -4626,6 +4652,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV, int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangMiss].append(
|
||||
"void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
|
@ -4633,20 +4689,48 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);"
|
||||
"void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);"
|
||||
"void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);"
|
||||
"void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);"
|
||||
"void hitObjectRecordEmptyNV(hitObjectNV);"
|
||||
"void hitObjectExecuteShaderNV(hitObjectNV, int);"
|
||||
"bool hitObjectIsEmptyNV(hitObjectNV);"
|
||||
"bool hitObjectIsMissNV(hitObjectNV);"
|
||||
"bool hitObjectIsHitNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMinNV(hitObjectNV);"
|
||||
"float hitObjectGetRayTMaxNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);"
|
||||
"vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);"
|
||||
"mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceCustomIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetInstanceIdNV(hitObjectNV);"
|
||||
"int hitObjectGetGeometryIndexNV(hitObjectNV);"
|
||||
"int hitObjectGetPrimitiveIndexNV(hitObjectNV);"
|
||||
"uint hitObjectGetHitKindNV(hitObjectNV);"
|
||||
"void hitObjectGetAttributesNV(hitObjectNV,int);"
|
||||
"float hitObjectGetCurrentTimeNV(hitObjectNV);"
|
||||
"uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);"
|
||||
"uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);"
|
||||
"\n");
|
||||
stageBuiltins[EShLangCallable].append(
|
||||
"void executeCallableNV(uint, int);"
|
||||
"void executeCallableEXT(uint, int);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
//E_SPV_NV_compute_shader_derivatives
|
||||
if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) {
|
||||
stageBuiltins[EShLangCompute].append(derivativeControls);
|
||||
stageBuiltins[EShLangCompute].append("\n");
|
||||
}
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
stageBuiltins[EShLangCompute].append(derivativesAndControl16bits);
|
||||
stageBuiltins[EShLangCompute].append(derivativesAndControl64bits);
|
||||
|
@ -4670,7 +4754,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"void SetMeshOutputsEXT(uint, uint);"
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
//============================================================================
|
||||
|
@ -4708,7 +4791,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) {
|
||||
//
|
||||
// Matrix state. p. 31, 32, 37, 39, 40.
|
||||
|
@ -4826,7 +4909,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
|
||||
"\n");
|
||||
}
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -4857,7 +4940,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
#ifndef GLSLANG_ANGLE
|
||||
//============================================================================
|
||||
//
|
||||
// Define the interface to the mesh/task shader.
|
||||
|
@ -4974,7 +5056,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -5708,7 +5789,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// GL_ARB_shader_ballot
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
const char* ballotDecls =
|
||||
|
@ -5771,6 +5851,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"in highp uint gl_SMCountNV;"
|
||||
"in highp uint gl_WarpIDNV;"
|
||||
"in highp uint gl_SMIDNV;"
|
||||
// GL_ARM_shader_core_builtins
|
||||
"in highp uint gl_CoreIDARM;"
|
||||
"in highp uint gl_CoreCountARM;"
|
||||
"in highp uint gl_CoreMaxIDARM;"
|
||||
"in highp uint gl_WarpIDARM;"
|
||||
"in highp uint gl_WarpMaxIDARM;"
|
||||
"\n";
|
||||
const char* fragmentSubgroupDecls =
|
||||
"flat in mediump uint gl_SubgroupSize;"
|
||||
|
@ -5785,6 +5871,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"flat in highp uint gl_SMCountNV;"
|
||||
"flat in highp uint gl_WarpIDNV;"
|
||||
"flat in highp uint gl_SMIDNV;"
|
||||
// GL_ARM_shader_core_builtins
|
||||
"flat in highp uint gl_CoreIDARM;"
|
||||
"flat in highp uint gl_CoreCountARM;"
|
||||
"flat in highp uint gl_CoreMaxIDARM;"
|
||||
"flat in highp uint gl_WarpIDARM;"
|
||||
"flat in highp uint gl_WarpMaxIDARM;"
|
||||
"\n";
|
||||
const char* computeSubgroupDecls =
|
||||
"in highp uint gl_NumSubgroups;"
|
||||
|
@ -5804,6 +5896,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"in highp uint gl_SMCountNV;"
|
||||
"in highp volatile uint gl_WarpIDNV;"
|
||||
"in highp volatile uint gl_SMIDNV;"
|
||||
// GL_ARM_shader_core_builtins
|
||||
"in highp uint gl_CoreIDARM;"
|
||||
"in highp uint gl_CoreCountARM;"
|
||||
"in highp uint gl_CoreMaxIDARM;"
|
||||
"in highp uint gl_WarpIDARM;"
|
||||
"in highp uint gl_WarpMaxIDARM;"
|
||||
"\n";
|
||||
|
||||
stageBuiltins[EShLangVertex] .append(subgroupDecls);
|
||||
|
@ -5940,6 +6038,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"in uint gl_IncomingRayFlagsEXT;"
|
||||
"in float gl_CurrentRayTimeNV;"
|
||||
"in uint gl_CullMaskEXT;"
|
||||
"in vec3 gl_HitTriangleVertexPositionsEXT[3];"
|
||||
"\n";
|
||||
const char *missDecls =
|
||||
"in uvec3 gl_LaunchIDNV;"
|
||||
|
@ -6067,8 +6166,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
// printf("%s\n", commonBuiltins.c_str());
|
||||
|
@ -6088,7 +6185,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
|
||||
// enumerate all the types
|
||||
const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint,
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
EbtFloat16
|
||||
#endif
|
||||
};
|
||||
|
@ -6121,12 +6218,10 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not
|
||||
#ifdef GLSLANG_WEB
|
||||
for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
|
||||
#else
|
||||
#if defined(GLSLANG_ANGLE)
|
||||
for (int dim = Esd2D; dim < EsdNumDims; ++dim) { // 2D, ..., buffer, subpass
|
||||
#else
|
||||
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
|
||||
#endif
|
||||
if (dim == EsdAttachmentEXT)
|
||||
continue;
|
||||
if (dim == EsdSubpass && spvVersion.vulkan == 0)
|
||||
continue;
|
||||
if (dim == EsdSubpass && (image || shadow || arrayed))
|
||||
|
@ -6172,6 +6267,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||
#ifndef GLSLANG_WEB
|
||||
if (dim == EsdSubpass) {
|
||||
sampler.setSubpass(bTypes[bType], ms ? true : false);
|
||||
} else if (dim == EsdAttachmentEXT) {
|
||||
sampler.setAttachmentEXT(bTypes[bType]);
|
||||
} else
|
||||
#endif
|
||||
if (image) {
|
||||
|
@ -6578,9 +6675,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -6657,7 +6751,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
continue;
|
||||
|
||||
// loop over 16-bit floating-point texel addressing
|
||||
#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int f16TexAddr = 0;
|
||||
#else
|
||||
for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr)
|
||||
|
@ -6670,7 +6764,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
totalDims--;
|
||||
}
|
||||
// loop over "bool" lod clamp
|
||||
#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int lodClamp = 0;
|
||||
#else
|
||||
for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp)
|
||||
|
@ -6682,7 +6776,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName,
|
|||
continue;
|
||||
|
||||
// loop over "bool" sparse or not
|
||||
#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE)
|
||||
#if defined(GLSLANG_WEB)
|
||||
const int sparse = 0;
|
||||
#else
|
||||
for (int sparse = 0; sparse <= 1; ++sparse)
|
||||
|
@ -6866,9 +6960,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in
|
|||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
|
||||
switch (sampler.dim) {
|
||||
|
@ -7112,9 +7203,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
version = 450;
|
||||
profile = ECoreProfile;
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -7547,7 +7635,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
s.append("\n");
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// atomic counters (some in compute below)
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 420)) {
|
||||
|
@ -7584,7 +7671,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
|
||||
s.append("\n");
|
||||
}
|
||||
#endif // !GLSLANG_ANGLE
|
||||
|
||||
// GL_ARB_cull_distance
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
|
@ -7601,7 +7687,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// SPV_NV_mesh_shader
|
||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV);
|
||||
|
@ -7624,7 +7709,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
|
||||
s.append("\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
s.append("\n");
|
||||
|
@ -7731,9 +7815,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
#ifdef GLSLANG_WEB
|
||||
version = 310;
|
||||
profile = EEsProfile;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
version = 450;
|
||||
profile = ECoreProfile;
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -8092,6 +8173,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
|
||||
if (language == EShLangGeometry || language == EShLangVertex) {
|
||||
|
@ -8166,6 +8260,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query);
|
||||
symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch);
|
||||
symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
|
||||
symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling);
|
||||
symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap);
|
||||
|
@ -8607,6 +8702,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
|
||||
if (profile == EEsProfile) {
|
||||
|
@ -8647,6 +8755,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||
}
|
||||
|
||||
// GL_EXT_shader_tile_image
|
||||
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||
#endif // !GLSLANG_WEB
|
||||
break;
|
||||
|
||||
|
@ -8750,6 +8863,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
|
||||
// GL_KHR_shader_subgroup
|
||||
|
@ -8793,7 +8919,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
#endif // !GLSLANG_WEB
|
||||
break;
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
case EShLangRayGen:
|
||||
case EShLangIntersect:
|
||||
case EShLangAnyHit:
|
||||
|
@ -8837,6 +8963,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur);
|
||||
symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch);
|
||||
|
||||
symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group);
|
||||
|
||||
|
@ -8851,6 +8978,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing);
|
||||
symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing);
|
||||
|
||||
symbolTable.setFunctionExtensions("hitObjectTraceRayNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectTraceRayMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordMissNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordMissMotionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectRecordEmptyNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectExecuteShaderNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsEmptyNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsMissNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectIsHitNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetRayTMinNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetRayTMaxNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetObjectRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetObjectRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetWorldToObjectNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetbjectToWorldNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetInstanceCustomIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetInstanceIdNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetGeometryIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetPrimitiveIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetHitKindNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetAttributesNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder);
|
||||
|
||||
|
||||
BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable);
|
||||
BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable);
|
||||
|
@ -8888,6 +9047,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable);
|
||||
BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable);
|
||||
BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable);
|
||||
BuiltInVariable("gl_HitTriangleVertexPositionsEXT", EbvPositionFetch, symbolTable);
|
||||
|
||||
// GL_ARB_shader_ballot
|
||||
symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot);
|
||||
|
@ -8944,6 +9104,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 450)) {
|
||||
|
@ -9150,6 +9323,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
|
@ -9280,6 +9466,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable);
|
||||
BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable);
|
||||
|
||||
// GL_ARM_shader_core_builtins
|
||||
symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins);
|
||||
|
||||
BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable);
|
||||
BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable);
|
||||
BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable);
|
||||
}
|
||||
if ((profile == EEsProfile && version >= 310) ||
|
||||
(profile != EEsProfile && version >= 450)) {
|
||||
|
@ -9773,6 +9972,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject);
|
||||
symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT);
|
||||
}
|
||||
|
||||
symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid);
|
||||
|
@ -9785,6 +9985,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock);
|
||||
symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock);
|
||||
|
||||
symbolTable.relateToOperator("stencilAttachmentReadEXT", EOpStencilAttachmentReadEXT);
|
||||
symbolTable.relateToOperator("depthAttachmentReadEXT", EOpDepthAttachmentReadEXT);
|
||||
symbolTable.relateToOperator("colorAttachmentReadEXT", EOpColorAttachmentReadEXT);
|
||||
|
||||
break;
|
||||
|
||||
case EShLangCompute:
|
||||
|
@ -9815,6 +10019,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR);
|
||||
symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV);
|
||||
symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR);
|
||||
|
||||
symbolTable.relateToOperator("hitObjectTraceRayNV", EOpHitObjectTraceRayNV);
|
||||
symbolTable.relateToOperator("hitObjectTraceRayMotionNV", EOpHitObjectTraceRayMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitNV", EOpHitObjectRecordHitNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitMotionNV", EOpHitObjectRecordHitMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitWithIndexNV", EOpHitObjectRecordHitWithIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordHitWithIndexMotionNV", EOpHitObjectRecordHitWithIndexMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordMissNV", EOpHitObjectRecordMissNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordMissMotionNV", EOpHitObjectRecordMissMotionNV);
|
||||
symbolTable.relateToOperator("hitObjectRecordEmptyNV", EOpHitObjectRecordEmptyNV);
|
||||
symbolTable.relateToOperator("hitObjectExecuteShaderNV", EOpHitObjectExecuteShaderNV);
|
||||
symbolTable.relateToOperator("hitObjectIsEmptyNV", EOpHitObjectIsEmptyNV);
|
||||
symbolTable.relateToOperator("hitObjectIsMissNV", EOpHitObjectIsMissNV);
|
||||
symbolTable.relateToOperator("hitObjectIsHitNV", EOpHitObjectIsHitNV);
|
||||
symbolTable.relateToOperator("hitObjectGetRayTMinNV", EOpHitObjectGetRayTMinNV);
|
||||
symbolTable.relateToOperator("hitObjectGetRayTMaxNV", EOpHitObjectGetRayTMaxNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectRayOriginNV", EOpHitObjectGetObjectRayOriginNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectRayDirectionNV", EOpHitObjectGetObjectRayDirectionNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldRayOriginNV", EOpHitObjectGetWorldRayOriginNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldRayDirectionNV", EOpHitObjectGetWorldRayDirectionNV);
|
||||
symbolTable.relateToOperator("hitObjectGetWorldToObjectNV", EOpHitObjectGetWorldToObjectNV);
|
||||
symbolTable.relateToOperator("hitObjectGetObjectToWorldNV", EOpHitObjectGetObjectToWorldNV);
|
||||
symbolTable.relateToOperator("hitObjectGetInstanceCustomIndexNV", EOpHitObjectGetInstanceCustomIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetInstanceIdNV", EOpHitObjectGetInstanceIdNV);
|
||||
symbolTable.relateToOperator("hitObjectGetGeometryIndexNV", EOpHitObjectGetGeometryIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetPrimitiveIndexNV", EOpHitObjectGetPrimitiveIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetHitKindNV", EOpHitObjectGetHitKindNV);
|
||||
symbolTable.relateToOperator("hitObjectGetAttributesNV", EOpHitObjectGetAttributesNV);
|
||||
symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV);
|
||||
symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV);
|
||||
symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV);
|
||||
symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV);
|
||||
}
|
||||
break;
|
||||
case EShLangIntersect:
|
||||
|
@ -9876,10 +10112,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
#if defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
if (profile != EEsProfile && version >= 430 && version < 440) {
|
||||
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts);
|
||||
symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts);
|
||||
|
|
|
@ -352,7 +352,7 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT
|
|||
TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child,
|
||||
const TSourceLoc& loc)
|
||||
{
|
||||
if (child == 0)
|
||||
if (child == nullptr)
|
||||
return nullptr;
|
||||
|
||||
if (child->getType().getBasicType() == EbtBlock)
|
||||
|
@ -751,6 +751,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne
|
|||
case EbtInt64: newOp = EOpConvInt64ToUint; break;
|
||||
case EbtUint64: newOp = EOpConvUint64ToUint; break;
|
||||
#endif
|
||||
// For bindless texture type conversion, add a dummy convert op, just
|
||||
// to generate a new TIntermTyped
|
||||
// uvec2(any sampler type)
|
||||
// uvec2(any image type)
|
||||
case EbtSampler: newOp = EOpConvIntToUint; break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
//
|
||||
switch (node->getBasicType()) {
|
||||
case EbtSampler:
|
||||
if (extensionTurnedOn(E_GL_ARB_bindless_texture) == false)
|
||||
message = "can't modify a sampler";
|
||||
break;
|
||||
case EbtVoid:
|
||||
|
@ -174,6 +175,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
case EbtRayQuery:
|
||||
message = "can't modify rayQueryEXT";
|
||||
break;
|
||||
case EbtHitObjectNV:
|
||||
message = "can't modify hitObjectNV";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
|
@ -231,12 +235,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op,
|
|||
// Test for and give an error if the node can't be read from.
|
||||
void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node)
|
||||
{
|
||||
TIntermBinary* binaryNode = node->getAsBinaryNode();
|
||||
const TIntermSymbol* symNode = node->getAsSymbolNode();
|
||||
|
||||
if (! node)
|
||||
return;
|
||||
|
||||
TIntermBinary* binaryNode = node->getAsBinaryNode();
|
||||
const TIntermSymbol* symNode = node->getAsSymbolNode();
|
||||
|
||||
if (node->getQualifier().isWriteOnly()) {
|
||||
const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true);
|
||||
|
||||
|
|
|
@ -80,10 +80,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
|
|||
globalBufferDefaults.layoutMatrix = ElmColumnMajor;
|
||||
globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared;
|
||||
|
||||
// use storage buffer on SPIR-V 1.3 and up
|
||||
if (spvVersion.spv >= EShTargetSpv_1_3)
|
||||
intermediate.setUseStorageBuffer();
|
||||
|
||||
globalInputDefaults.clear();
|
||||
globalOutputDefaults.clear();
|
||||
|
||||
|
@ -608,6 +604,15 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
|
|||
#ifndef GLSLANG_WEB
|
||||
if (base->getType().isUnsizedArray()) {
|
||||
base->getWritableType().updateImplicitArraySize(indexValue + 1);
|
||||
base->getWritableType().setImplicitlySized(true);
|
||||
if (base->getQualifier().builtIn == EbvClipDistance &&
|
||||
indexValue >= resources.maxClipDistances) {
|
||||
error(loc, "gl_ClipDistance", "[", "array index out of range '%d'", indexValue);
|
||||
}
|
||||
else if (base->getQualifier().builtIn == EbvCullDistance &&
|
||||
indexValue >= resources.maxCullDistances) {
|
||||
error(loc, "gl_CullDistance", "[", "array index out of range '%d'", indexValue);
|
||||
}
|
||||
// For 2D per-view builtin arrays, update the inner dimension size in parent type
|
||||
if (base->getQualifier().isPerView() && base->getQualifier().builtIn != EbvNone) {
|
||||
TIntermBinary* binaryNode = base->getAsBinaryNode();
|
||||
|
@ -836,12 +841,16 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString *
|
|||
} else if (language == EShLangMesh) {
|
||||
unsigned int maxPrimitives =
|
||||
intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0;
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV || qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT ||
|
||||
qualifier.builtIn == EbvPrimitiveLineIndicesEXT || qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
|
||||
if (qualifier.builtIn == EbvPrimitiveIndicesNV) {
|
||||
expectedSize = maxPrimitives * TQualifier::mapGeometryToSize(intermediate.getOutputPrimitive());
|
||||
str = "max_primitives*";
|
||||
str += TQualifier::getGeometryString(intermediate.getOutputPrimitive());
|
||||
}
|
||||
else if (qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT || qualifier.builtIn == EbvPrimitiveLineIndicesEXT ||
|
||||
qualifier.builtIn == EbvPrimitivePointIndicesEXT) {
|
||||
expectedSize = maxPrimitives;
|
||||
str = "max_primitives";
|
||||
}
|
||||
else if (qualifier.isPerPrimitive()) {
|
||||
expectedSize = maxPrimitives;
|
||||
str = "max_primitives";
|
||||
|
@ -1022,14 +1031,22 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
|
|||
inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier());
|
||||
} else {
|
||||
auto baseSymbol = base;
|
||||
while (baseSymbol->getAsSymbolNode() == nullptr)
|
||||
baseSymbol = baseSymbol->getAsBinaryNode()->getLeft();
|
||||
while (baseSymbol->getAsSymbolNode() == nullptr) {
|
||||
auto binaryNode = baseSymbol->getAsBinaryNode();
|
||||
if (binaryNode == nullptr) break;
|
||||
baseSymbol = binaryNode->getLeft();
|
||||
}
|
||||
if (baseSymbol->getAsSymbolNode() != nullptr) {
|
||||
TString structName;
|
||||
structName.append("\'").append(baseSymbol->getAsSymbolNode()->getName().c_str()).append("\'");
|
||||
error(loc, "no such field in structure", field.c_str(), structName.c_str());
|
||||
} else {
|
||||
error(loc, "no such field in structure", field.c_str(), "");
|
||||
}
|
||||
}
|
||||
} else
|
||||
error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str());
|
||||
error(loc, "does not apply to this type:", field.c_str(),
|
||||
base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str());
|
||||
|
||||
// Propagate noContraction up the dereference chain
|
||||
if (base->getQualifier().isNoContraction())
|
||||
|
@ -1161,7 +1178,7 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct
|
|||
if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst)
|
||||
symbol = nullptr;
|
||||
#endif
|
||||
const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
|
||||
const TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr;
|
||||
if (prevDec) {
|
||||
if (prevDec->isPrototyped() && prototype)
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function");
|
||||
|
@ -1385,7 +1402,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||
#endif
|
||||
const TType& argType = arg->getAsTyped()->getType();
|
||||
const TQualifier& argQualifier = argType.getQualifier();
|
||||
if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) {
|
||||
bool containsBindlessSampler = intermediate.getBindlessMode() && argType.containsSampler();
|
||||
if (argQualifier.isMemory() && !containsBindlessSampler && (argType.containsOpaque() || argType.isReference())) {
|
||||
const char* message = "argument cannot drop memory qualifier when passed to formal parameter";
|
||||
#ifndef GLSLANG_WEB
|
||||
if (argQualifier.volatil && ! formalQualifier.volatil)
|
||||
|
@ -1671,9 +1689,13 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType
|
|||
error(loc, "type does not match, or is not convertible to, the function's return type", "return", "");
|
||||
branch = intermediate.addBranch(EOpReturn, value, loc);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
if (value->getType().isTexture() || value->getType().isImage()) {
|
||||
if (!extensionTurnedOn(E_GL_ARB_bindless_texture))
|
||||
error(loc, "sampler or image can be used as return type only when the extension GL_ARB_bindless_texture enabled", "return", "");
|
||||
}
|
||||
branch = intermediate.addBranch(EOpReturn, value, loc);
|
||||
|
||||
}
|
||||
branch->updatePrecision(currentFunctionType->getQualifier().precision);
|
||||
return branch;
|
||||
}
|
||||
|
@ -1924,6 +1946,9 @@ TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TInt
|
|||
if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference())
|
||||
requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "+= and -= on a buffer reference");
|
||||
|
||||
if (op == EOpAssign && left->getBasicType() == EbtSampler && right->getBasicType() == EbtSampler)
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler assignment for bindless texture");
|
||||
|
||||
return intermediate.addAssign(op, left, right, loc);
|
||||
}
|
||||
|
||||
|
@ -2356,6 +2381,79 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||
}
|
||||
break;
|
||||
|
||||
case EOpHitObjectTraceRayNV:
|
||||
if (!(*argp)[11]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectTraceRayMotionNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectExecuteShaderNV:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "payload number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0)
|
||||
error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitMotionNV:
|
||||
if (!(*argp)[13]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[13]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitWithIndexNV:
|
||||
if (!(*argp)[11]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectRecordHitWithIndexMotionNV:
|
||||
if (!(*argp)[12]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
case EOpHitObjectGetAttributesNV:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "hitobjectattribute number", "");
|
||||
else {
|
||||
unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst();
|
||||
if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0)
|
||||
error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location);
|
||||
}
|
||||
break;
|
||||
|
||||
case EOpRayQueryGetIntersectionType:
|
||||
case EOpRayQueryGetIntersectionT:
|
||||
case EOpRayQueryGetIntersectionInstanceCustomIndex:
|
||||
|
@ -2369,6 +2467,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||
case EOpRayQueryGetIntersectionObjectRayOrigin:
|
||||
case EOpRayQueryGetIntersectionObjectToWorld:
|
||||
case EOpRayQueryGetIntersectionWorldToObject:
|
||||
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT:
|
||||
if (!(*argp)[1]->getAsConstantUnion())
|
||||
error(loc, "argument must be compile-time constant", "committed", "");
|
||||
break;
|
||||
|
@ -2807,6 +2906,14 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu
|
|||
profileRequires(loc, EEsProfile, 300, nullptr, "arrayed constructor");
|
||||
}
|
||||
|
||||
// Reuse EOpConstructTextureSampler for bindless image constructor
|
||||
// uvec2 imgHandle;
|
||||
// imageLoad(image1D(imgHandle), 0);
|
||||
if (type.isImage() && extensionTurnedOn(E_GL_ARB_bindless_texture))
|
||||
{
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc);
|
||||
}
|
||||
|
||||
TOperator op = intermediate.mapTypeToConstructorOp(type);
|
||||
|
||||
if (op == EOpNull) {
|
||||
|
@ -3136,7 +3243,7 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
|
|||
ppWarn(loc, "\"defined\" is (un)defined:", op, identifier);
|
||||
else
|
||||
ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
|
||||
else if (strstr(identifier, "__") != 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
|
||||
else if (strstr(identifier, "__") != nullptr && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
|
||||
// The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__".
|
||||
if (isEsProfile() && version >= 300 &&
|
||||
(strcmp(identifier, "__LINE__") == 0 ||
|
||||
|
@ -3540,9 +3647,14 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
|
|||
return true;
|
||||
}
|
||||
if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) {
|
||||
if (op == EOpConstructUVec2 && extensionTurnedOn(E_GL_ARB_bindless_texture)) {
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc);
|
||||
}
|
||||
else {
|
||||
error(loc, "cannot convert a sampler", constructorString.c_str(), "");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (op != EOpConstructStruct && typed->isAtomic()) {
|
||||
error(loc, "cannot convert an atomic_uint", constructorString.c_str(), "");
|
||||
return true;
|
||||
|
@ -3561,6 +3673,26 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
|
|||
{
|
||||
TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change
|
||||
const char* token = constructorName.c_str();
|
||||
// verify the constructor for bindless texture, the input must be ivec2 or uvec2
|
||||
if (function.getParamCount() == 1) {
|
||||
TType* pType = function[0].type;
|
||||
TBasicType basicType = pType->getBasicType();
|
||||
bool isIntegerVec2 = ((basicType == EbtUint || basicType == EbtInt) && pType->getVectorSize() == 2);
|
||||
bool bindlessMode = extensionTurnedOn(E_GL_ARB_bindless_texture);
|
||||
if (isIntegerVec2 && bindlessMode) {
|
||||
if (pType->getSampler().isImage())
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc);
|
||||
else
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc);
|
||||
return false;
|
||||
} else {
|
||||
if (!bindlessMode)
|
||||
error(loc, "sampler-constructor requires the extension GL_ARB_bindless_texture enabled", token, "");
|
||||
else
|
||||
error(loc, "sampler-constructor requires the input to be ivec2 or uvec2", token, "");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// exactly two arguments needed
|
||||
if (function.getParamCount() != 2) {
|
||||
|
@ -3656,15 +3788,37 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const
|
|||
if (type.getQualifier().storage == EvqUniform)
|
||||
return;
|
||||
|
||||
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler))
|
||||
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) {
|
||||
// For bindless texture, sampler can be declared as an struct member
|
||||
if (extensionTurnedOn(E_GL_ARB_bindless_texture)) {
|
||||
if (type.getSampler().isImage())
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar);
|
||||
else
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar);
|
||||
}
|
||||
else {
|
||||
error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
}
|
||||
}
|
||||
else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) {
|
||||
// For bindless texture, sampler can be declared as an input/output/block member
|
||||
if (extensionTurnedOn(E_GL_ARB_bindless_texture)) {
|
||||
if (type.getSampler().isImage())
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar);
|
||||
else
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar);
|
||||
}
|
||||
else {
|
||||
// non-uniform sampler
|
||||
// not yet: okay if it has an initializer
|
||||
// if (! initializer)
|
||||
if (type.getSampler().isAttachmentEXT() && type.getQualifier().storage != EvqTileImageEXT)
|
||||
error(loc, "can only be used in tileImageEXT variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
else if (type.getQualifier().storage != EvqTileImageEXT)
|
||||
error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
|
||||
|
@ -3728,7 +3882,7 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType)
|
|||
//
|
||||
// Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level.
|
||||
//
|
||||
void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck)
|
||||
void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck, const TPublicType* publicType)
|
||||
{
|
||||
bool nonuniformOkay = false;
|
||||
|
||||
|
@ -3764,6 +3918,11 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
|
|||
{
|
||||
requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform");
|
||||
}
|
||||
|
||||
if (publicType != nullptr && publicType->isImage() &&
|
||||
(qualifier.layoutFormat > ElfExtSizeGuard && qualifier.layoutFormat < ElfCount))
|
||||
qualifier.layoutFormat = mapLegacyLayoutFormat(qualifier.layoutFormat, publicType->sampler.getBasicType());
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3824,8 +3983,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
|||
return;
|
||||
}
|
||||
|
||||
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble)
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output");
|
||||
if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) {
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "non-float shader input/output");
|
||||
profileRequires(loc, ~EEsProfile, 130, nullptr, "non-float shader input/output");
|
||||
}
|
||||
|
||||
if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) {
|
||||
if (isTypeInt(publicType.basicType) ||
|
||||
|
@ -3856,7 +4017,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
|||
switch (language) {
|
||||
case EShLangVertex:
|
||||
if (publicType.basicType == EbtStruct) {
|
||||
error(loc, "cannot be a structure or array", GetStorageQualifierString(qualifier.storage), "");
|
||||
error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), "");
|
||||
return;
|
||||
}
|
||||
if (publicType.arraySizes) {
|
||||
|
@ -4071,7 +4232,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
|||
if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end())
|
||||
error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first);
|
||||
else
|
||||
dstSpirvDecorate.decorates.insert(decorateString);
|
||||
dstSpirvDecorate.decorateStrings.insert(decorateString);
|
||||
}
|
||||
} else {
|
||||
dst.spirvDecorate = src.spirvDecorate;
|
||||
|
@ -4168,7 +4329,7 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba
|
|||
|
||||
void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier qualifier, const TType& type)
|
||||
{
|
||||
if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque())
|
||||
if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque() && !intermediate.getBindlessMode())
|
||||
error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), "");
|
||||
if (!parsingBuiltins && type.contains16BitFloat())
|
||||
requireFloat16Arithmetic(loc, type.getBasicTypeString().c_str(), "float16 types can only be in uniform block or buffer storage");
|
||||
|
@ -4512,7 +4673,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
|
|||
|
||||
// check for additional things allowed by GL_EXT_nonuniform_qualifier
|
||||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery ||
|
||||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
base.getBasicType() == EbtHitObjectNV || (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
|
||||
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
|
||||
else
|
||||
error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable");
|
||||
|
@ -5015,6 +5176,7 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu
|
|||
case EvqIn:
|
||||
case EvqOut:
|
||||
case EvqInOut:
|
||||
case EvqTileImageEXT:
|
||||
type.getQualifier().storage = qualifier;
|
||||
break;
|
||||
case EvqGlobal:
|
||||
|
@ -5101,7 +5263,7 @@ void TParseContext::arrayObjectCheck(const TSourceLoc& loc, const TType& type, c
|
|||
|
||||
void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const char* op)
|
||||
{
|
||||
if (containsFieldWithBasicType(type, EbtSampler))
|
||||
if (containsFieldWithBasicType(type, EbtSampler) && !extensionTurnedOn(E_GL_ARB_bindless_texture))
|
||||
error(loc, "can't use with samplers or structs containing samplers", op, "");
|
||||
}
|
||||
|
||||
|
@ -5202,7 +5364,7 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init,
|
|||
bool badInit = false;
|
||||
if (! init || ! init->getAsAggregate() || init->getAsAggregate()->getSequence().size() != 1)
|
||||
badInit = true;
|
||||
TIntermBinary* binaryInit = 0;
|
||||
TIntermBinary* binaryInit = nullptr;
|
||||
if (! badInit) {
|
||||
// get the declaration assignment
|
||||
binaryInit = init->getAsAggregate()->getSequence()[0]->getAsBinaryNode();
|
||||
|
@ -5476,6 +5638,28 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
intermediate.setUsePhysicalStorageBuffer();
|
||||
return;
|
||||
}
|
||||
if (id == "bindless_sampler") {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_sampler");
|
||||
publicType.qualifier.layoutBindlessSampler = true;
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout);
|
||||
return;
|
||||
}
|
||||
if (id == "bindless_image") {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_image");
|
||||
publicType.qualifier.layoutBindlessImage = true;
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout);
|
||||
return;
|
||||
}
|
||||
if (id == "bound_sampler") {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_sampler");
|
||||
publicType.qualifier.layoutBindlessSampler = false;
|
||||
return;
|
||||
}
|
||||
if (id == "bound_image") {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_image");
|
||||
publicType.qualifier.layoutBindlessImage = false;
|
||||
return;
|
||||
}
|
||||
if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMesh) {
|
||||
if (id == TQualifier::getGeometryString(ElgTriangles)) {
|
||||
publicType.shaderQualifiers.geometry = ElgTriangles;
|
||||
|
@ -5600,6 +5784,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
publicType.shaderQualifiers.postDepthCoverage = true;
|
||||
return;
|
||||
}
|
||||
/* id is transformed into lower case in the beginning of this function. */
|
||||
if (id == "non_coherent_color_attachment_readext") {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_color_attachment_readEXT");
|
||||
publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT = true;
|
||||
return;
|
||||
}
|
||||
if (id == "non_coherent_depth_attachment_readext") {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_depth_attachment_readEXT");
|
||||
publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT = true;
|
||||
return;
|
||||
}
|
||||
if (id == "non_coherent_stencil_attachment_readext") {
|
||||
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_stencil_attachment_readEXT");
|
||||
publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT = true;
|
||||
return;
|
||||
}
|
||||
for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) {
|
||||
if (id == TQualifier::getLayoutDepthString(depth)) {
|
||||
requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier");
|
||||
|
@ -5670,6 +5870,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
}
|
||||
publicType.qualifier.layoutShaderRecord = true;
|
||||
return;
|
||||
} else if (id == "hitobjectshaderrecordnv") {
|
||||
requireExtensions(loc, 1, &E_GL_NV_shader_invocation_reorder, "hitobject shader record NV");
|
||||
publicType.qualifier.layoutHitObjectShaderRecordNV = true;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5973,8 +6177,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
if (id == "max_vertices") {
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_vertices");
|
||||
publicType.shaderQualifiers.vertices = value;
|
||||
if (value > resources.maxMeshOutputVerticesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputVerticesNV", "max_vertices", "");
|
||||
int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputVerticesEXT
|
||||
: resources.maxMeshOutputVerticesNV;
|
||||
if (value > max) {
|
||||
TString maxsErrtring = "too large, must be less than ";
|
||||
maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputVerticesEXT"
|
||||
: "gl_MaxMeshOutputVerticesNV");
|
||||
error(loc, maxsErrtring.c_str(), "max_vertices", "");
|
||||
}
|
||||
if (nonLiteral)
|
||||
error(loc, "needs a literal integer", "max_vertices", "");
|
||||
return;
|
||||
|
@ -5982,8 +6192,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
if (id == "max_primitives") {
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_primitives");
|
||||
publicType.shaderQualifiers.primitives = value;
|
||||
if (value > resources.maxMeshOutputPrimitivesNV)
|
||||
error(loc, "too large, must be less than gl_MaxMeshOutputPrimitivesNV", "max_primitives", "");
|
||||
int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputPrimitivesEXT
|
||||
: resources.maxMeshOutputPrimitivesNV;
|
||||
if (value > max) {
|
||||
TString maxsErrtring = "too large, must be less than ";
|
||||
maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputPrimitivesEXT"
|
||||
: "gl_MaxMeshOutputPrimitivesNV");
|
||||
error(loc, maxsErrtring.c_str(), "max_primitives", "");
|
||||
}
|
||||
if (nonLiteral)
|
||||
error(loc, "needs a literal integer", "max_primitives", "");
|
||||
return;
|
||||
|
@ -5999,7 +6215,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
if (language == EShLangMesh || language == EShLangTask) {
|
||||
requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "gl_WorkGroupSize");
|
||||
} else {
|
||||
profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize");
|
||||
profileRequires(loc, EEsProfile, 310, nullptr, "gl_WorkGroupSize");
|
||||
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize");
|
||||
}
|
||||
#endif
|
||||
|
@ -6121,10 +6337,16 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie
|
|||
dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset;
|
||||
if (src.layoutShaderRecord)
|
||||
dst.layoutShaderRecord = true;
|
||||
if (src.layoutBindlessSampler)
|
||||
dst.layoutBindlessSampler = true;
|
||||
if (src.layoutBindlessImage)
|
||||
dst.layoutBindlessImage = true;
|
||||
if (src.pervertexNV)
|
||||
dst.pervertexNV = true;
|
||||
if (src.pervertexEXT)
|
||||
dst.pervertexEXT = true;
|
||||
if (src.layoutHitObjectShaderRecordNV)
|
||||
dst.layoutHitObjectShaderRecordNV = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -6272,6 +6494,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
case EvqBuffer:
|
||||
if (type.getBasicType() == EbtBlock)
|
||||
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
||||
else if (type.getBasicType() == EbtSampler && type.getSampler().isAttachmentEXT())
|
||||
error(loc, "only applies to", "location", "%s with storage tileImageEXT", type.getBasicTypeString().c_str());
|
||||
break;
|
||||
case EvqtaskPayloadSharedEXT:
|
||||
error(loc, "cannot apply to taskPayloadSharedEXT", "location", "");
|
||||
|
@ -6282,8 +6506,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
case EvqHitAttr:
|
||||
case EvqCallableData:
|
||||
case EvqCallableDataIn:
|
||||
case EvqHitObjectAttrNV:
|
||||
break;
|
||||
#endif
|
||||
case EvqTileImageEXT:
|
||||
break;
|
||||
default:
|
||||
error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");
|
||||
break;
|
||||
|
@ -6293,10 +6520,10 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision);
|
||||
if (repeated >= 0 && ! typeCollision)
|
||||
error(loc, "overlapping use of location", "location", "%d", repeated);
|
||||
// "fragment-shader outputs ... if two variables are placed within the same
|
||||
// "fragment-shader outputs/tileImageEXT ... if two variables are placed within the same
|
||||
// location, they must have the same underlying type (floating-point or integer)"
|
||||
if (typeCollision && language == EShLangFragment && qualifier.isPipeOutput())
|
||||
error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated);
|
||||
if (typeCollision && language == EShLangFragment && (qualifier.isPipeOutput() || qualifier.storage == EvqTileImageEXT))
|
||||
error(loc, "fragment outputs or tileImageEXTs sharing the same location", "location", "%d must be the same basic type", repeated);
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
|
@ -6380,7 +6607,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
!qualifier.hasAttachment() &&
|
||||
!qualifier.hasBufferReference())
|
||||
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
||||
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler)
|
||||
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler && !type.getSampler().isAttachmentEXT())
|
||||
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
|
||||
}
|
||||
}
|
||||
|
@ -6402,7 +6629,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
|
||||
// Image format
|
||||
if (qualifier.hasFormat()) {
|
||||
if (! type.isImage())
|
||||
if (! type.isImage() && !intermediate.getBindlessImageMode())
|
||||
error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.getFormat()), "");
|
||||
else {
|
||||
if (type.getSampler().type == EbtFloat && qualifier.getFormat() > ElfFloatGuard)
|
||||
|
@ -6421,7 +6648,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (type.isImage() && ! qualifier.isWriteOnly()) {
|
||||
} else if (type.isImage() && ! qualifier.isWriteOnly() && !intermediate.getBindlessImageMode()) {
|
||||
const char *explanation = "image variables not declared 'writeonly' and without a format layout qualifier";
|
||||
requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation);
|
||||
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation);
|
||||
|
@ -6442,6 +6669,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||
|
||||
// input attachment
|
||||
if (type.isSubpass()) {
|
||||
if (extensionTurnedOn(E_GL_EXT_shader_tile_image))
|
||||
error(loc, "can not be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), "");
|
||||
if (! qualifier.hasAttachment())
|
||||
error(loc, "requires an input_attachment_index layout qualifier", "subpass", "");
|
||||
} else {
|
||||
|
@ -6609,6 +6838,14 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||
error(loc, "cannot be used with shaderRecordNV", "set", "");
|
||||
|
||||
}
|
||||
|
||||
if (qualifier.storage == EvqTileImageEXT) {
|
||||
if (qualifier.hasSet())
|
||||
error(loc, "cannot be used with tileImageEXT", "set", "");
|
||||
if (!qualifier.hasLocation())
|
||||
error(loc, "can only be used with an explicit location", "tileImageEXT", "");
|
||||
}
|
||||
|
||||
if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) {
|
||||
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
|
||||
}
|
||||
|
@ -6648,6 +6885,12 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
|
|||
error(loc, message, "early_fragment_tests", "");
|
||||
if (shaderQualifiers.postDepthCoverage)
|
||||
error(loc, message, "post_depth_coverage", "");
|
||||
if (shaderQualifiers.nonCoherentColorAttachmentReadEXT)
|
||||
error(loc, message, "non_coherent_color_attachment_readEXT", "");
|
||||
if (shaderQualifiers.nonCoherentDepthAttachmentReadEXT)
|
||||
error(loc, message, "non_coherent_depth_attachment_readEXT", "");
|
||||
if (shaderQualifiers.nonCoherentStencilAttachmentReadEXT)
|
||||
error(loc, message, "non_coherent_stencil_attachment_readEXT", "");
|
||||
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||
if (language == EShLangMesh)
|
||||
error(loc, message, "max_primitives", "");
|
||||
|
@ -7066,7 +7309,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T
|
|||
realFunc.addParameter(TParameter().copyParam((*function)[i]));
|
||||
}
|
||||
|
||||
TParameter tmpP = { 0, &uintType };
|
||||
TParameter tmpP = { nullptr, &uintType };
|
||||
realFunc.addParameter(TParameter().copyParam(tmpP));
|
||||
arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true));
|
||||
|
||||
|
@ -7083,7 +7326,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T
|
|||
realFunc.addParameter(TParameter().copyParam((*function)[i]));
|
||||
}
|
||||
|
||||
TParameter tmpP = { 0, &uintType };
|
||||
TParameter tmpP = { nullptr, &uintType };
|
||||
realFunc.addParameter(TParameter().copyParam(tmpP));
|
||||
arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true));
|
||||
|
||||
|
@ -7237,7 +7480,10 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||
if (initializer) {
|
||||
if (type.getBasicType() == EbtRayQuery) {
|
||||
error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str());
|
||||
} else if (type.getBasicType() == EbtHitObjectNV) {
|
||||
error(loc, "hit objects cannot be initialized using initializers", "=", identifier.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (type.isCoopMat()) {
|
||||
|
@ -7729,6 +7975,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
|
|||
// Combined texture-sampler constructors are completely semantic checked
|
||||
// in constructorTextureSamplerError()
|
||||
if (op == EOpConstructTextureSampler) {
|
||||
if (aggrNode != nullptr) {
|
||||
if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) {
|
||||
// Transfer depth into the texture (SPIR-V image) type, as a hint
|
||||
// for tools to know this texture/image is a depth image.
|
||||
|
@ -7736,6 +7983,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode*
|
|||
}
|
||||
return intermediate.setAggregateOperator(aggrNode, op, type, loc);
|
||||
}
|
||||
}
|
||||
|
||||
TTypeList::const_iterator memberTypes;
|
||||
if (op == EOpConstructStruct)
|
||||
|
@ -7869,6 +8117,16 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||
TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUvec2, true, node,
|
||||
type);
|
||||
return newNode;
|
||||
} else if (node->getType().getBasicType() == EbtSampler) {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler conversion to uvec2");
|
||||
// force the basic type of the constructor param to uvec2, otherwise spv builder will
|
||||
// report some errors
|
||||
TIntermTyped* newSrcNode = intermediate.createConversion(EbtUint, node);
|
||||
newSrcNode->getAsTyped()->getWritableType().setVectorSize(2);
|
||||
|
||||
TIntermTyped* newNode =
|
||||
intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConstructUVec2, false, newSrcNode, type);
|
||||
return newNode;
|
||||
}
|
||||
case EOpConstructUVec3:
|
||||
case EOpConstructUVec4:
|
||||
|
@ -7882,7 +8140,15 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||
case EOpConstructBool:
|
||||
basicOp = EOpConstructBool;
|
||||
break;
|
||||
|
||||
case EOpConstructTextureSampler:
|
||||
if ((node->getType().getBasicType() == EbtUint || node->getType().getBasicType() == EbtInt) &&
|
||||
node->getType().getVectorSize() == 2) {
|
||||
requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "ivec2/uvec2 convert to texture handle");
|
||||
// No matter ivec2 or uvec2, Set EOpPackUint2x32 just to generate an opBitcast op code
|
||||
TIntermTyped* newNode =
|
||||
intermediate.addBuiltInFunctionCall(node->getLoc(), EOpPackUint2x32, true, node, type);
|
||||
return newNode;
|
||||
}
|
||||
#ifndef GLSLANG_WEB
|
||||
|
||||
case EOpConstructDVec2:
|
||||
|
@ -8229,6 +8495,30 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier&
|
|||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Update qualifier layoutBindlessImage & layoutBindlessSampler on block member
|
||||
//
|
||||
void TParseContext::updateBindlessQualifier(TType& memberType)
|
||||
{
|
||||
if (memberType.containsSampler()) {
|
||||
if (memberType.isStruct()) {
|
||||
TTypeList* typeList = memberType.getWritableStruct();
|
||||
for (unsigned int member = 0; member < typeList->size(); ++member) {
|
||||
TType* subMemberType = (*typeList)[member].type;
|
||||
updateBindlessQualifier(*subMemberType);
|
||||
}
|
||||
}
|
||||
else if (memberType.getSampler().isImage()) {
|
||||
intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout);
|
||||
memberType.getQualifier().layoutBindlessImage = true;
|
||||
}
|
||||
else {
|
||||
intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout);
|
||||
memberType.getQualifier().layoutBindlessSampler = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Do everything needed to add an interface block.
|
||||
//
|
||||
|
@ -8281,8 +8571,13 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||
}
|
||||
}
|
||||
|
||||
if (memberType.containsOpaque())
|
||||
// For bindless texture, sampler can be declared as uniform/storage block member,
|
||||
if (memberType.containsOpaque()) {
|
||||
if (memberType.containsSampler() && extensionTurnedOn(E_GL_ARB_bindless_texture))
|
||||
updateBindlessQualifier(memberType);
|
||||
else
|
||||
error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), "");
|
||||
}
|
||||
|
||||
if (memberType.containsCoopMat())
|
||||
error(memberLoc, "member of block cannot be or contain a cooperative matrix type", typeList[member].type->getFieldName().c_str(), "");
|
||||
|
@ -8615,6 +8910,10 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
|
|||
profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block");
|
||||
break;
|
||||
case EvqHitObjectAttrNV:
|
||||
profileRequires(loc, ~EEsProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV block");
|
||||
requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV block");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), "");
|
||||
|
@ -8771,7 +9070,8 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ
|
|||
// "The specified offset must be a multiple
|
||||
// of the base alignment of the type of the block member it qualifies, or a compile-time error results."
|
||||
if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment))
|
||||
error(memberLoc, "must be a multiple of the member's alignment", "offset", "");
|
||||
error(memberLoc, "must be a multiple of the member's alignment", "offset",
|
||||
"(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment);
|
||||
|
||||
// GLSL: "It is a compile-time error to specify an offset that is smaller than the offset of the previous
|
||||
// member in the block or that lies within the previous member of the block"
|
||||
|
@ -9200,6 +9500,24 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||
else
|
||||
error(loc, "can only apply to 'in'", "post_coverage_coverage", "");
|
||||
}
|
||||
if (publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT) {
|
||||
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||
intermediate.setNonCoherentColorAttachmentReadEXT();
|
||||
else
|
||||
error(loc, "can only apply to 'in'", "non_coherent_color_attachment_readEXT", "");
|
||||
}
|
||||
if (publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT) {
|
||||
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||
intermediate.setNonCoherentDepthAttachmentReadEXT();
|
||||
else
|
||||
error(loc, "can only apply to 'in'", "non_coherent_depth_attachment_readEXT", "");
|
||||
}
|
||||
if (publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT) {
|
||||
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||
intermediate.setNonCoherentStencilAttachmentReadEXT();
|
||||
else
|
||||
error(loc, "can only apply to 'in'", "non_coherent_stencil_attachment_readEXT", "");
|
||||
}
|
||||
if (publicType.shaderQualifiers.hasBlendEquation()) {
|
||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||
error(loc, "can only apply to 'out'", "blend equation", "");
|
||||
|
@ -9456,4 +9774,38 @@ const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TT
|
|||
return originStruct;
|
||||
}
|
||||
|
||||
TLayoutFormat TParseContext::mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType)
|
||||
{
|
||||
TLayoutFormat layoutFormat = ElfNone;
|
||||
if (imageType == EbtFloat) {
|
||||
switch (legacyLayoutFormat) {
|
||||
case ElfSize1x16: layoutFormat = ElfR16f; break;
|
||||
case ElfSize1x32: layoutFormat = ElfR32f; break;
|
||||
case ElfSize2x32: layoutFormat = ElfRg32f; break;
|
||||
case ElfSize4x32: layoutFormat = ElfRgba32f; break;
|
||||
default: break;
|
||||
}
|
||||
} else if (imageType == EbtUint) {
|
||||
switch (legacyLayoutFormat) {
|
||||
case ElfSize1x8: layoutFormat = ElfR8ui; break;
|
||||
case ElfSize1x16: layoutFormat = ElfR16ui; break;
|
||||
case ElfSize1x32: layoutFormat = ElfR32ui; break;
|
||||
case ElfSize2x32: layoutFormat = ElfRg32ui; break;
|
||||
case ElfSize4x32: layoutFormat = ElfRgba32ui; break;
|
||||
default: break;
|
||||
}
|
||||
} else if (imageType == EbtInt) {
|
||||
switch (legacyLayoutFormat) {
|
||||
case ElfSize1x8: layoutFormat = ElfR8i; break;
|
||||
case ElfSize1x16: layoutFormat = ElfR16i; break;
|
||||
case ElfSize1x32: layoutFormat = ElfR32i; break;
|
||||
case ElfSize2x32: layoutFormat = ElfRg32i; break;
|
||||
case ElfSize4x32: layoutFormat = ElfRgba32i; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
return layoutFormat;
|
||||
}
|
||||
|
||||
} // end namespace glslang
|
||||
|
|
|
@ -95,6 +95,10 @@ public:
|
|||
globalUniformSet(TQualifier::layoutSetEnd),
|
||||
atomicCounterBlockSet(TQualifier::layoutSetEnd)
|
||||
{
|
||||
// use storage buffer on SPIR-V 1.3 and up
|
||||
if (spvVersion.spv >= EShTargetSpv_1_3)
|
||||
intermediate.setUseStorageBuffer();
|
||||
|
||||
if (entryPoint != nullptr)
|
||||
sourceEntryPointName = *entryPoint;
|
||||
}
|
||||
|
@ -393,7 +397,7 @@ public:
|
|||
void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier);
|
||||
void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier);
|
||||
void memberQualifierCheck(glslang::TPublicType&);
|
||||
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false);
|
||||
void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false, const TPublicType* publicType = nullptr);
|
||||
void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&);
|
||||
bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType);
|
||||
void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force);
|
||||
|
@ -438,12 +442,12 @@ public:
|
|||
const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
|
||||
const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn);
|
||||
void declareTypeDefaults(const TSourceLoc&, const TPublicType&);
|
||||
TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0);
|
||||
TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = nullptr, TIntermTyped* initializer = nullptr);
|
||||
TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&);
|
||||
TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&);
|
||||
TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset);
|
||||
void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to);
|
||||
void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0);
|
||||
void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = nullptr, TArraySizes* arraySizes = nullptr);
|
||||
void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&);
|
||||
void blockStageIoCheck(const TSourceLoc&, const TQualifier&);
|
||||
void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName);
|
||||
|
@ -456,9 +460,11 @@ public:
|
|||
void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&);
|
||||
void invariantCheck(const TSourceLoc&, const TQualifier&);
|
||||
void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&);
|
||||
void updateBindlessQualifier(TType& memberType);
|
||||
void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode);
|
||||
TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body);
|
||||
const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*);
|
||||
TLayoutFormat mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType);
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
TAttributeType attributeFromName(const TString& name) const;
|
||||
|
|
|
@ -267,8 +267,8 @@ void* TPoolAllocator::allocate(size_t numBytes)
|
|||
//
|
||||
size_t numBytesToAlloc = allocationSize + headerSkip;
|
||||
tHeader* memory = reinterpret_cast<tHeader*>(::new char[numBytesToAlloc]);
|
||||
if (memory == 0)
|
||||
return 0;
|
||||
if (memory == nullptr)
|
||||
return nullptr;
|
||||
|
||||
// Use placement-new to initialize header
|
||||
new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize);
|
||||
|
@ -289,8 +289,8 @@ void* TPoolAllocator::allocate(size_t numBytes)
|
|||
freeList = freeList->nextPage;
|
||||
} else {
|
||||
memory = reinterpret_cast<tHeader*>(::new char[pageSize]);
|
||||
if (memory == 0)
|
||||
return 0;
|
||||
if (memory == nullptr)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Use placement-new to initialize header
|
||||
|
@ -308,7 +308,7 @@ void* TPoolAllocator::allocate(size_t numBytes)
|
|||
//
|
||||
void TAllocation::checkAllocList() const
|
||||
{
|
||||
for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc)
|
||||
for (const TAllocation* alloc = this; alloc != nullptr; alloc = alloc->prevAlloc)
|
||||
alloc->check();
|
||||
}
|
||||
|
||||
|
|
|
@ -343,6 +343,7 @@ void TScanContext::fillInKeywordMap()
|
|||
|
||||
(*KeywordMap)["const"] = CONST;
|
||||
(*KeywordMap)["uniform"] = UNIFORM;
|
||||
(*KeywordMap)["tileImageEXT"] = TILEIMAGEEXT;
|
||||
(*KeywordMap)["buffer"] = BUFFER;
|
||||
(*KeywordMap)["in"] = IN;
|
||||
(*KeywordMap)["out"] = OUT;
|
||||
|
@ -685,6 +686,10 @@ void TScanContext::fillInKeywordMap()
|
|||
(*KeywordMap)["texture2DRect"] = TEXTURE2DRECT;
|
||||
(*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY;
|
||||
|
||||
(*KeywordMap)["attachmentEXT"] = ATTACHMENTEXT;
|
||||
(*KeywordMap)["iattachmentEXT"] = IATTACHMENTEXT;
|
||||
(*KeywordMap)["uattachmentEXT"] = UATTACHMENTEXT;
|
||||
|
||||
(*KeywordMap)["subpassInput"] = SUBPASSINPUT;
|
||||
(*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS;
|
||||
(*KeywordMap)["isubpassInput"] = ISUBPASSINPUT;
|
||||
|
@ -765,6 +770,9 @@ void TScanContext::fillInKeywordMap()
|
|||
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
||||
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
|
||||
|
||||
(*KeywordMap)["hitObjectNV"] = HITOBJECTNV;
|
||||
(*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV;
|
||||
|
||||
ReservedSet = new std::unordered_set<const char*, str_hash, str_eq>;
|
||||
|
||||
ReservedSet->insert("common");
|
||||
|
@ -939,6 +947,7 @@ int TScanContext::tokenizeIdentifier()
|
|||
switch (keyword) {
|
||||
case CONST:
|
||||
case UNIFORM:
|
||||
case TILEIMAGEEXT:
|
||||
case IN:
|
||||
case OUT:
|
||||
case INOUT:
|
||||
|
@ -1655,6 +1664,9 @@ int TScanContext::tokenizeIdentifier()
|
|||
case ISUBPASSINPUTMS:
|
||||
case USUBPASSINPUT:
|
||||
case USUBPASSINPUTMS:
|
||||
case ATTACHMENTEXT:
|
||||
case IATTACHMENTEXT:
|
||||
case UATTACHMENTEXT:
|
||||
if (parseContext.spvVersion.vulkan > 0)
|
||||
return keyword;
|
||||
else
|
||||
|
@ -1789,6 +1801,20 @@ int TScanContext::tokenizeIdentifier()
|
|||
parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case HITOBJECTNV:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(!parseContext.isEsProfile() && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
|
||||
case HITOBJECTATTRNV:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(!parseContext.isEsProfile() && parseContext.version >= 460
|
||||
&& parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder)))
|
||||
return keyword;
|
||||
return identifierOrType();
|
||||
#endif
|
||||
|
||||
default:
|
||||
|
|
|
@ -298,9 +298,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
|
|||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
|
||||
(*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
|
||||
|
@ -322,9 +319,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
|||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
|
||||
|
@ -371,7 +365,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
|||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
// check for ray tracing stages
|
||||
if (profile != EEsProfile && version >= 450) {
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
|
||||
|
@ -399,7 +392,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
|
|||
(profile == EEsProfile && version >= 320))
|
||||
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
|
||||
infoSink, commonTable, symbolTables);
|
||||
#endif // !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
return true;
|
||||
|
@ -502,7 +494,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
|
|||
// Function to Print all builtins
|
||||
void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
|
||||
{
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
infoSink.debug << "BuiltinSymbolTable {\n";
|
||||
|
||||
symbolTable.dump(infoSink, true);
|
||||
|
@ -606,7 +598,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
|||
break;
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
// Correct for stage type...
|
||||
switch (stage) {
|
||||
case EShLangGeometry:
|
||||
|
@ -884,7 +876,7 @@ bool ProcessDeferred(
|
|||
: userInput.scanVersion(version, profile, versionNotFirstToken);
|
||||
bool versionNotFound = version == 0;
|
||||
if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
|
||||
(version != defaultVersion || profile != defaultProfile)) {
|
||||
compiler->infoSink.info << "Warning, (version, profile) forced to be ("
|
||||
|
@ -910,13 +902,10 @@ bool ProcessDeferred(
|
|||
#ifdef GLSLANG_WEB
|
||||
profile = EEsProfile;
|
||||
version = 310;
|
||||
#elif defined(GLSLANG_ANGLE)
|
||||
profile = ECoreProfile;
|
||||
version = 450;
|
||||
#endif
|
||||
|
||||
bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
bool warnVersionNotFirst = false;
|
||||
if (! versionWillBeError && versionNotFirstToken) {
|
||||
if (messages & EShMsgRelaxedErrors)
|
||||
|
@ -989,7 +978,7 @@ bool ProcessDeferred(
|
|||
parseContext->setLimits(*resources);
|
||||
if (! goodVersion)
|
||||
parseContext->addError();
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
if (warnVersionNotFirst) {
|
||||
TSourceLoc loc;
|
||||
loc.init();
|
||||
|
@ -1027,7 +1016,7 @@ bool ProcessDeferred(
|
|||
return success;
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
// Responsible for keeping track of the most recent source string and line in
|
||||
// the preprocessor and outputting newlines appropriately if the source string
|
||||
|
@ -1250,16 +1239,14 @@ struct DoFullParse{
|
|||
parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (messages & EShMsgAST)
|
||||
intermediate.output(parseContext.infoSink, true);
|
||||
#endif
|
||||
|
||||
return success;
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
// Take a single compilation unit, and run the preprocessor on it.
|
||||
// Return: True if there were no issues found in preprocessing,
|
||||
// False if during preprocessing any unknown version, pragmas or
|
||||
|
@ -1370,7 +1357,7 @@ int ShInitialize()
|
|||
ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions)
|
||||
{
|
||||
if (!InitThread())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(language, debugOptions));
|
||||
|
||||
|
@ -1380,7 +1367,7 @@ ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions)
|
|||
ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions)
|
||||
{
|
||||
if (!InitThread())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
TShHandleBase* base = static_cast<TShHandleBase*>(ConstructLinker(executable, debugOptions));
|
||||
|
||||
|
@ -1390,7 +1377,7 @@ ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions)
|
|||
ShHandle ShConstructUniformMap()
|
||||
{
|
||||
if (!InitThread())
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
TShHandleBase* base = static_cast<TShHandleBase*>(ConstructUniformMap());
|
||||
|
||||
|
@ -1399,7 +1386,7 @@ ShHandle ShConstructUniformMap()
|
|||
|
||||
void ShDestruct(ShHandle handle)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return;
|
||||
|
||||
TShHandleBase* base = static_cast<TShHandleBase*>(handle);
|
||||
|
@ -1432,7 +1419,7 @@ int ShFinalize()
|
|||
for (int source = 0; source < SourceCount; ++source) {
|
||||
for (int stage = 0; stage < EShLangCount; ++stage) {
|
||||
delete SharedSymbolTables[version][spvVersion][p][source][stage];
|
||||
SharedSymbolTables[version][spvVersion][p][source][stage] = 0;
|
||||
SharedSymbolTables[version][spvVersion][p][source][stage] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1445,7 +1432,7 @@ int ShFinalize()
|
|||
for (int source = 0; source < SourceCount; ++source) {
|
||||
for (int pc = 0; pc < EPcCount; ++pc) {
|
||||
delete CommonSymbolTable[version][spvVersion][p][source][pc];
|
||||
CommonSymbolTable[version][spvVersion][p][source][pc] = 0;
|
||||
CommonSymbolTable[version][spvVersion][p][source][pc] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1488,12 +1475,12 @@ int ShCompile(
|
|||
)
|
||||
{
|
||||
// Map the generic handle to the C++ object
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return 0;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
TCompiler* compiler = base->getAsCompiler();
|
||||
if (compiler == 0)
|
||||
if (compiler == nullptr)
|
||||
return 0;
|
||||
|
||||
SetThreadPoolAllocator(compiler->getPool());
|
||||
|
@ -1533,13 +1520,13 @@ int ShLinkExt(
|
|||
const ShHandle compHandles[],
|
||||
const int numHandles)
|
||||
{
|
||||
if (linkHandle == 0 || numHandles == 0)
|
||||
if (linkHandle == nullptr || numHandles == 0)
|
||||
return 0;
|
||||
|
||||
THandleList cObjects;
|
||||
|
||||
for (int i = 0; i < numHandles; ++i) {
|
||||
if (compHandles[i] == 0)
|
||||
if (compHandles[i] == nullptr)
|
||||
return 0;
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(compHandles[i]);
|
||||
if (base->getAsLinker()) {
|
||||
|
@ -1548,18 +1535,17 @@ int ShLinkExt(
|
|||
if (base->getAsCompiler())
|
||||
cObjects.push_back(base->getAsCompiler());
|
||||
|
||||
if (cObjects[i] == 0)
|
||||
if (cObjects[i] == nullptr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(linkHandle);
|
||||
TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
|
||||
|
||||
SetThreadPoolAllocator(linker->getPool());
|
||||
|
||||
if (linker == 0)
|
||||
if (linker == nullptr)
|
||||
return 0;
|
||||
|
||||
SetThreadPoolAllocator(linker->getPool());
|
||||
linker->infoSink.info.erase();
|
||||
|
||||
for (int i = 0; i < numHandles; ++i) {
|
||||
|
@ -1582,7 +1568,7 @@ int ShLinkExt(
|
|||
//
|
||||
void ShSetEncryptionMethod(ShHandle handle)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1591,8 +1577,8 @@ void ShSetEncryptionMethod(ShHandle handle)
|
|||
//
|
||||
const char* ShGetInfoLog(const ShHandle handle)
|
||||
{
|
||||
if (handle == 0)
|
||||
return 0;
|
||||
if (handle == nullptr)
|
||||
return nullptr;
|
||||
|
||||
TShHandleBase* base = static_cast<TShHandleBase*>(handle);
|
||||
TInfoSink* infoSink;
|
||||
|
@ -1602,7 +1588,7 @@ const char* ShGetInfoLog(const ShHandle handle)
|
|||
else if (base->getAsLinker())
|
||||
infoSink = &(base->getAsLinker()->getInfoSink());
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
infoSink->info << infoSink->debug.c_str();
|
||||
return infoSink->info.c_str();
|
||||
|
@ -1614,14 +1600,14 @@ const char* ShGetInfoLog(const ShHandle handle)
|
|||
//
|
||||
const void* ShGetExecutable(const ShHandle handle)
|
||||
{
|
||||
if (handle == 0)
|
||||
return 0;
|
||||
if (handle == nullptr)
|
||||
return nullptr;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
|
||||
TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
|
||||
if (linker == 0)
|
||||
return 0;
|
||||
if (linker == nullptr)
|
||||
return nullptr;
|
||||
|
||||
return linker->getObjectCode();
|
||||
}
|
||||
|
@ -1636,13 +1622,13 @@ const void* ShGetExecutable(const ShHandle handle)
|
|||
//
|
||||
int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return 0;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
|
||||
|
||||
if (linker == 0)
|
||||
if (linker == nullptr)
|
||||
return 0;
|
||||
|
||||
linker->setAppAttributeBindings(table);
|
||||
|
@ -1655,13 +1641,13 @@ int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* t
|
|||
//
|
||||
int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return 0;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
|
||||
|
||||
if (linker == 0)
|
||||
if (linker == nullptr)
|
||||
return 0;
|
||||
|
||||
linker->setFixedAttributeBindings(table);
|
||||
|
@ -1673,12 +1659,12 @@ int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* tab
|
|||
//
|
||||
int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return 0;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
TLinker* linker = static_cast<TLinker*>(base->getAsLinker());
|
||||
if (linker == 0)
|
||||
if (linker == nullptr)
|
||||
return 0;
|
||||
|
||||
linker->setExcludedAttributes(attributes, count);
|
||||
|
@ -1694,12 +1680,12 @@ int ShExcludeAttributes(const ShHandle handle, int *attributes, int count)
|
|||
//
|
||||
int ShGetUniformLocation(const ShHandle handle, const char* name)
|
||||
{
|
||||
if (handle == 0)
|
||||
if (handle == nullptr)
|
||||
return -1;
|
||||
|
||||
TShHandleBase* base = reinterpret_cast<TShHandleBase*>(handle);
|
||||
TUniformMap* uniformMap= base->getAsUniformMap();
|
||||
if (uniformMap == 0)
|
||||
if (uniformMap == nullptr)
|
||||
return -1;
|
||||
|
||||
return uniformMap->getLocation(name);
|
||||
|
@ -1927,7 +1913,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
|
|||
&environment);
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
// Fill in a string with the result of preprocessing ShaderStrings
|
||||
// Returns true if all extensions, pragmas and version strings were valid.
|
||||
//
|
||||
|
@ -1966,15 +1952,15 @@ const char* TShader::getInfoDebugLog()
|
|||
}
|
||||
|
||||
TProgram::TProgram() :
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
reflection(0),
|
||||
#if !defined(GLSLANG_WEB)
|
||||
reflection(nullptr),
|
||||
#endif
|
||||
linked(false)
|
||||
{
|
||||
pool = new TPoolAllocator;
|
||||
infoSink = new TInfoSink;
|
||||
for (int s = 0; s < EShLangCount; ++s) {
|
||||
intermediate[s] = 0;
|
||||
intermediate[s] = nullptr;
|
||||
newedIntermediate[s] = false;
|
||||
}
|
||||
}
|
||||
|
@ -1982,7 +1968,7 @@ TProgram::TProgram() :
|
|||
TProgram::~TProgram()
|
||||
{
|
||||
delete infoSink;
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
delete reflection;
|
||||
#endif
|
||||
|
||||
|
@ -2032,7 +2018,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
|
|||
if (stages[stage].size() == 0)
|
||||
return true;
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
int numEsShaders = 0, numNonEsShaders = 0;
|
||||
for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
|
||||
if ((*it)->intermediate->getProfile() == EEsProfile) {
|
||||
|
@ -2088,10 +2074,8 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
|
|||
#endif
|
||||
intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
|
||||
|
||||
#ifndef GLSLANG_ANGLE
|
||||
if (messages & EShMsgAST)
|
||||
intermediate[stage]->output(*infoSink, true);
|
||||
#endif
|
||||
|
||||
return intermediate[stage]->getNumErrors() == 0;
|
||||
}
|
||||
|
@ -2169,7 +2153,7 @@ const char* TProgram::getInfoDebugLog()
|
|||
return infoSink->debug.c_str();
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
//
|
||||
// Reflection implementation.
|
||||
|
@ -2251,6 +2235,6 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
|
|||
return ioMapper->doMap(pResolver, *infoSink);
|
||||
}
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
} // end namespace glslang
|
||||
|
|
|
@ -168,7 +168,7 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args
|
|||
TVector<const TIntermTyped*> extraOperands;
|
||||
for (auto arg : args->getSequence()) {
|
||||
auto extraOperand = arg->getAsTyped();
|
||||
assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant());
|
||||
assert(extraOperand != nullptr);
|
||||
extraOperands.push_back(extraOperand);
|
||||
}
|
||||
spirvDecorate->decorateIds[decoration] = extraOperands;
|
||||
|
@ -202,30 +202,29 @@ TString TQualifier::getSpirvDecorateQualifierString() const
|
|||
const auto appendStr = [&](const char* s) { qualifierString.append(s); };
|
||||
|
||||
const auto appendDecorate = [&](const TIntermTyped* constant) {
|
||||
auto& constArray = constant->getAsConstantUnion() != nullptr ? constant->getAsConstantUnion()->getConstArray()
|
||||
: constant->getAsSymbolNode()->getConstArray();
|
||||
if (constant->getAsConstantUnion()) {
|
||||
auto& constArray = constant->getAsConstantUnion()->getConstArray();
|
||||
if (constant->getBasicType() == EbtFloat) {
|
||||
float value = static_cast<float>(constArray[0].getDConst());
|
||||
appendFloat(value);
|
||||
}
|
||||
else if (constant->getBasicType() == EbtInt) {
|
||||
} else if (constant->getBasicType() == EbtInt) {
|
||||
int value = constArray[0].getIConst();
|
||||
appendInt(value);
|
||||
}
|
||||
else if (constant->getBasicType() == EbtUint) {
|
||||
} else if (constant->getBasicType() == EbtUint) {
|
||||
unsigned value = constArray[0].getUConst();
|
||||
appendUint(value);
|
||||
}
|
||||
else if (constant->getBasicType() == EbtBool) {
|
||||
} else if (constant->getBasicType() == EbtBool) {
|
||||
bool value = constArray[0].getBConst();
|
||||
appendBool(value);
|
||||
}
|
||||
else if (constant->getBasicType() == EbtString) {
|
||||
} else if (constant->getBasicType() == EbtString) {
|
||||
const TString* value = constArray[0].getSConst();
|
||||
appendStr(value->c_str());
|
||||
}
|
||||
else
|
||||
} else
|
||||
assert(0);
|
||||
} else {
|
||||
assert(constant->getAsSymbolNode());
|
||||
appendStr(constant->getAsSymbolNode()->getName().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
for (auto& decorate : spirvDecorate->decorates) {
|
||||
|
|
|
@ -78,6 +78,7 @@ void TType::buildMangledName(TString& mangledName) const
|
|||
case EbtAccStruct: mangledName += "as"; break;
|
||||
case EbtRayQuery: mangledName += "rq"; break;
|
||||
case EbtSpirvType: mangledName += "spv-t"; break;
|
||||
case EbtHitObjectNV: mangledName += "ho"; break;
|
||||
#endif
|
||||
case EbtSampler:
|
||||
switch (sampler.type) {
|
||||
|
@ -183,7 +184,7 @@ void TType::buildMangledName(TString& mangledName) const
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
//
|
||||
// Dump functions.
|
||||
|
@ -416,7 +417,7 @@ TAnonMember* TAnonMember::clone() const
|
|||
// copy of the original container.
|
||||
assert(0);
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TSymbolTableLevel* TSymbolTableLevel::clone() const
|
||||
|
|
|
@ -84,7 +84,7 @@ typedef TVector<const char*> TExtensionList;
|
|||
class TSymbol {
|
||||
public:
|
||||
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||
explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(0), writable(true) { }
|
||||
explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(nullptr), writable(true) { }
|
||||
virtual TSymbol* clone() const = 0;
|
||||
virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool
|
||||
|
||||
|
@ -97,18 +97,18 @@ public:
|
|||
changeName(NewPoolTString(newName.c_str()));
|
||||
}
|
||||
virtual const TString& getMangledName() const { return getName(); }
|
||||
virtual TFunction* getAsFunction() { return 0; }
|
||||
virtual const TFunction* getAsFunction() const { return 0; }
|
||||
virtual TVariable* getAsVariable() { return 0; }
|
||||
virtual const TVariable* getAsVariable() const { return 0; }
|
||||
virtual const TAnonMember* getAsAnonMember() const { return 0; }
|
||||
virtual TFunction* getAsFunction() { return nullptr; }
|
||||
virtual const TFunction* getAsFunction() const { return nullptr; }
|
||||
virtual TVariable* getAsVariable() { return nullptr; }
|
||||
virtual const TVariable* getAsVariable() const { return nullptr; }
|
||||
virtual const TAnonMember* getAsAnonMember() const { return nullptr; }
|
||||
virtual const TType& getType() const = 0;
|
||||
virtual TType& getWritableType() = 0;
|
||||
virtual void setUniqueId(long long id) { uniqueId = id; }
|
||||
virtual long long getUniqueId() const { return uniqueId; }
|
||||
virtual void setExtensions(int numExts, const char* const exts[])
|
||||
{
|
||||
assert(extensions == 0);
|
||||
assert(extensions == nullptr);
|
||||
assert(numExts > 0);
|
||||
extensions = NewPoolObject(extensions);
|
||||
for (int e = 0; e < numExts; ++e)
|
||||
|
@ -117,7 +117,7 @@ public:
|
|||
virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); }
|
||||
virtual const char** getExtensions() const { return extensions->data(); }
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0;
|
||||
void dumpExtensions(TInfoSink& infoSink) const;
|
||||
#endif
|
||||
|
@ -196,7 +196,7 @@ public:
|
|||
}
|
||||
virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); }
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
virtual void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||
#endif
|
||||
|
||||
|
@ -229,7 +229,7 @@ struct TParameter {
|
|||
if (param.name)
|
||||
name = NewPoolTString(param.name->c_str());
|
||||
else
|
||||
name = 0;
|
||||
name = nullptr;
|
||||
type = param.type->clone();
|
||||
defaultValue = param.defaultValue;
|
||||
return *this;
|
||||
|
@ -243,7 +243,7 @@ struct TParameter {
|
|||
class TFunction : public TSymbol {
|
||||
public:
|
||||
explicit TFunction(TOperator o) :
|
||||
TSymbol(0),
|
||||
TSymbol(nullptr),
|
||||
op(o),
|
||||
defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { }
|
||||
TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) :
|
||||
|
@ -319,6 +319,7 @@ public:
|
|||
|
||||
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
|
||||
virtual const TParameter& operator[](int i) const { return parameters[i]; }
|
||||
const TQualifier& getQualifier() const { return returnType.getQualifier(); }
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
virtual void setSpirvInstruction(const TSpirvInstruction& inst)
|
||||
|
@ -329,7 +330,7 @@ public:
|
|||
virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
|
||||
#endif
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
||||
#endif
|
||||
|
||||
|
@ -395,7 +396,7 @@ public:
|
|||
virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); }
|
||||
|
||||
virtual int getAnonId() const { return anonId; }
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
||||
#endif
|
||||
|
||||
|
@ -411,7 +412,7 @@ protected:
|
|||
class TSymbolTableLevel {
|
||||
public:
|
||||
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||
TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { }
|
||||
TSymbolTableLevel() : defaultPrecision(nullptr), anonId(0), thisLevel(false) { }
|
||||
~TSymbolTableLevel();
|
||||
|
||||
bool insert(const TString& name, TSymbol* symbol) {
|
||||
|
@ -493,7 +494,7 @@ public:
|
|||
{
|
||||
tLevel::const_iterator it = level.find(name);
|
||||
if (it == level.end())
|
||||
return 0;
|
||||
return nullptr;
|
||||
else
|
||||
return (*it).second;
|
||||
}
|
||||
|
@ -561,7 +562,7 @@ public:
|
|||
{
|
||||
// can call multiple times at one scope, will only latch on first call,
|
||||
// as we're tracking the previous scope's values, not the current values
|
||||
if (defaultPrecision != 0)
|
||||
if (defaultPrecision != nullptr)
|
||||
return;
|
||||
|
||||
defaultPrecision = new TPrecisionQualifier[EbtNumTypes];
|
||||
|
@ -573,7 +574,7 @@ public:
|
|||
{
|
||||
// can be called for table level pops that didn't set the
|
||||
// defaults
|
||||
if (defaultPrecision == 0 || p == 0)
|
||||
if (defaultPrecision == nullptr || p == nullptr)
|
||||
return;
|
||||
|
||||
for (int t = 0; t < EbtNumTypes; ++t)
|
||||
|
@ -582,7 +583,7 @@ public:
|
|||
|
||||
void relateToOperator(const char* name, TOperator op);
|
||||
void setFunctionExtensions(const char* name, int num, const char* const extensions[]);
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||
#endif
|
||||
TSymbolTableLevel* clone() const;
|
||||
|
@ -622,7 +623,7 @@ public:
|
|||
|
||||
// don't deallocate levels passed in from elsewhere
|
||||
while (table.size() > adoptedLevels)
|
||||
pop(0);
|
||||
pop(nullptr);
|
||||
}
|
||||
|
||||
void adoptLevels(TSymbolTable& symTable)
|
||||
|
@ -783,7 +784,7 @@ public:
|
|||
|
||||
// Normal find of a symbol, that can optionally say whether the symbol was found
|
||||
// at a built-in level or the current top-scope level.
|
||||
TSymbol* find(const TString& name, bool* builtIn = 0, bool* currentScope = 0, int* thisDepthP = 0)
|
||||
TSymbol* find(const TString& name, bool* builtIn = nullptr, bool* currentScope = nullptr, int* thisDepthP = nullptr)
|
||||
{
|
||||
int level = currentLevel();
|
||||
TSymbol* symbol;
|
||||
|
@ -827,7 +828,7 @@ public:
|
|||
++thisDepth;
|
||||
symbol = table[level]->find(name);
|
||||
--level;
|
||||
} while (symbol == 0 && level >= 0);
|
||||
} while (symbol == nullptr && level >= 0);
|
||||
|
||||
if (! table[level + 1]->isThisLevel())
|
||||
thisDepth = 0;
|
||||
|
@ -912,7 +913,7 @@ public:
|
|||
}
|
||||
|
||||
long long getMaxSymbolId() { return uniqueId; }
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
void dump(TInfoSink& infoSink, bool complete = false) const;
|
||||
#endif
|
||||
void copyTable(const TSymbolTable& copyOf);
|
||||
|
|
|
@ -227,6 +227,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_draw_instanced] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_bindless_texture] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable;
|
||||
|
||||
|
||||
|
@ -301,6 +302,11 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable;
|
||||
extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable;
|
||||
|
||||
extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable;
|
||||
|
||||
// ARM
|
||||
extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable;
|
||||
|
||||
// AEP
|
||||
extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable;
|
||||
extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisable;
|
||||
|
@ -348,6 +354,8 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_tile_image] = EBhDisable;
|
||||
|
||||
// OVR extensions
|
||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||
|
@ -370,6 +378,9 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
|
||||
extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable;
|
||||
|
||||
// Record extensions not for spv.
|
||||
spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture);
|
||||
}
|
||||
|
||||
#endif // GLSLANG_WEB
|
||||
|
@ -437,7 +448,6 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
|
||||
} else { // !isEsProfile()
|
||||
preamble =
|
||||
"#define GL_FRAGMENT_PRECISION_HIGH 1\n"
|
||||
"#define GL_ARB_texture_rectangle 1\n"
|
||||
"#define GL_ARB_shading_language_420pack 1\n"
|
||||
"#define GL_ARB_texture_gather 1\n"
|
||||
|
@ -477,6 +487,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_ARB_vertex_attrib_64bit 1\n"
|
||||
"#define GL_ARB_draw_instanced 1\n"
|
||||
"#define GL_ARB_fragment_coord_conventions 1\n"
|
||||
"#define GL_ARB_bindless_texture 1\n"
|
||||
"#define GL_EXT_shader_non_constant_global_initializers 1\n"
|
||||
"#define GL_EXT_shader_image_load_formatted 1\n"
|
||||
"#define GL_EXT_post_depth_coverage 1\n"
|
||||
|
@ -513,6 +524,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_EXT_ray_query 1\n"
|
||||
"#define GL_EXT_ray_flags_primitive_culling 1\n"
|
||||
"#define GL_EXT_ray_cull_mask 1\n"
|
||||
"#define GL_EXT_ray_tracing_position_fetch 1\n"
|
||||
"#define GL_EXT_spirv_intrinsics 1\n"
|
||||
"#define GL_EXT_mesh_shader 1\n"
|
||||
|
||||
|
@ -544,6 +556,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_NV_mesh_shader 1\n"
|
||||
"#define GL_NV_cooperative_matrix 1\n"
|
||||
"#define GL_NV_integer_cooperative_matrix 1\n"
|
||||
"#define GL_NV_shader_execution_reorder 1\n"
|
||||
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types 1\n"
|
||||
"#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n"
|
||||
|
@ -576,6 +589,10 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
preamble += "#define GL_EXT_null_initializer 1\n";
|
||||
preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
|
||||
}
|
||||
if (version >= 130) {
|
||||
preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n";
|
||||
}
|
||||
|
||||
#endif // GLSLANG_WEB
|
||||
}
|
||||
|
||||
|
@ -1066,8 +1083,8 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
|
|||
if (strcmp(extension, "GL_NV_mesh_shader") == 0) {
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
|
||||
"#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, 0, "#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_NV_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_NV_mesh_shader");
|
||||
if (extensionTurnedOn(E_GL_EXT_mesh_shader)) {
|
||||
error(loc, "GL_EXT_mesh_shader is already turned on, and not allowed with", "#extension", extension);
|
||||
}
|
||||
|
@ -1075,8 +1092,8 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con
|
|||
else if (strcmp(extension, "GL_EXT_mesh_shader") == 0) {
|
||||
requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask),
|
||||
"#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, 0, "#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_EXT_mesh_shader");
|
||||
profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_EXT_mesh_shader");
|
||||
if (extensionTurnedOn(E_GL_NV_mesh_shader)) {
|
||||
error(loc, "GL_NV_mesh_shader is already turned on, and not allowed with", "#extension", extension);
|
||||
}
|
||||
|
@ -1099,6 +1116,13 @@ void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const
|
|||
minSpvVersion = iter->second;
|
||||
requireSpv(loc, extension, minSpvVersion);
|
||||
}
|
||||
|
||||
if (spvVersion.spv != 0){
|
||||
for (auto ext : spvUnsupportedExt){
|
||||
if (strcmp(extension, ext.c_str()) == 0)
|
||||
error(loc, "not allowed when using generating SPIR-V codes", extension, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Call for any operation needing full GLSL integer data-type support.
|
||||
|
|
|
@ -163,6 +163,7 @@ const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_
|
|||
const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit";
|
||||
const char* const E_GL_ARB_draw_instanced = "GL_ARB_draw_instanced";
|
||||
const char* const E_GL_ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions";
|
||||
const char* const E_GL_ARB_bindless_texture = "GL_ARB_bindless_texture";
|
||||
|
||||
const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic";
|
||||
const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote";
|
||||
|
@ -264,6 +265,10 @@ const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragmen
|
|||
const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives";
|
||||
const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint";
|
||||
const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader";
|
||||
const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch";
|
||||
|
||||
// ARM
|
||||
const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins";
|
||||
|
||||
// Arrays of extensions for the above viewportEXTs duplications
|
||||
|
||||
|
@ -273,6 +278,7 @@ const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]);
|
|||
const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix";
|
||||
const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins";
|
||||
const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix";
|
||||
const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder";
|
||||
|
||||
// AEP
|
||||
const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a";
|
||||
|
@ -322,6 +328,8 @@ const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation";
|
|||
const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
|
||||
const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
|
||||
|
||||
const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image";
|
||||
|
||||
// Arrays of extensions for the above AEP duplications
|
||||
|
||||
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
|
||||
|
|
|
@ -151,7 +151,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
|
||||
%parse-param {glslang::TParseContext* pParseContext}
|
||||
%lex-param {parseContext}
|
||||
%define api.pure // enable thread safety
|
||||
%pure-parser // enable thread safety
|
||||
%expect 1 // One shift reduce conflict because of if | else
|
||||
|
||||
%token <lex> CONST BOOL INT UINT FLOAT
|
||||
|
@ -211,6 +211,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> ACCSTRUCTEXT
|
||||
%token <lex> RAYQUERYEXT
|
||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
||||
|
||||
// combined image/sampler
|
||||
%token <lex> SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW
|
||||
|
@ -278,6 +279,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
|
||||
%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
|
||||
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
||||
%token <lex> ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT
|
||||
|
||||
|
||||
|
||||
|
@ -303,7 +305,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
||||
%token <lex> TERMINATE_INVOCATION
|
||||
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
|
||||
%token <lex> UNIFORM SHARED BUFFER
|
||||
%token <lex> UNIFORM SHARED BUFFER TILEIMAGEEXT
|
||||
%token <lex> FLAT SMOOTH LAYOUT
|
||||
|
||||
|
||||
|
@ -377,7 +379,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||
%type <interm.type> spirv_storage_class_qualifier
|
||||
%type <interm.type> spirv_decorate_qualifier
|
||||
%type <interm.intermNode> spirv_decorate_parameter_list spirv_decorate_parameter
|
||||
%type <interm.intermNode> spirv_decorate_id_parameter_list
|
||||
%type <interm.intermNode> spirv_decorate_id_parameter_list spirv_decorate_id_parameter
|
||||
%type <interm.intermNode> spirv_decorate_string_parameter_list
|
||||
%type <interm.type> spirv_type_specifier
|
||||
%type <interm.spirvTypeParams> spirv_type_parameter_list spirv_type_parameter
|
||||
|
@ -1218,7 +1220,7 @@ fully_specified_type
|
|||
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier);
|
||||
}
|
||||
| type_qualifier type_specifier {
|
||||
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier);
|
||||
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2);
|
||||
parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2);
|
||||
|
||||
if ($2.arraySizes) {
|
||||
|
@ -1475,6 +1477,11 @@ storage_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqUniform;
|
||||
}
|
||||
| TILEIMAGEEXT {
|
||||
parseContext.globalCheck($1.loc, "tileImageEXT");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqTileImageEXT;
|
||||
}
|
||||
| SHARED {
|
||||
parseContext.globalCheck($1.loc, "shared");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||
|
@ -1534,6 +1541,14 @@ storage_qualifier
|
|||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitAttr;
|
||||
}
|
||||
| HITOBJECTATTRNV {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeNV");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask
|
||||
| EShLangMissMask), "hitObjectAttributeNV");
|
||||
parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV");
|
||||
$$.init($1.loc);
|
||||
$$.qualifier.storage = EvqHitObjectAttrNV;
|
||||
}
|
||||
| HITATTREXT {
|
||||
parseContext.globalCheck($1.loc, "hitAttributeEXT");
|
||||
parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask
|
||||
|
@ -3437,6 +3452,24 @@ type_specifier_nonarray
|
|||
$$.sampler.set(EbtFloat, Esd2D);
|
||||
$$.sampler.yuv = true;
|
||||
}
|
||||
| ATTACHMENTEXT {
|
||||
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
$$.sampler.setAttachmentEXT(EbtFloat);
|
||||
}
|
||||
| IATTACHMENTEXT {
|
||||
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
$$.sampler.setAttachmentEXT(EbtInt);
|
||||
}
|
||||
| UATTACHMENTEXT {
|
||||
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
$$.sampler.setAttachmentEXT(EbtUint);
|
||||
}
|
||||
| SUBPASSINPUT {
|
||||
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
|
@ -3509,6 +3542,10 @@ type_specifier_nonarray
|
|||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||
$$ = $1;
|
||||
}
|
||||
| HITOBJECTNV {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtHitObjectNV;
|
||||
}
|
||||
|
||||
| struct_specifier {
|
||||
$$ = $1;
|
||||
|
@ -4334,23 +4371,33 @@ spirv_decorate_parameter
|
|||
}
|
||||
|
||||
spirv_decorate_id_parameter_list
|
||||
: constant_expression {
|
||||
if ($1->getBasicType() != EbtFloat &&
|
||||
$1->getBasicType() != EbtInt &&
|
||||
$1->getBasicType() != EbtUint &&
|
||||
$1->getBasicType() != EbtBool)
|
||||
parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), "");
|
||||
: spirv_decorate_id_parameter {
|
||||
$$ = parseContext.intermediate.makeAggregate($1);
|
||||
}
|
||||
| spirv_decorate_id_parameter_list COMMA constant_expression {
|
||||
if ($3->getBasicType() != EbtFloat &&
|
||||
$3->getBasicType() != EbtInt &&
|
||||
$3->getBasicType() != EbtUint &&
|
||||
$3->getBasicType() != EbtBool)
|
||||
parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), "");
|
||||
| spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter {
|
||||
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||
}
|
||||
|
||||
spirv_decorate_id_parameter
|
||||
: variable_identifier {
|
||||
if ($1->getAsConstantUnion() || $1->getAsSymbolNode())
|
||||
$$ = $1;
|
||||
else
|
||||
parseContext.error($1->getLoc(), "only allow constants or variables which are not elements of a composite", "", "");
|
||||
}
|
||||
| FLOATCONSTANT {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true);
|
||||
}
|
||||
| INTCONSTANT {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true);
|
||||
}
|
||||
| UINTCONSTANT {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true);
|
||||
}
|
||||
| BOOLCONSTANT {
|
||||
$$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true);
|
||||
}
|
||||
|
||||
spirv_decorate_string_parameter_list
|
||||
: STRING_LITERAL {
|
||||
$$ = parseContext.intermediate.makeAggregate(
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
/* A Bison parser, made by GNU Bison 3.7.4. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -16,7 +16,7 @@
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
@ -217,298 +217,304 @@ extern int yydebug;
|
|||
FCOOPMATNV = 418, /* FCOOPMATNV */
|
||||
ICOOPMATNV = 419, /* ICOOPMATNV */
|
||||
UCOOPMATNV = 420, /* UCOOPMATNV */
|
||||
SAMPLERCUBEARRAY = 421, /* SAMPLERCUBEARRAY */
|
||||
SAMPLERCUBEARRAYSHADOW = 422, /* SAMPLERCUBEARRAYSHADOW */
|
||||
ISAMPLERCUBEARRAY = 423, /* ISAMPLERCUBEARRAY */
|
||||
USAMPLERCUBEARRAY = 424, /* USAMPLERCUBEARRAY */
|
||||
SAMPLER1D = 425, /* SAMPLER1D */
|
||||
SAMPLER1DARRAY = 426, /* SAMPLER1DARRAY */
|
||||
SAMPLER1DARRAYSHADOW = 427, /* SAMPLER1DARRAYSHADOW */
|
||||
ISAMPLER1D = 428, /* ISAMPLER1D */
|
||||
SAMPLER1DSHADOW = 429, /* SAMPLER1DSHADOW */
|
||||
SAMPLER2DRECT = 430, /* SAMPLER2DRECT */
|
||||
SAMPLER2DRECTSHADOW = 431, /* SAMPLER2DRECTSHADOW */
|
||||
ISAMPLER2DRECT = 432, /* ISAMPLER2DRECT */
|
||||
USAMPLER2DRECT = 433, /* USAMPLER2DRECT */
|
||||
SAMPLERBUFFER = 434, /* SAMPLERBUFFER */
|
||||
ISAMPLERBUFFER = 435, /* ISAMPLERBUFFER */
|
||||
USAMPLERBUFFER = 436, /* USAMPLERBUFFER */
|
||||
SAMPLER2DMS = 437, /* SAMPLER2DMS */
|
||||
ISAMPLER2DMS = 438, /* ISAMPLER2DMS */
|
||||
USAMPLER2DMS = 439, /* USAMPLER2DMS */
|
||||
SAMPLER2DMSARRAY = 440, /* SAMPLER2DMSARRAY */
|
||||
ISAMPLER2DMSARRAY = 441, /* ISAMPLER2DMSARRAY */
|
||||
USAMPLER2DMSARRAY = 442, /* USAMPLER2DMSARRAY */
|
||||
SAMPLEREXTERNALOES = 443, /* SAMPLEREXTERNALOES */
|
||||
SAMPLEREXTERNAL2DY2YEXT = 444, /* SAMPLEREXTERNAL2DY2YEXT */
|
||||
ISAMPLER1DARRAY = 445, /* ISAMPLER1DARRAY */
|
||||
USAMPLER1D = 446, /* USAMPLER1D */
|
||||
USAMPLER1DARRAY = 447, /* USAMPLER1DARRAY */
|
||||
F16SAMPLER1D = 448, /* F16SAMPLER1D */
|
||||
F16SAMPLER2D = 449, /* F16SAMPLER2D */
|
||||
F16SAMPLER3D = 450, /* F16SAMPLER3D */
|
||||
F16SAMPLER2DRECT = 451, /* F16SAMPLER2DRECT */
|
||||
F16SAMPLERCUBE = 452, /* F16SAMPLERCUBE */
|
||||
F16SAMPLER1DARRAY = 453, /* F16SAMPLER1DARRAY */
|
||||
F16SAMPLER2DARRAY = 454, /* F16SAMPLER2DARRAY */
|
||||
F16SAMPLERCUBEARRAY = 455, /* F16SAMPLERCUBEARRAY */
|
||||
F16SAMPLERBUFFER = 456, /* F16SAMPLERBUFFER */
|
||||
F16SAMPLER2DMS = 457, /* F16SAMPLER2DMS */
|
||||
F16SAMPLER2DMSARRAY = 458, /* F16SAMPLER2DMSARRAY */
|
||||
F16SAMPLER1DSHADOW = 459, /* F16SAMPLER1DSHADOW */
|
||||
F16SAMPLER2DSHADOW = 460, /* F16SAMPLER2DSHADOW */
|
||||
F16SAMPLER1DARRAYSHADOW = 461, /* F16SAMPLER1DARRAYSHADOW */
|
||||
F16SAMPLER2DARRAYSHADOW = 462, /* F16SAMPLER2DARRAYSHADOW */
|
||||
F16SAMPLER2DRECTSHADOW = 463, /* F16SAMPLER2DRECTSHADOW */
|
||||
F16SAMPLERCUBESHADOW = 464, /* F16SAMPLERCUBESHADOW */
|
||||
F16SAMPLERCUBEARRAYSHADOW = 465, /* F16SAMPLERCUBEARRAYSHADOW */
|
||||
IMAGE1D = 466, /* IMAGE1D */
|
||||
IIMAGE1D = 467, /* IIMAGE1D */
|
||||
UIMAGE1D = 468, /* UIMAGE1D */
|
||||
IMAGE2D = 469, /* IMAGE2D */
|
||||
IIMAGE2D = 470, /* IIMAGE2D */
|
||||
UIMAGE2D = 471, /* UIMAGE2D */
|
||||
IMAGE3D = 472, /* IMAGE3D */
|
||||
IIMAGE3D = 473, /* IIMAGE3D */
|
||||
UIMAGE3D = 474, /* UIMAGE3D */
|
||||
IMAGE2DRECT = 475, /* IMAGE2DRECT */
|
||||
IIMAGE2DRECT = 476, /* IIMAGE2DRECT */
|
||||
UIMAGE2DRECT = 477, /* UIMAGE2DRECT */
|
||||
IMAGECUBE = 478, /* IMAGECUBE */
|
||||
IIMAGECUBE = 479, /* IIMAGECUBE */
|
||||
UIMAGECUBE = 480, /* UIMAGECUBE */
|
||||
IMAGEBUFFER = 481, /* IMAGEBUFFER */
|
||||
IIMAGEBUFFER = 482, /* IIMAGEBUFFER */
|
||||
UIMAGEBUFFER = 483, /* UIMAGEBUFFER */
|
||||
IMAGE1DARRAY = 484, /* IMAGE1DARRAY */
|
||||
IIMAGE1DARRAY = 485, /* IIMAGE1DARRAY */
|
||||
UIMAGE1DARRAY = 486, /* UIMAGE1DARRAY */
|
||||
IMAGE2DARRAY = 487, /* IMAGE2DARRAY */
|
||||
IIMAGE2DARRAY = 488, /* IIMAGE2DARRAY */
|
||||
UIMAGE2DARRAY = 489, /* UIMAGE2DARRAY */
|
||||
IMAGECUBEARRAY = 490, /* IMAGECUBEARRAY */
|
||||
IIMAGECUBEARRAY = 491, /* IIMAGECUBEARRAY */
|
||||
UIMAGECUBEARRAY = 492, /* UIMAGECUBEARRAY */
|
||||
IMAGE2DMS = 493, /* IMAGE2DMS */
|
||||
IIMAGE2DMS = 494, /* IIMAGE2DMS */
|
||||
UIMAGE2DMS = 495, /* UIMAGE2DMS */
|
||||
IMAGE2DMSARRAY = 496, /* IMAGE2DMSARRAY */
|
||||
IIMAGE2DMSARRAY = 497, /* IIMAGE2DMSARRAY */
|
||||
UIMAGE2DMSARRAY = 498, /* UIMAGE2DMSARRAY */
|
||||
F16IMAGE1D = 499, /* F16IMAGE1D */
|
||||
F16IMAGE2D = 500, /* F16IMAGE2D */
|
||||
F16IMAGE3D = 501, /* F16IMAGE3D */
|
||||
F16IMAGE2DRECT = 502, /* F16IMAGE2DRECT */
|
||||
F16IMAGECUBE = 503, /* F16IMAGECUBE */
|
||||
F16IMAGE1DARRAY = 504, /* F16IMAGE1DARRAY */
|
||||
F16IMAGE2DARRAY = 505, /* F16IMAGE2DARRAY */
|
||||
F16IMAGECUBEARRAY = 506, /* F16IMAGECUBEARRAY */
|
||||
F16IMAGEBUFFER = 507, /* F16IMAGEBUFFER */
|
||||
F16IMAGE2DMS = 508, /* F16IMAGE2DMS */
|
||||
F16IMAGE2DMSARRAY = 509, /* F16IMAGE2DMSARRAY */
|
||||
I64IMAGE1D = 510, /* I64IMAGE1D */
|
||||
U64IMAGE1D = 511, /* U64IMAGE1D */
|
||||
I64IMAGE2D = 512, /* I64IMAGE2D */
|
||||
U64IMAGE2D = 513, /* U64IMAGE2D */
|
||||
I64IMAGE3D = 514, /* I64IMAGE3D */
|
||||
U64IMAGE3D = 515, /* U64IMAGE3D */
|
||||
I64IMAGE2DRECT = 516, /* I64IMAGE2DRECT */
|
||||
U64IMAGE2DRECT = 517, /* U64IMAGE2DRECT */
|
||||
I64IMAGECUBE = 518, /* I64IMAGECUBE */
|
||||
U64IMAGECUBE = 519, /* U64IMAGECUBE */
|
||||
I64IMAGEBUFFER = 520, /* I64IMAGEBUFFER */
|
||||
U64IMAGEBUFFER = 521, /* U64IMAGEBUFFER */
|
||||
I64IMAGE1DARRAY = 522, /* I64IMAGE1DARRAY */
|
||||
U64IMAGE1DARRAY = 523, /* U64IMAGE1DARRAY */
|
||||
I64IMAGE2DARRAY = 524, /* I64IMAGE2DARRAY */
|
||||
U64IMAGE2DARRAY = 525, /* U64IMAGE2DARRAY */
|
||||
I64IMAGECUBEARRAY = 526, /* I64IMAGECUBEARRAY */
|
||||
U64IMAGECUBEARRAY = 527, /* U64IMAGECUBEARRAY */
|
||||
I64IMAGE2DMS = 528, /* I64IMAGE2DMS */
|
||||
U64IMAGE2DMS = 529, /* U64IMAGE2DMS */
|
||||
I64IMAGE2DMSARRAY = 530, /* I64IMAGE2DMSARRAY */
|
||||
U64IMAGE2DMSARRAY = 531, /* U64IMAGE2DMSARRAY */
|
||||
TEXTURECUBEARRAY = 532, /* TEXTURECUBEARRAY */
|
||||
ITEXTURECUBEARRAY = 533, /* ITEXTURECUBEARRAY */
|
||||
UTEXTURECUBEARRAY = 534, /* UTEXTURECUBEARRAY */
|
||||
TEXTURE1D = 535, /* TEXTURE1D */
|
||||
ITEXTURE1D = 536, /* ITEXTURE1D */
|
||||
UTEXTURE1D = 537, /* UTEXTURE1D */
|
||||
TEXTURE1DARRAY = 538, /* TEXTURE1DARRAY */
|
||||
ITEXTURE1DARRAY = 539, /* ITEXTURE1DARRAY */
|
||||
UTEXTURE1DARRAY = 540, /* UTEXTURE1DARRAY */
|
||||
TEXTURE2DRECT = 541, /* TEXTURE2DRECT */
|
||||
ITEXTURE2DRECT = 542, /* ITEXTURE2DRECT */
|
||||
UTEXTURE2DRECT = 543, /* UTEXTURE2DRECT */
|
||||
TEXTUREBUFFER = 544, /* TEXTUREBUFFER */
|
||||
ITEXTUREBUFFER = 545, /* ITEXTUREBUFFER */
|
||||
UTEXTUREBUFFER = 546, /* UTEXTUREBUFFER */
|
||||
TEXTURE2DMS = 547, /* TEXTURE2DMS */
|
||||
ITEXTURE2DMS = 548, /* ITEXTURE2DMS */
|
||||
UTEXTURE2DMS = 549, /* UTEXTURE2DMS */
|
||||
TEXTURE2DMSARRAY = 550, /* TEXTURE2DMSARRAY */
|
||||
ITEXTURE2DMSARRAY = 551, /* ITEXTURE2DMSARRAY */
|
||||
UTEXTURE2DMSARRAY = 552, /* UTEXTURE2DMSARRAY */
|
||||
F16TEXTURE1D = 553, /* F16TEXTURE1D */
|
||||
F16TEXTURE2D = 554, /* F16TEXTURE2D */
|
||||
F16TEXTURE3D = 555, /* F16TEXTURE3D */
|
||||
F16TEXTURE2DRECT = 556, /* F16TEXTURE2DRECT */
|
||||
F16TEXTURECUBE = 557, /* F16TEXTURECUBE */
|
||||
F16TEXTURE1DARRAY = 558, /* F16TEXTURE1DARRAY */
|
||||
F16TEXTURE2DARRAY = 559, /* F16TEXTURE2DARRAY */
|
||||
F16TEXTURECUBEARRAY = 560, /* F16TEXTURECUBEARRAY */
|
||||
F16TEXTUREBUFFER = 561, /* F16TEXTUREBUFFER */
|
||||
F16TEXTURE2DMS = 562, /* F16TEXTURE2DMS */
|
||||
F16TEXTURE2DMSARRAY = 563, /* F16TEXTURE2DMSARRAY */
|
||||
SUBPASSINPUT = 564, /* SUBPASSINPUT */
|
||||
SUBPASSINPUTMS = 565, /* SUBPASSINPUTMS */
|
||||
ISUBPASSINPUT = 566, /* ISUBPASSINPUT */
|
||||
ISUBPASSINPUTMS = 567, /* ISUBPASSINPUTMS */
|
||||
USUBPASSINPUT = 568, /* USUBPASSINPUT */
|
||||
USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */
|
||||
F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */
|
||||
F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */
|
||||
SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */
|
||||
SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */
|
||||
SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */
|
||||
SPIRV_DECORATE = 575, /* SPIRV_DECORATE */
|
||||
SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */
|
||||
SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */
|
||||
SPIRV_TYPE = 578, /* SPIRV_TYPE */
|
||||
SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */
|
||||
SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */
|
||||
SPIRV_LITERAL = 581, /* SPIRV_LITERAL */
|
||||
LEFT_OP = 582, /* LEFT_OP */
|
||||
RIGHT_OP = 583, /* RIGHT_OP */
|
||||
INC_OP = 584, /* INC_OP */
|
||||
DEC_OP = 585, /* DEC_OP */
|
||||
LE_OP = 586, /* LE_OP */
|
||||
GE_OP = 587, /* GE_OP */
|
||||
EQ_OP = 588, /* EQ_OP */
|
||||
NE_OP = 589, /* NE_OP */
|
||||
AND_OP = 590, /* AND_OP */
|
||||
OR_OP = 591, /* OR_OP */
|
||||
XOR_OP = 592, /* XOR_OP */
|
||||
MUL_ASSIGN = 593, /* MUL_ASSIGN */
|
||||
DIV_ASSIGN = 594, /* DIV_ASSIGN */
|
||||
ADD_ASSIGN = 595, /* ADD_ASSIGN */
|
||||
MOD_ASSIGN = 596, /* MOD_ASSIGN */
|
||||
LEFT_ASSIGN = 597, /* LEFT_ASSIGN */
|
||||
RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */
|
||||
AND_ASSIGN = 599, /* AND_ASSIGN */
|
||||
XOR_ASSIGN = 600, /* XOR_ASSIGN */
|
||||
OR_ASSIGN = 601, /* OR_ASSIGN */
|
||||
SUB_ASSIGN = 602, /* SUB_ASSIGN */
|
||||
STRING_LITERAL = 603, /* STRING_LITERAL */
|
||||
LEFT_PAREN = 604, /* LEFT_PAREN */
|
||||
RIGHT_PAREN = 605, /* RIGHT_PAREN */
|
||||
LEFT_BRACKET = 606, /* LEFT_BRACKET */
|
||||
RIGHT_BRACKET = 607, /* RIGHT_BRACKET */
|
||||
LEFT_BRACE = 608, /* LEFT_BRACE */
|
||||
RIGHT_BRACE = 609, /* RIGHT_BRACE */
|
||||
DOT = 610, /* DOT */
|
||||
COMMA = 611, /* COMMA */
|
||||
COLON = 612, /* COLON */
|
||||
EQUAL = 613, /* EQUAL */
|
||||
SEMICOLON = 614, /* SEMICOLON */
|
||||
BANG = 615, /* BANG */
|
||||
DASH = 616, /* DASH */
|
||||
TILDE = 617, /* TILDE */
|
||||
PLUS = 618, /* PLUS */
|
||||
STAR = 619, /* STAR */
|
||||
SLASH = 620, /* SLASH */
|
||||
PERCENT = 621, /* PERCENT */
|
||||
LEFT_ANGLE = 622, /* LEFT_ANGLE */
|
||||
RIGHT_ANGLE = 623, /* RIGHT_ANGLE */
|
||||
VERTICAL_BAR = 624, /* VERTICAL_BAR */
|
||||
CARET = 625, /* CARET */
|
||||
AMPERSAND = 626, /* AMPERSAND */
|
||||
QUESTION = 627, /* QUESTION */
|
||||
INVARIANT = 628, /* INVARIANT */
|
||||
HIGH_PRECISION = 629, /* HIGH_PRECISION */
|
||||
MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */
|
||||
LOW_PRECISION = 631, /* LOW_PRECISION */
|
||||
PRECISION = 632, /* PRECISION */
|
||||
PACKED = 633, /* PACKED */
|
||||
RESOURCE = 634, /* RESOURCE */
|
||||
SUPERP = 635, /* SUPERP */
|
||||
FLOATCONSTANT = 636, /* FLOATCONSTANT */
|
||||
INTCONSTANT = 637, /* INTCONSTANT */
|
||||
UINTCONSTANT = 638, /* UINTCONSTANT */
|
||||
BOOLCONSTANT = 639, /* BOOLCONSTANT */
|
||||
IDENTIFIER = 640, /* IDENTIFIER */
|
||||
TYPE_NAME = 641, /* TYPE_NAME */
|
||||
CENTROID = 642, /* CENTROID */
|
||||
IN = 643, /* IN */
|
||||
OUT = 644, /* OUT */
|
||||
INOUT = 645, /* INOUT */
|
||||
STRUCT = 646, /* STRUCT */
|
||||
VOID = 647, /* VOID */
|
||||
WHILE = 648, /* WHILE */
|
||||
BREAK = 649, /* BREAK */
|
||||
CONTINUE = 650, /* CONTINUE */
|
||||
DO = 651, /* DO */
|
||||
ELSE = 652, /* ELSE */
|
||||
FOR = 653, /* FOR */
|
||||
IF = 654, /* IF */
|
||||
DISCARD = 655, /* DISCARD */
|
||||
RETURN = 656, /* RETURN */
|
||||
SWITCH = 657, /* SWITCH */
|
||||
CASE = 658, /* CASE */
|
||||
DEFAULT = 659, /* DEFAULT */
|
||||
TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */
|
||||
TERMINATE_RAY = 661, /* TERMINATE_RAY */
|
||||
IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */
|
||||
UNIFORM = 663, /* UNIFORM */
|
||||
SHARED = 664, /* SHARED */
|
||||
BUFFER = 665, /* BUFFER */
|
||||
FLAT = 666, /* FLAT */
|
||||
SMOOTH = 667, /* SMOOTH */
|
||||
LAYOUT = 668, /* LAYOUT */
|
||||
DOUBLECONSTANT = 669, /* DOUBLECONSTANT */
|
||||
INT16CONSTANT = 670, /* INT16CONSTANT */
|
||||
UINT16CONSTANT = 671, /* UINT16CONSTANT */
|
||||
FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */
|
||||
INT32CONSTANT = 673, /* INT32CONSTANT */
|
||||
UINT32CONSTANT = 674, /* UINT32CONSTANT */
|
||||
INT64CONSTANT = 675, /* INT64CONSTANT */
|
||||
UINT64CONSTANT = 676, /* UINT64CONSTANT */
|
||||
SUBROUTINE = 677, /* SUBROUTINE */
|
||||
DEMOTE = 678, /* DEMOTE */
|
||||
PAYLOADNV = 679, /* PAYLOADNV */
|
||||
PAYLOADINNV = 680, /* PAYLOADINNV */
|
||||
HITATTRNV = 681, /* HITATTRNV */
|
||||
CALLDATANV = 682, /* CALLDATANV */
|
||||
CALLDATAINNV = 683, /* CALLDATAINNV */
|
||||
PAYLOADEXT = 684, /* PAYLOADEXT */
|
||||
PAYLOADINEXT = 685, /* PAYLOADINEXT */
|
||||
HITATTREXT = 686, /* HITATTREXT */
|
||||
CALLDATAEXT = 687, /* CALLDATAEXT */
|
||||
CALLDATAINEXT = 688, /* CALLDATAINEXT */
|
||||
PATCH = 689, /* PATCH */
|
||||
SAMPLE = 690, /* SAMPLE */
|
||||
NONUNIFORM = 691, /* NONUNIFORM */
|
||||
COHERENT = 692, /* COHERENT */
|
||||
VOLATILE = 693, /* VOLATILE */
|
||||
RESTRICT = 694, /* RESTRICT */
|
||||
READONLY = 695, /* READONLY */
|
||||
WRITEONLY = 696, /* WRITEONLY */
|
||||
DEVICECOHERENT = 697, /* DEVICECOHERENT */
|
||||
QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */
|
||||
WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */
|
||||
SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */
|
||||
NONPRIVATE = 701, /* NONPRIVATE */
|
||||
SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */
|
||||
NOPERSPECTIVE = 703, /* NOPERSPECTIVE */
|
||||
EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */
|
||||
PERVERTEXEXT = 705, /* PERVERTEXEXT */
|
||||
PERVERTEXNV = 706, /* PERVERTEXNV */
|
||||
PERPRIMITIVENV = 707, /* PERPRIMITIVENV */
|
||||
PERVIEWNV = 708, /* PERVIEWNV */
|
||||
PERTASKNV = 709, /* PERTASKNV */
|
||||
PERPRIMITIVEEXT = 710, /* PERPRIMITIVEEXT */
|
||||
TASKPAYLOADWORKGROUPEXT = 711, /* TASKPAYLOADWORKGROUPEXT */
|
||||
PRECISE = 712 /* PRECISE */
|
||||
HITOBJECTNV = 421, /* HITOBJECTNV */
|
||||
HITOBJECTATTRNV = 422, /* HITOBJECTATTRNV */
|
||||
SAMPLERCUBEARRAY = 423, /* SAMPLERCUBEARRAY */
|
||||
SAMPLERCUBEARRAYSHADOW = 424, /* SAMPLERCUBEARRAYSHADOW */
|
||||
ISAMPLERCUBEARRAY = 425, /* ISAMPLERCUBEARRAY */
|
||||
USAMPLERCUBEARRAY = 426, /* USAMPLERCUBEARRAY */
|
||||
SAMPLER1D = 427, /* SAMPLER1D */
|
||||
SAMPLER1DARRAY = 428, /* SAMPLER1DARRAY */
|
||||
SAMPLER1DARRAYSHADOW = 429, /* SAMPLER1DARRAYSHADOW */
|
||||
ISAMPLER1D = 430, /* ISAMPLER1D */
|
||||
SAMPLER1DSHADOW = 431, /* SAMPLER1DSHADOW */
|
||||
SAMPLER2DRECT = 432, /* SAMPLER2DRECT */
|
||||
SAMPLER2DRECTSHADOW = 433, /* SAMPLER2DRECTSHADOW */
|
||||
ISAMPLER2DRECT = 434, /* ISAMPLER2DRECT */
|
||||
USAMPLER2DRECT = 435, /* USAMPLER2DRECT */
|
||||
SAMPLERBUFFER = 436, /* SAMPLERBUFFER */
|
||||
ISAMPLERBUFFER = 437, /* ISAMPLERBUFFER */
|
||||
USAMPLERBUFFER = 438, /* USAMPLERBUFFER */
|
||||
SAMPLER2DMS = 439, /* SAMPLER2DMS */
|
||||
ISAMPLER2DMS = 440, /* ISAMPLER2DMS */
|
||||
USAMPLER2DMS = 441, /* USAMPLER2DMS */
|
||||
SAMPLER2DMSARRAY = 442, /* SAMPLER2DMSARRAY */
|
||||
ISAMPLER2DMSARRAY = 443, /* ISAMPLER2DMSARRAY */
|
||||
USAMPLER2DMSARRAY = 444, /* USAMPLER2DMSARRAY */
|
||||
SAMPLEREXTERNALOES = 445, /* SAMPLEREXTERNALOES */
|
||||
SAMPLEREXTERNAL2DY2YEXT = 446, /* SAMPLEREXTERNAL2DY2YEXT */
|
||||
ISAMPLER1DARRAY = 447, /* ISAMPLER1DARRAY */
|
||||
USAMPLER1D = 448, /* USAMPLER1D */
|
||||
USAMPLER1DARRAY = 449, /* USAMPLER1DARRAY */
|
||||
F16SAMPLER1D = 450, /* F16SAMPLER1D */
|
||||
F16SAMPLER2D = 451, /* F16SAMPLER2D */
|
||||
F16SAMPLER3D = 452, /* F16SAMPLER3D */
|
||||
F16SAMPLER2DRECT = 453, /* F16SAMPLER2DRECT */
|
||||
F16SAMPLERCUBE = 454, /* F16SAMPLERCUBE */
|
||||
F16SAMPLER1DARRAY = 455, /* F16SAMPLER1DARRAY */
|
||||
F16SAMPLER2DARRAY = 456, /* F16SAMPLER2DARRAY */
|
||||
F16SAMPLERCUBEARRAY = 457, /* F16SAMPLERCUBEARRAY */
|
||||
F16SAMPLERBUFFER = 458, /* F16SAMPLERBUFFER */
|
||||
F16SAMPLER2DMS = 459, /* F16SAMPLER2DMS */
|
||||
F16SAMPLER2DMSARRAY = 460, /* F16SAMPLER2DMSARRAY */
|
||||
F16SAMPLER1DSHADOW = 461, /* F16SAMPLER1DSHADOW */
|
||||
F16SAMPLER2DSHADOW = 462, /* F16SAMPLER2DSHADOW */
|
||||
F16SAMPLER1DARRAYSHADOW = 463, /* F16SAMPLER1DARRAYSHADOW */
|
||||
F16SAMPLER2DARRAYSHADOW = 464, /* F16SAMPLER2DARRAYSHADOW */
|
||||
F16SAMPLER2DRECTSHADOW = 465, /* F16SAMPLER2DRECTSHADOW */
|
||||
F16SAMPLERCUBESHADOW = 466, /* F16SAMPLERCUBESHADOW */
|
||||
F16SAMPLERCUBEARRAYSHADOW = 467, /* F16SAMPLERCUBEARRAYSHADOW */
|
||||
IMAGE1D = 468, /* IMAGE1D */
|
||||
IIMAGE1D = 469, /* IIMAGE1D */
|
||||
UIMAGE1D = 470, /* UIMAGE1D */
|
||||
IMAGE2D = 471, /* IMAGE2D */
|
||||
IIMAGE2D = 472, /* IIMAGE2D */
|
||||
UIMAGE2D = 473, /* UIMAGE2D */
|
||||
IMAGE3D = 474, /* IMAGE3D */
|
||||
IIMAGE3D = 475, /* IIMAGE3D */
|
||||
UIMAGE3D = 476, /* UIMAGE3D */
|
||||
IMAGE2DRECT = 477, /* IMAGE2DRECT */
|
||||
IIMAGE2DRECT = 478, /* IIMAGE2DRECT */
|
||||
UIMAGE2DRECT = 479, /* UIMAGE2DRECT */
|
||||
IMAGECUBE = 480, /* IMAGECUBE */
|
||||
IIMAGECUBE = 481, /* IIMAGECUBE */
|
||||
UIMAGECUBE = 482, /* UIMAGECUBE */
|
||||
IMAGEBUFFER = 483, /* IMAGEBUFFER */
|
||||
IIMAGEBUFFER = 484, /* IIMAGEBUFFER */
|
||||
UIMAGEBUFFER = 485, /* UIMAGEBUFFER */
|
||||
IMAGE1DARRAY = 486, /* IMAGE1DARRAY */
|
||||
IIMAGE1DARRAY = 487, /* IIMAGE1DARRAY */
|
||||
UIMAGE1DARRAY = 488, /* UIMAGE1DARRAY */
|
||||
IMAGE2DARRAY = 489, /* IMAGE2DARRAY */
|
||||
IIMAGE2DARRAY = 490, /* IIMAGE2DARRAY */
|
||||
UIMAGE2DARRAY = 491, /* UIMAGE2DARRAY */
|
||||
IMAGECUBEARRAY = 492, /* IMAGECUBEARRAY */
|
||||
IIMAGECUBEARRAY = 493, /* IIMAGECUBEARRAY */
|
||||
UIMAGECUBEARRAY = 494, /* UIMAGECUBEARRAY */
|
||||
IMAGE2DMS = 495, /* IMAGE2DMS */
|
||||
IIMAGE2DMS = 496, /* IIMAGE2DMS */
|
||||
UIMAGE2DMS = 497, /* UIMAGE2DMS */
|
||||
IMAGE2DMSARRAY = 498, /* IMAGE2DMSARRAY */
|
||||
IIMAGE2DMSARRAY = 499, /* IIMAGE2DMSARRAY */
|
||||
UIMAGE2DMSARRAY = 500, /* UIMAGE2DMSARRAY */
|
||||
F16IMAGE1D = 501, /* F16IMAGE1D */
|
||||
F16IMAGE2D = 502, /* F16IMAGE2D */
|
||||
F16IMAGE3D = 503, /* F16IMAGE3D */
|
||||
F16IMAGE2DRECT = 504, /* F16IMAGE2DRECT */
|
||||
F16IMAGECUBE = 505, /* F16IMAGECUBE */
|
||||
F16IMAGE1DARRAY = 506, /* F16IMAGE1DARRAY */
|
||||
F16IMAGE2DARRAY = 507, /* F16IMAGE2DARRAY */
|
||||
F16IMAGECUBEARRAY = 508, /* F16IMAGECUBEARRAY */
|
||||
F16IMAGEBUFFER = 509, /* F16IMAGEBUFFER */
|
||||
F16IMAGE2DMS = 510, /* F16IMAGE2DMS */
|
||||
F16IMAGE2DMSARRAY = 511, /* F16IMAGE2DMSARRAY */
|
||||
I64IMAGE1D = 512, /* I64IMAGE1D */
|
||||
U64IMAGE1D = 513, /* U64IMAGE1D */
|
||||
I64IMAGE2D = 514, /* I64IMAGE2D */
|
||||
U64IMAGE2D = 515, /* U64IMAGE2D */
|
||||
I64IMAGE3D = 516, /* I64IMAGE3D */
|
||||
U64IMAGE3D = 517, /* U64IMAGE3D */
|
||||
I64IMAGE2DRECT = 518, /* I64IMAGE2DRECT */
|
||||
U64IMAGE2DRECT = 519, /* U64IMAGE2DRECT */
|
||||
I64IMAGECUBE = 520, /* I64IMAGECUBE */
|
||||
U64IMAGECUBE = 521, /* U64IMAGECUBE */
|
||||
I64IMAGEBUFFER = 522, /* I64IMAGEBUFFER */
|
||||
U64IMAGEBUFFER = 523, /* U64IMAGEBUFFER */
|
||||
I64IMAGE1DARRAY = 524, /* I64IMAGE1DARRAY */
|
||||
U64IMAGE1DARRAY = 525, /* U64IMAGE1DARRAY */
|
||||
I64IMAGE2DARRAY = 526, /* I64IMAGE2DARRAY */
|
||||
U64IMAGE2DARRAY = 527, /* U64IMAGE2DARRAY */
|
||||
I64IMAGECUBEARRAY = 528, /* I64IMAGECUBEARRAY */
|
||||
U64IMAGECUBEARRAY = 529, /* U64IMAGECUBEARRAY */
|
||||
I64IMAGE2DMS = 530, /* I64IMAGE2DMS */
|
||||
U64IMAGE2DMS = 531, /* U64IMAGE2DMS */
|
||||
I64IMAGE2DMSARRAY = 532, /* I64IMAGE2DMSARRAY */
|
||||
U64IMAGE2DMSARRAY = 533, /* U64IMAGE2DMSARRAY */
|
||||
TEXTURECUBEARRAY = 534, /* TEXTURECUBEARRAY */
|
||||
ITEXTURECUBEARRAY = 535, /* ITEXTURECUBEARRAY */
|
||||
UTEXTURECUBEARRAY = 536, /* UTEXTURECUBEARRAY */
|
||||
TEXTURE1D = 537, /* TEXTURE1D */
|
||||
ITEXTURE1D = 538, /* ITEXTURE1D */
|
||||
UTEXTURE1D = 539, /* UTEXTURE1D */
|
||||
TEXTURE1DARRAY = 540, /* TEXTURE1DARRAY */
|
||||
ITEXTURE1DARRAY = 541, /* ITEXTURE1DARRAY */
|
||||
UTEXTURE1DARRAY = 542, /* UTEXTURE1DARRAY */
|
||||
TEXTURE2DRECT = 543, /* TEXTURE2DRECT */
|
||||
ITEXTURE2DRECT = 544, /* ITEXTURE2DRECT */
|
||||
UTEXTURE2DRECT = 545, /* UTEXTURE2DRECT */
|
||||
TEXTUREBUFFER = 546, /* TEXTUREBUFFER */
|
||||
ITEXTUREBUFFER = 547, /* ITEXTUREBUFFER */
|
||||
UTEXTUREBUFFER = 548, /* UTEXTUREBUFFER */
|
||||
TEXTURE2DMS = 549, /* TEXTURE2DMS */
|
||||
ITEXTURE2DMS = 550, /* ITEXTURE2DMS */
|
||||
UTEXTURE2DMS = 551, /* UTEXTURE2DMS */
|
||||
TEXTURE2DMSARRAY = 552, /* TEXTURE2DMSARRAY */
|
||||
ITEXTURE2DMSARRAY = 553, /* ITEXTURE2DMSARRAY */
|
||||
UTEXTURE2DMSARRAY = 554, /* UTEXTURE2DMSARRAY */
|
||||
F16TEXTURE1D = 555, /* F16TEXTURE1D */
|
||||
F16TEXTURE2D = 556, /* F16TEXTURE2D */
|
||||
F16TEXTURE3D = 557, /* F16TEXTURE3D */
|
||||
F16TEXTURE2DRECT = 558, /* F16TEXTURE2DRECT */
|
||||
F16TEXTURECUBE = 559, /* F16TEXTURECUBE */
|
||||
F16TEXTURE1DARRAY = 560, /* F16TEXTURE1DARRAY */
|
||||
F16TEXTURE2DARRAY = 561, /* F16TEXTURE2DARRAY */
|
||||
F16TEXTURECUBEARRAY = 562, /* F16TEXTURECUBEARRAY */
|
||||
F16TEXTUREBUFFER = 563, /* F16TEXTUREBUFFER */
|
||||
F16TEXTURE2DMS = 564, /* F16TEXTURE2DMS */
|
||||
F16TEXTURE2DMSARRAY = 565, /* F16TEXTURE2DMSARRAY */
|
||||
SUBPASSINPUT = 566, /* SUBPASSINPUT */
|
||||
SUBPASSINPUTMS = 567, /* SUBPASSINPUTMS */
|
||||
ISUBPASSINPUT = 568, /* ISUBPASSINPUT */
|
||||
ISUBPASSINPUTMS = 569, /* ISUBPASSINPUTMS */
|
||||
USUBPASSINPUT = 570, /* USUBPASSINPUT */
|
||||
USUBPASSINPUTMS = 571, /* USUBPASSINPUTMS */
|
||||
F16SUBPASSINPUT = 572, /* F16SUBPASSINPUT */
|
||||
F16SUBPASSINPUTMS = 573, /* F16SUBPASSINPUTMS */
|
||||
SPIRV_INSTRUCTION = 574, /* SPIRV_INSTRUCTION */
|
||||
SPIRV_EXECUTION_MODE = 575, /* SPIRV_EXECUTION_MODE */
|
||||
SPIRV_EXECUTION_MODE_ID = 576, /* SPIRV_EXECUTION_MODE_ID */
|
||||
SPIRV_DECORATE = 577, /* SPIRV_DECORATE */
|
||||
SPIRV_DECORATE_ID = 578, /* SPIRV_DECORATE_ID */
|
||||
SPIRV_DECORATE_STRING = 579, /* SPIRV_DECORATE_STRING */
|
||||
SPIRV_TYPE = 580, /* SPIRV_TYPE */
|
||||
SPIRV_STORAGE_CLASS = 581, /* SPIRV_STORAGE_CLASS */
|
||||
SPIRV_BY_REFERENCE = 582, /* SPIRV_BY_REFERENCE */
|
||||
SPIRV_LITERAL = 583, /* SPIRV_LITERAL */
|
||||
ATTACHMENTEXT = 584, /* ATTACHMENTEXT */
|
||||
IATTACHMENTEXT = 585, /* IATTACHMENTEXT */
|
||||
UATTACHMENTEXT = 586, /* UATTACHMENTEXT */
|
||||
LEFT_OP = 587, /* LEFT_OP */
|
||||
RIGHT_OP = 588, /* RIGHT_OP */
|
||||
INC_OP = 589, /* INC_OP */
|
||||
DEC_OP = 590, /* DEC_OP */
|
||||
LE_OP = 591, /* LE_OP */
|
||||
GE_OP = 592, /* GE_OP */
|
||||
EQ_OP = 593, /* EQ_OP */
|
||||
NE_OP = 594, /* NE_OP */
|
||||
AND_OP = 595, /* AND_OP */
|
||||
OR_OP = 596, /* OR_OP */
|
||||
XOR_OP = 597, /* XOR_OP */
|
||||
MUL_ASSIGN = 598, /* MUL_ASSIGN */
|
||||
DIV_ASSIGN = 599, /* DIV_ASSIGN */
|
||||
ADD_ASSIGN = 600, /* ADD_ASSIGN */
|
||||
MOD_ASSIGN = 601, /* MOD_ASSIGN */
|
||||
LEFT_ASSIGN = 602, /* LEFT_ASSIGN */
|
||||
RIGHT_ASSIGN = 603, /* RIGHT_ASSIGN */
|
||||
AND_ASSIGN = 604, /* AND_ASSIGN */
|
||||
XOR_ASSIGN = 605, /* XOR_ASSIGN */
|
||||
OR_ASSIGN = 606, /* OR_ASSIGN */
|
||||
SUB_ASSIGN = 607, /* SUB_ASSIGN */
|
||||
STRING_LITERAL = 608, /* STRING_LITERAL */
|
||||
LEFT_PAREN = 609, /* LEFT_PAREN */
|
||||
RIGHT_PAREN = 610, /* RIGHT_PAREN */
|
||||
LEFT_BRACKET = 611, /* LEFT_BRACKET */
|
||||
RIGHT_BRACKET = 612, /* RIGHT_BRACKET */
|
||||
LEFT_BRACE = 613, /* LEFT_BRACE */
|
||||
RIGHT_BRACE = 614, /* RIGHT_BRACE */
|
||||
DOT = 615, /* DOT */
|
||||
COMMA = 616, /* COMMA */
|
||||
COLON = 617, /* COLON */
|
||||
EQUAL = 618, /* EQUAL */
|
||||
SEMICOLON = 619, /* SEMICOLON */
|
||||
BANG = 620, /* BANG */
|
||||
DASH = 621, /* DASH */
|
||||
TILDE = 622, /* TILDE */
|
||||
PLUS = 623, /* PLUS */
|
||||
STAR = 624, /* STAR */
|
||||
SLASH = 625, /* SLASH */
|
||||
PERCENT = 626, /* PERCENT */
|
||||
LEFT_ANGLE = 627, /* LEFT_ANGLE */
|
||||
RIGHT_ANGLE = 628, /* RIGHT_ANGLE */
|
||||
VERTICAL_BAR = 629, /* VERTICAL_BAR */
|
||||
CARET = 630, /* CARET */
|
||||
AMPERSAND = 631, /* AMPERSAND */
|
||||
QUESTION = 632, /* QUESTION */
|
||||
INVARIANT = 633, /* INVARIANT */
|
||||
HIGH_PRECISION = 634, /* HIGH_PRECISION */
|
||||
MEDIUM_PRECISION = 635, /* MEDIUM_PRECISION */
|
||||
LOW_PRECISION = 636, /* LOW_PRECISION */
|
||||
PRECISION = 637, /* PRECISION */
|
||||
PACKED = 638, /* PACKED */
|
||||
RESOURCE = 639, /* RESOURCE */
|
||||
SUPERP = 640, /* SUPERP */
|
||||
FLOATCONSTANT = 641, /* FLOATCONSTANT */
|
||||
INTCONSTANT = 642, /* INTCONSTANT */
|
||||
UINTCONSTANT = 643, /* UINTCONSTANT */
|
||||
BOOLCONSTANT = 644, /* BOOLCONSTANT */
|
||||
IDENTIFIER = 645, /* IDENTIFIER */
|
||||
TYPE_NAME = 646, /* TYPE_NAME */
|
||||
CENTROID = 647, /* CENTROID */
|
||||
IN = 648, /* IN */
|
||||
OUT = 649, /* OUT */
|
||||
INOUT = 650, /* INOUT */
|
||||
STRUCT = 651, /* STRUCT */
|
||||
VOID = 652, /* VOID */
|
||||
WHILE = 653, /* WHILE */
|
||||
BREAK = 654, /* BREAK */
|
||||
CONTINUE = 655, /* CONTINUE */
|
||||
DO = 656, /* DO */
|
||||
ELSE = 657, /* ELSE */
|
||||
FOR = 658, /* FOR */
|
||||
IF = 659, /* IF */
|
||||
DISCARD = 660, /* DISCARD */
|
||||
RETURN = 661, /* RETURN */
|
||||
SWITCH = 662, /* SWITCH */
|
||||
CASE = 663, /* CASE */
|
||||
DEFAULT = 664, /* DEFAULT */
|
||||
TERMINATE_INVOCATION = 665, /* TERMINATE_INVOCATION */
|
||||
TERMINATE_RAY = 666, /* TERMINATE_RAY */
|
||||
IGNORE_INTERSECTION = 667, /* IGNORE_INTERSECTION */
|
||||
UNIFORM = 668, /* UNIFORM */
|
||||
SHARED = 669, /* SHARED */
|
||||
BUFFER = 670, /* BUFFER */
|
||||
TILEIMAGEEXT = 671, /* TILEIMAGEEXT */
|
||||
FLAT = 672, /* FLAT */
|
||||
SMOOTH = 673, /* SMOOTH */
|
||||
LAYOUT = 674, /* LAYOUT */
|
||||
DOUBLECONSTANT = 675, /* DOUBLECONSTANT */
|
||||
INT16CONSTANT = 676, /* INT16CONSTANT */
|
||||
UINT16CONSTANT = 677, /* UINT16CONSTANT */
|
||||
FLOAT16CONSTANT = 678, /* FLOAT16CONSTANT */
|
||||
INT32CONSTANT = 679, /* INT32CONSTANT */
|
||||
UINT32CONSTANT = 680, /* UINT32CONSTANT */
|
||||
INT64CONSTANT = 681, /* INT64CONSTANT */
|
||||
UINT64CONSTANT = 682, /* UINT64CONSTANT */
|
||||
SUBROUTINE = 683, /* SUBROUTINE */
|
||||
DEMOTE = 684, /* DEMOTE */
|
||||
PAYLOADNV = 685, /* PAYLOADNV */
|
||||
PAYLOADINNV = 686, /* PAYLOADINNV */
|
||||
HITATTRNV = 687, /* HITATTRNV */
|
||||
CALLDATANV = 688, /* CALLDATANV */
|
||||
CALLDATAINNV = 689, /* CALLDATAINNV */
|
||||
PAYLOADEXT = 690, /* PAYLOADEXT */
|
||||
PAYLOADINEXT = 691, /* PAYLOADINEXT */
|
||||
HITATTREXT = 692, /* HITATTREXT */
|
||||
CALLDATAEXT = 693, /* CALLDATAEXT */
|
||||
CALLDATAINEXT = 694, /* CALLDATAINEXT */
|
||||
PATCH = 695, /* PATCH */
|
||||
SAMPLE = 696, /* SAMPLE */
|
||||
NONUNIFORM = 697, /* NONUNIFORM */
|
||||
COHERENT = 698, /* COHERENT */
|
||||
VOLATILE = 699, /* VOLATILE */
|
||||
RESTRICT = 700, /* RESTRICT */
|
||||
READONLY = 701, /* READONLY */
|
||||
WRITEONLY = 702, /* WRITEONLY */
|
||||
DEVICECOHERENT = 703, /* DEVICECOHERENT */
|
||||
QUEUEFAMILYCOHERENT = 704, /* QUEUEFAMILYCOHERENT */
|
||||
WORKGROUPCOHERENT = 705, /* WORKGROUPCOHERENT */
|
||||
SUBGROUPCOHERENT = 706, /* SUBGROUPCOHERENT */
|
||||
NONPRIVATE = 707, /* NONPRIVATE */
|
||||
SHADERCALLCOHERENT = 708, /* SHADERCALLCOHERENT */
|
||||
NOPERSPECTIVE = 709, /* NOPERSPECTIVE */
|
||||
EXPLICITINTERPAMD = 710, /* EXPLICITINTERPAMD */
|
||||
PERVERTEXEXT = 711, /* PERVERTEXEXT */
|
||||
PERVERTEXNV = 712, /* PERVERTEXNV */
|
||||
PERPRIMITIVENV = 713, /* PERPRIMITIVENV */
|
||||
PERVIEWNV = 714, /* PERVIEWNV */
|
||||
PERTASKNV = 715, /* PERTASKNV */
|
||||
PERPRIMITIVEEXT = 716, /* PERPRIMITIVEEXT */
|
||||
TASKPAYLOADWORKGROUPEXT = 717, /* TASKPAYLOADWORKGROUPEXT */
|
||||
PRECISE = 718 /* PRECISE */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
|
@ -556,7 +562,7 @@ union YYSTYPE
|
|||
glslang::TArraySizes* typeParameters;
|
||||
} interm;
|
||||
|
||||
#line 560 "MachineIndependent/glslang_tab.cpp.h"
|
||||
#line 566 "MachineIndependent/glslang_tab.cpp.h"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
|
@ -566,6 +572,8 @@ typedef union YYSTYPE YYSTYPE;
|
|||
|
||||
|
||||
|
||||
|
||||
int yyparse (glslang::TParseContext* pParseContext);
|
||||
|
||||
|
||||
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#include "localintermediate.h"
|
||||
#include "../Include/InfoSink.h"
|
||||
|
@ -663,6 +663,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
|
|||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||
|
||||
case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break;
|
||||
|
||||
case EOpConstructReference: out.debug << "Construct reference type"; break;
|
||||
|
||||
case EOpDeclare: out.debug << "Declare"; break;
|
||||
|
@ -1060,6 +1062,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||
|
||||
case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break;
|
||||
|
||||
case EOpTraceNV: out.debug << "traceNV"; break;
|
||||
case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break;
|
||||
case EOpTraceKHR: out.debug << "traceRayKHR"; break;
|
||||
|
@ -1097,6 +1101,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break;
|
||||
case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break;
|
||||
case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
|
||||
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break;
|
||||
|
||||
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
|
||||
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
|
||||
|
@ -1105,9 +1110,43 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
||||
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
||||
|
||||
case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break;
|
||||
case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break;
|
||||
case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break;
|
||||
case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break;
|
||||
case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break;
|
||||
case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break;
|
||||
case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break;
|
||||
case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break;
|
||||
case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break;
|
||||
case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break;
|
||||
case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break;
|
||||
case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break;
|
||||
case EOpHitObjectIsHitNV: out.debug << "HitObjectIsHitNV"; break;
|
||||
case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break;
|
||||
case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break;
|
||||
case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break;
|
||||
case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break;
|
||||
case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break;
|
||||
case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break;
|
||||
case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break;
|
||||
case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break;
|
||||
case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break;
|
||||
case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break;
|
||||
case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break;
|
||||
case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break;
|
||||
case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break;
|
||||
case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break;
|
||||
case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break;
|
||||
case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break;
|
||||
case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break;
|
||||
case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break;
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
||||
#endif
|
||||
case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break;
|
||||
case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break;
|
||||
|
||||
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
||||
}
|
||||
|
@ -1512,6 +1551,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||
infoSink.debug << "using early_fragment_tests\n";
|
||||
if (postDepthCoverage)
|
||||
infoSink.debug << "using post_depth_coverage\n";
|
||||
if (nonCoherentColorAttachmentReadEXT)
|
||||
infoSink.debug << "using non_coherent_color_attachment_readEXT\n";
|
||||
if (nonCoherentDepthAttachmentReadEXT)
|
||||
infoSink.debug << "using non_coherent_depth_attachment_readEXT\n";
|
||||
if (nonCoherentStencilAttachmentReadEXT)
|
||||
infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n";
|
||||
if (depthLayout != EldNone)
|
||||
infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
|
||||
if (blendEquations != 0) {
|
||||
|
@ -1552,7 +1597,7 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||
break;
|
||||
}
|
||||
|
||||
if (treeRoot == 0 || ! tree)
|
||||
if (treeRoot == nullptr || ! tree)
|
||||
return;
|
||||
|
||||
TOutputTraverser it(infoSink);
|
||||
|
@ -1563,4 +1608,4 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||
|
||||
} // end namespace glslang
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#include "../Include/Common.h"
|
||||
#include "../Include/InfoSink.h"
|
||||
|
@ -1710,4 +1710,4 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) {
|
|||
|
||||
} // end namespace glslang
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#ifndef _IOMAPPER_INCLUDED
|
||||
#define _IOMAPPER_INCLUDED
|
||||
|
@ -358,4 +358,4 @@ private:
|
|||
|
||||
#endif // _IOMAPPER_INCLUDED
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
|
|
@ -89,7 +89,7 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage u
|
|||
//
|
||||
void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
|
||||
{
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
mergeCallGraphs(infoSink, unit);
|
||||
mergeModes(infoSink, unit);
|
||||
mergeTrees(infoSink, unit);
|
||||
|
@ -161,7 +161,7 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
|
|||
callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
|
||||
}
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#define MERGE_MAX(member) member = std::max(member, unit.member)
|
||||
#define MERGE_TRUE(member) if (unit.member) member = unit.member;
|
||||
|
@ -271,6 +271,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
|||
|
||||
MERGE_TRUE(earlyFragmentTests);
|
||||
MERGE_TRUE(postDepthCoverage);
|
||||
MERGE_TRUE(nonCoherentColorAttachmentReadEXT);
|
||||
MERGE_TRUE(nonCoherentDepthAttachmentReadEXT);
|
||||
MERGE_TRUE(nonCoherentStencilAttachmentReadEXT);
|
||||
|
||||
if (depthLayout == EldNone)
|
||||
depthLayout = unit.depthLayout;
|
||||
|
@ -749,6 +752,21 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
|
|||
symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation;
|
||||
}
|
||||
|
||||
// Update implicit array sizes
|
||||
if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isImplicitlySizedArray()) {
|
||||
if (unitSymbol->getType().getImplicitArraySize() > symbol->getType().getImplicitArraySize()){
|
||||
symbol->getWritableType().updateImplicitArraySize(unitSymbol->getType().getImplicitArraySize());
|
||||
}
|
||||
}
|
||||
else if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isSizedArray()) {
|
||||
if (symbol->getWritableType().getImplicitArraySize() > unitSymbol->getType().getOuterArraySize())
|
||||
error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.");
|
||||
}
|
||||
else if (unitSymbol->getType().isImplicitlySizedArray() && symbol->getWritableType().isSizedArray()) {
|
||||
if (unitSymbol->getType().getImplicitArraySize() > symbol->getWritableType().getOuterArraySize())
|
||||
error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders.");
|
||||
}
|
||||
|
||||
// Update implicit array sizes
|
||||
mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType());
|
||||
|
||||
|
@ -759,6 +777,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin
|
|||
else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage)
|
||||
error(infoSink, "Only one push_constant block is allowed per stage");
|
||||
}
|
||||
|
||||
// Check conflicts between preset primitives and sizes of I/O variables among multiple geometry shaders
|
||||
if (language == EShLangGeometry && unitStage == EShLangGeometry)
|
||||
{
|
||||
TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode();
|
||||
if (unitSymbol->isArray() && unitSymbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().builtIn == EbvNone)
|
||||
if ((unitSymbol->getArraySizes()->isImplicitlySized() &&
|
||||
unitSymbol->getArraySizes()->getImplicitSize() != TQualifier::mapGeometryToSize(getInputPrimitive())) ||
|
||||
(! unitSymbol->getArraySizes()->isImplicitlySized() &&
|
||||
unitSymbol->getArraySizes()->getDimSize(0) != TQualifier::mapGeometryToSize(getInputPrimitive())))
|
||||
error(infoSink, "Not all array sizes match across all geometry shaders in the program");
|
||||
}
|
||||
|
||||
if (merge) {
|
||||
linkerObjects.push_back(unitLinkerObjects[unitLinkObj]);
|
||||
|
||||
|
@ -828,7 +859,7 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
|
|||
//
|
||||
void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage)
|
||||
{
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
bool crossStage = getStage() != unitStage;
|
||||
bool writeTypeComparison = false;
|
||||
bool errorReported = false;
|
||||
|
@ -863,7 +894,8 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
|
|||
else {
|
||||
arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) ||
|
||||
(symbol.getType().isArray() && unitSymbol.getType().isArray() &&
|
||||
(symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
|
||||
(symbol.getType().isImplicitlySizedArray() || unitSymbol.getType().isImplicitlySizedArray() ||
|
||||
symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray()));
|
||||
}
|
||||
|
||||
int lpidx = -1;
|
||||
|
@ -1383,7 +1415,7 @@ void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink)
|
|||
TCall* newRoot;
|
||||
do {
|
||||
// See if we have unvisited parts of the graph.
|
||||
newRoot = 0;
|
||||
newRoot = nullptr;
|
||||
for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) {
|
||||
if (! call->visited) {
|
||||
newRoot = &(*call);
|
||||
|
@ -1517,8 +1549,11 @@ void TIntermediate::checkCallGraphBodies(TInfoSink& infoSink, bool keepUncalled)
|
|||
if (! keepUncalled) {
|
||||
for (int f = 0; f < (int)functionSequence.size(); ++f) {
|
||||
if (! reachable[f])
|
||||
{
|
||||
resetTopLevelUncalledStatus(functionSequence[f]->getAsAggregate()->getName());
|
||||
functionSequence[f] = nullptr;
|
||||
}
|
||||
}
|
||||
functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end());
|
||||
}
|
||||
}
|
||||
|
@ -1585,7 +1620,7 @@ bool TIntermediate::userOutputUsed() const
|
|||
return found;
|
||||
}
|
||||
|
||||
// Accumulate locations used for inputs, outputs, and uniforms, payload and callable data
|
||||
// Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT
|
||||
// and check for collisions as the accumulation is done.
|
||||
//
|
||||
// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
|
||||
|
@ -1607,10 +1642,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||
set = 2;
|
||||
else if (qualifier.storage == EvqBuffer)
|
||||
set = 3;
|
||||
else if (qualifier.storage == EvqTileImageEXT)
|
||||
set = 4;
|
||||
else if (qualifier.isAnyPayload())
|
||||
setRT = 0;
|
||||
else if (qualifier.isAnyCallable())
|
||||
setRT = 1;
|
||||
else if (qualifier.isHitObjectAttrNV())
|
||||
setRT = 2;
|
||||
else
|
||||
return -1;
|
||||
|
||||
|
@ -1650,7 +1689,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||
// slot irrespective of type.
|
||||
int collision = -1; // no collision
|
||||
#ifndef GLSLANG_WEB
|
||||
if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) {
|
||||
if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) {
|
||||
TRange range(qualifier.layoutLocation, qualifier.layoutLocation);
|
||||
collision = checkLocationRT(setRT, qualifier.layoutLocation);
|
||||
if (collision < 0)
|
||||
|
@ -1697,7 +1736,10 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||
}
|
||||
|
||||
// combine location and component ranges
|
||||
TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0);
|
||||
TBasicType basicTy = type.getBasicType();
|
||||
if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT())
|
||||
basicTy = type.getSampler().type;
|
||||
TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0);
|
||||
|
||||
// check for collisions, except for vertex inputs on desktop targeting OpenGL
|
||||
if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
|
||||
|
@ -1728,6 +1770,19 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp
|
|||
}
|
||||
}
|
||||
|
||||
// check typeCollision between tileImageEXT and out
|
||||
if (set == 4 || set == 1) {
|
||||
// if the set is "tileImageEXT", check against "out" and vice versa
|
||||
int againstSet = (set == 4) ? 1 : 4;
|
||||
for (size_t r = 0; r < usedIo[againstSet].size(); ++r) {
|
||||
if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) {
|
||||
// aliased-type mismatch
|
||||
typeCollision = true;
|
||||
return std::max(range.location.start, usedIo[againstSet][r].location.start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1; // no collision
|
||||
}
|
||||
|
||||
|
@ -2012,6 +2067,15 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size)
|
|||
case EbtInt16:
|
||||
case EbtUint16: size = 2; return 2;
|
||||
case EbtReference: size = 8; return 8;
|
||||
case EbtSampler:
|
||||
{
|
||||
if (type.isBindlessImage() || type.isBindlessTexture()) {
|
||||
size = 8; return 8;
|
||||
}
|
||||
else {
|
||||
size = 4; return 4;
|
||||
}
|
||||
}
|
||||
default: size = 4; return 4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,6 +225,16 @@ enum ComputeDerivativeMode {
|
|||
LayoutDerivativeGroupLinear, // derivative_group_linearNV
|
||||
};
|
||||
|
||||
//
|
||||
// Status type on AST level. Some uncalled status or functions would be reset in call graph.
|
||||
// Currently we will keep status set by explicitly declared layout or variable decl.
|
||||
//
|
||||
enum AstRefType {
|
||||
AstRefTypeVar, // Status set by variable decl
|
||||
AstRefTypeFunc, // Status set by function decl
|
||||
AstRefTypeLayout, // Status set by layout decl
|
||||
};
|
||||
|
||||
class TIdMaps {
|
||||
public:
|
||||
TMap<TString, long long>& operator[](long long i) { return maps[i]; }
|
||||
|
@ -283,10 +293,8 @@ class TIntermediate {
|
|||
public:
|
||||
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
|
||||
language(l),
|
||||
#ifndef GLSLANG_ANGLE
|
||||
profile(p), version(v),
|
||||
#endif
|
||||
treeRoot(0),
|
||||
treeRoot(nullptr),
|
||||
resources(TBuiltInResource{}),
|
||||
numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false),
|
||||
invertY(false),
|
||||
|
@ -313,7 +321,12 @@ public:
|
|||
inputPrimitive(ElgNone), outputPrimitive(ElgNone),
|
||||
pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false),
|
||||
vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
|
||||
postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), depthLayout(EldNone), stencilLayout(ElsNone),
|
||||
postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false),
|
||||
nonCoherentColorAttachmentReadEXT(false),
|
||||
nonCoherentDepthAttachmentReadEXT(false),
|
||||
nonCoherentStencilAttachmentReadEXT(false),
|
||||
depthLayout(EldNone),
|
||||
stencilLayout(ElsNone),
|
||||
hlslFunctionality1(false),
|
||||
blendEquations(0), xfbMode(false), multiStream(false),
|
||||
layoutOverrideCoverage(false),
|
||||
|
@ -358,15 +371,11 @@ public:
|
|||
|
||||
void setVersion(int v)
|
||||
{
|
||||
#ifndef GLSLANG_ANGLE
|
||||
version = v;
|
||||
#endif
|
||||
}
|
||||
void setProfile(EProfile p)
|
||||
{
|
||||
#ifndef GLSLANG_ANGLE
|
||||
profile = p;
|
||||
#endif
|
||||
}
|
||||
|
||||
int getVersion() const { return version; }
|
||||
|
@ -634,6 +643,9 @@ public:
|
|||
bool getXfbMode() const { return false; }
|
||||
bool isMultiStream() const { return false; }
|
||||
TLayoutGeometry getOutputPrimitive() const { return ElgNone; }
|
||||
bool getNonCoherentColorAttachmentReadEXT() const { return false; }
|
||||
bool getNonCoherentDepthAttachmentReadEXT() const { return false; }
|
||||
bool getNonCoherentStencilAttachmentReadEXT() const { return false; }
|
||||
bool getPostDepthCoverage() const { return false; }
|
||||
bool getEarlyFragmentTests() const { return false; }
|
||||
TLayoutDepth getDepth() const { return EldNone; }
|
||||
|
@ -750,6 +762,65 @@ public:
|
|||
useVariablePointers = true;
|
||||
processes.addProcess("use-variable-pointers");
|
||||
}
|
||||
// Set the global flag for bindless texture
|
||||
void setBindlessTextureMode(const TString& currentCaller, AstRefType type)
|
||||
{
|
||||
// When type is not func, currentCaller should be "" (empty string)
|
||||
bindlessTextureModeCaller[currentCaller] = type;
|
||||
}
|
||||
|
||||
// Get the global flag for bindless texture
|
||||
bool getBindlessTextureMode() const
|
||||
{
|
||||
return (bindlessTextureModeCaller.size() > 0);
|
||||
}
|
||||
|
||||
// Set the global flag for bindless image
|
||||
void setBindlessImageMode(const TString& currentCaller, AstRefType type)
|
||||
{
|
||||
// When type is not func, currentCaller should be "" (empty string)
|
||||
bindlessImageModeCaller[currentCaller] = type;
|
||||
}
|
||||
|
||||
// Get the global flag for bindless image
|
||||
bool getBindlessImageMode() const
|
||||
{
|
||||
return (bindlessImageModeCaller.size() > 0);
|
||||
}
|
||||
|
||||
// Get the global flag for bindless texture
|
||||
bool resetTopLevelUncalledStatus(const TString& deadCaller)
|
||||
{
|
||||
// For reflection collection purpose, currently uniform layout setting and some
|
||||
// flags introduced by variables (IO, global, etc,.) won't be reset here.
|
||||
// Remove each global status (AST top level) introduced by uncalled functions.
|
||||
// If a status is set by several functions, keep those which in call graph.
|
||||
bool result = false;
|
||||
|
||||
// For two types of bindless mode flag, we would only reset which is set by an uncalled function.
|
||||
// If one status flag's key in caller vec is empty, it should be come from a non-function setting.
|
||||
if (!bindlessTextureModeCaller.empty()) {
|
||||
auto caller = bindlessTextureModeCaller.find(deadCaller);
|
||||
if (caller != bindlessTextureModeCaller.end() && bindlessTextureModeCaller[deadCaller] == AstRefTypeFunc) {
|
||||
bindlessTextureModeCaller.erase(caller);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
if (!bindlessImageModeCaller.empty()) {
|
||||
auto caller = bindlessImageModeCaller.find(deadCaller);
|
||||
if (caller != bindlessImageModeCaller.end() && bindlessImageModeCaller[deadCaller] == AstRefTypeFunc) {
|
||||
bindlessImageModeCaller.erase(caller);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool getBindlessMode() const
|
||||
{
|
||||
return getBindlessTextureMode() || getBindlessImageMode();
|
||||
}
|
||||
|
||||
bool usingVariablePointers() const { return useVariablePointers; }
|
||||
|
||||
#ifdef ENABLE_HLSL
|
||||
|
@ -831,6 +902,12 @@ public:
|
|||
return true;
|
||||
}
|
||||
TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
|
||||
void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; }
|
||||
bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; }
|
||||
void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; }
|
||||
bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; }
|
||||
void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; }
|
||||
bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; }
|
||||
void setPostDepthCoverage() { postDepthCoverage = true; }
|
||||
bool getPostDepthCoverage() const { return postDepthCoverage; }
|
||||
void setEarlyFragmentTests() { earlyFragmentTests = true; }
|
||||
|
@ -1101,13 +1178,8 @@ protected:
|
|||
typedef std::list<TCall> TGraph;
|
||||
TGraph callGraph;
|
||||
|
||||
#ifdef GLSLANG_ANGLE
|
||||
const EProfile profile = ECoreProfile;
|
||||
const int version = 450;
|
||||
#else
|
||||
EProfile profile; // source profile
|
||||
int version; // source version
|
||||
#endif
|
||||
SpvVersion spvVersion;
|
||||
TIntermNode* treeRoot;
|
||||
std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
|
||||
|
@ -1157,6 +1229,9 @@ protected:
|
|||
bool earlyFragmentTests;
|
||||
bool postDepthCoverage;
|
||||
bool earlyAndLateFragmentTestsAMD;
|
||||
bool nonCoherentColorAttachmentReadEXT;
|
||||
bool nonCoherentDepthAttachmentReadEXT;
|
||||
bool nonCoherentStencilAttachmentReadEXT;
|
||||
TLayoutDepth depthLayout;
|
||||
TLayoutStencil stencilLayout;
|
||||
bool hlslFunctionality1;
|
||||
|
@ -1199,7 +1274,8 @@ protected:
|
|||
|
||||
TSpirvRequirement* spirvRequirement;
|
||||
TSpirvExecutionMode* spirvExecutionMode;
|
||||
|
||||
std::map<TString, AstRefType> bindlessTextureModeCaller;
|
||||
std::map<TString, AstRefType> bindlessImageModeCaller;
|
||||
std::unordered_map<std::string, int> uniformLocationOverrides;
|
||||
int uniformLocationBase;
|
||||
TNumericFeatures numericFeatures;
|
||||
|
@ -1209,8 +1285,9 @@ protected:
|
|||
std::unordered_set<int> usedConstantId; // specialization constant ids used
|
||||
std::vector<TOffsetRange> usedAtomics; // sets of bindings used by atomic counters
|
||||
std::vector<TIoRange> usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers
|
||||
std::vector<TRange> usedIoRT[2]; // sets of used location, one for rayPayload/rayPayloadIN and other
|
||||
// for callableData/callableDataIn
|
||||
std::vector<TRange> usedIoRT[4]; // sets of used location, one for rayPayload/rayPayloadIN,
|
||||
// one for callableData/callableDataIn, one for hitObjectAttributeNV and
|
||||
// one for shaderrecordhitobjectNV
|
||||
// set of names of statically read/written I/O that might need extra checking
|
||||
std::set<TString> ioAccessed;
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
|
|||
|
||||
bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
|
||||
{
|
||||
if (root == 0)
|
||||
if (root == nullptr)
|
||||
return false;
|
||||
|
||||
TConstTraverser it(unionArray, singleConstantParam, constructorType, t);
|
||||
|
|
|
@ -58,14 +58,14 @@ public:
|
|||
const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink,
|
||||
bool forwardCompatible, EShMessages messages)
|
||||
:
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
forwardCompatible(forwardCompatible),
|
||||
profile(profile),
|
||||
#endif
|
||||
infoSink(infoSink), version(version),
|
||||
language(language),
|
||||
spvVersion(spvVersion),
|
||||
intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { }
|
||||
intermediate(interm), messages(messages), numErrors(0), currentScanner(nullptr) { }
|
||||
virtual ~TParseVersions() { }
|
||||
void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc);
|
||||
void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc);
|
||||
|
@ -116,14 +116,9 @@ public:
|
|||
bool relaxedErrors() const { return false; }
|
||||
bool suppressWarnings() const { return true; }
|
||||
bool isForwardCompatible() const { return false; }
|
||||
#else
|
||||
#ifdef GLSLANG_ANGLE
|
||||
const bool forwardCompatible = true;
|
||||
const EProfile profile = ECoreProfile;
|
||||
#else
|
||||
bool forwardCompatible; // true if errors are to be given for use of deprecated features
|
||||
EProfile profile; // the declared profile in the shader (core by default)
|
||||
#endif
|
||||
bool isEsProfile() const { return profile == EEsProfile; }
|
||||
void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc);
|
||||
void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions,
|
||||
|
@ -231,6 +226,7 @@ public:
|
|||
protected:
|
||||
TMap<TString, TExtensionBehavior> extensionBehavior; // for each extension string, what its current behavior is
|
||||
TMap<TString, unsigned int> extensionMinSpv; // for each extension string, store minimum spirv required
|
||||
TVector<TString> spvUnsupportedExt; // for extensions reserved for spv usage.
|
||||
EShMessages messages; // errors/warnings/rule-sets
|
||||
int numErrors; // number of compile-time errors encountered
|
||||
TInputScanner* currentScanner;
|
||||
|
|
|
@ -1126,9 +1126,6 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
|
|||
pasting = true;
|
||||
}
|
||||
|
||||
// HLSL does expand macros before concatenation
|
||||
if (pasting && pp->parseContext.isReadingHLSL())
|
||||
pasting = false;
|
||||
|
||||
// TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding
|
||||
if (token == PpAtomIdentifier) {
|
||||
|
@ -1138,9 +1135,12 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
|
|||
break;
|
||||
if (i >= 0) {
|
||||
TokenStream* arg = expandedArgs[i];
|
||||
if (arg == nullptr || pasting)
|
||||
bool expanded = !!arg && !pasting;
|
||||
// HLSL does expand macros before concatenation
|
||||
if (arg == nullptr || (pasting && !pp->parseContext.isReadingHLSL()) ) {
|
||||
arg = args[i];
|
||||
pp->pushTokenStreamInput(*arg, prepaste);
|
||||
}
|
||||
pp->pushTokenStreamInput(*arg, prepaste, expanded);
|
||||
|
||||
return pp->scanToken(ppToken);
|
||||
}
|
||||
|
@ -1183,6 +1183,9 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
|
|||
{
|
||||
ppToken->space = false;
|
||||
int macroAtom = atomStrings.getAtom(ppToken->name);
|
||||
if (ppToken->fullyExpanded)
|
||||
return MacroExpandNotStarted;
|
||||
|
||||
switch (macroAtom) {
|
||||
case PpAtomLineMacro:
|
||||
// Arguments which are macro have been replaced in the first stage.
|
||||
|
@ -1214,8 +1217,10 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b
|
|||
MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom);
|
||||
|
||||
// no recursive expansions
|
||||
if (macro != nullptr && macro->busy)
|
||||
if (macro != nullptr && macro->busy) {
|
||||
ppToken->fullyExpanded = true;
|
||||
return MacroExpandNotStarted;
|
||||
}
|
||||
|
||||
// not expanding undefined macros
|
||||
if ((macro == nullptr || macro->undef) && ! expandUndef)
|
||||
|
|
|
@ -85,7 +85,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
namespace glslang {
|
||||
|
||||
TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) :
|
||||
preamble(0), strings(0), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false),
|
||||
preamble(nullptr), strings(nullptr), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false),
|
||||
rootFileName(rootFileName),
|
||||
currentSourceFile(rootFileName),
|
||||
disableEscapeSequences(false)
|
||||
|
|
|
@ -102,6 +102,7 @@ public:
|
|||
i64val = 0;
|
||||
loc.init();
|
||||
name[0] = 0;
|
||||
fullyExpanded = false;
|
||||
}
|
||||
|
||||
// Used for comparing macro definitions, so checks what is relevant for that.
|
||||
|
@ -117,6 +118,8 @@ public:
|
|||
// True if a space (for white space or a removed comment) should also be
|
||||
// recognized, in front of the token returned:
|
||||
bool space;
|
||||
|
||||
bool fullyExpanded;
|
||||
// Numeric value of the token:
|
||||
union {
|
||||
int ival;
|
||||
|
@ -475,16 +478,27 @@ protected:
|
|||
//
|
||||
// From PpTokens.cpp
|
||||
//
|
||||
void pushTokenStreamInput(TokenStream&, bool pasting = false);
|
||||
void pushTokenStreamInput(TokenStream&, bool pasting = false, bool expanded = false);
|
||||
void UngetToken(int token, TPpToken*);
|
||||
|
||||
class tTokenInput : public tInput {
|
||||
public:
|
||||
tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting) :
|
||||
tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting, bool expanded) :
|
||||
tInput(pp),
|
||||
tokens(t),
|
||||
lastTokenPastes(prepasting) { }
|
||||
virtual int scan(TPpToken *ppToken) override { return tokens->getToken(pp->parseContext, ppToken); }
|
||||
lastTokenPastes(prepasting),
|
||||
preExpanded(expanded) { }
|
||||
virtual int scan(TPpToken *ppToken) override {
|
||||
int token = tokens->getToken(pp->parseContext, ppToken);
|
||||
ppToken->fullyExpanded = preExpanded;
|
||||
if (tokens->atEnd() && token == PpAtomIdentifier) {
|
||||
int macroAtom = pp->atomStrings.getAtom(ppToken->name);
|
||||
MacroSymbol* macro = macroAtom == 0 ? nullptr : pp->lookupMacroDef(macroAtom);
|
||||
if (macro && macro->functionLike)
|
||||
ppToken->fullyExpanded = false;
|
||||
}
|
||||
return token;
|
||||
}
|
||||
virtual int getch() override { assert(0); return EndOfInput; }
|
||||
virtual void ungetch() override { assert(0); }
|
||||
virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); }
|
||||
|
@ -492,6 +506,7 @@ protected:
|
|||
protected:
|
||||
TokenStream* tokens;
|
||||
bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token
|
||||
bool preExpanded;
|
||||
};
|
||||
|
||||
class tUngotTokenInput : public tInput {
|
||||
|
|
|
@ -480,9 +480,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
E_GL_EXT_shader_explicit_arithmetic_types_int16 };
|
||||
static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]);
|
||||
|
||||
ppToken->ival = 0;
|
||||
ppToken->i64val = 0;
|
||||
ppToken->space = false;
|
||||
ppToken->clear();
|
||||
ch = getch();
|
||||
for (;;) {
|
||||
while (ch == ' ' || ch == '\t') {
|
||||
|
|
|
@ -85,9 +85,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
@ -121,7 +118,7 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken
|
|||
if (atom == '#') {
|
||||
if (peekToken('#')) {
|
||||
parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)");
|
||||
parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)");
|
||||
parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, nullptr, "token pasting (##)");
|
||||
currentPos++;
|
||||
atom = PpAtomPaste;
|
||||
}
|
||||
|
@ -195,9 +192,9 @@ bool TPpContext::TokenStream::peekUntokenizedPasting()
|
|||
return pasting;
|
||||
}
|
||||
|
||||
void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting)
|
||||
void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting, bool expanded)
|
||||
{
|
||||
pushInput(new tTokenInput(this, &ts, prepasting));
|
||||
pushInput(new tTokenInput(this, &ts, prepasting, expanded));
|
||||
ts.reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ getSymbolToDefinitionMappingAndPreciseSymbolIDs(const glslang::TIntermediate& in
|
|||
ReturnBranchNodeSet());
|
||||
|
||||
TIntermNode* root = intermediate.getTreeRoot();
|
||||
if (root == 0)
|
||||
if (root == nullptr)
|
||||
return result_tuple;
|
||||
|
||||
NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#include "../Include/Common.h"
|
||||
#include "reflection.h"
|
||||
|
@ -682,7 +682,7 @@ public:
|
|||
}
|
||||
|
||||
// For a binary operation indexing into an aggregate, chase down the base of the aggregate.
|
||||
// Return 0 if the topology does not fit this situation.
|
||||
// Return nullptr if the topology does not fit this situation.
|
||||
TIntermSymbol* findBase(const TIntermBinary* node)
|
||||
{
|
||||
TIntermSymbol *base = node->getLeft()->getAsSymbolNode();
|
||||
|
@ -1271,4 +1271,4 @@ void TReflection::dump()
|
|||
|
||||
} // end namespace glslang
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
#ifndef _REFLECTION_INCLUDED
|
||||
#define _REFLECTION_INCLUDED
|
||||
|
@ -220,4 +220,4 @@ protected:
|
|||
|
||||
#endif // _REFLECTION_INCLUDED
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
|
|
@ -76,7 +76,7 @@ OS_TLSIndex OS_AllocTLSIndex()
|
|||
//
|
||||
// Create global pool key.
|
||||
//
|
||||
if ((pthread_key_create(&pPoolIndex, NULL)) != 0) {
|
||||
if ((pthread_key_create(&pPoolIndex, nullptr)) != 0) {
|
||||
assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
|
||||
return OS_INVALID_TLS_INDEX;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ HANDLE GlobalLock;
|
|||
|
||||
void InitGlobalLock()
|
||||
{
|
||||
GlobalLock = CreateMutex(0, false, 0);
|
||||
GlobalLock = CreateMutex(nullptr, false, nullptr);
|
||||
}
|
||||
|
||||
void GetGlobalLock()
|
||||
|
@ -128,7 +128,7 @@ void ReleaseGlobalLock()
|
|||
|
||||
unsigned int __stdcall EnterGenericThread (void* entry)
|
||||
{
|
||||
return ((TThreadEntrypoint)entry)(0);
|
||||
return ((TThreadEntrypoint)entry)(nullptr);
|
||||
}
|
||||
|
||||
//#define DUMP_COUNTERS
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace glslang {
|
|||
// Thread Local Storage Operations
|
||||
//
|
||||
typedef void* OS_TLSIndex;
|
||||
#define OS_INVALID_TLS_INDEX ((void*)0)
|
||||
#define OS_INVALID_TLS_INDEX nullptr
|
||||
|
||||
OS_TLSIndex OS_AllocTLSIndex();
|
||||
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);
|
||||
|
|
|
@ -728,7 +728,7 @@ private:
|
|||
TShader& operator=(TShader&);
|
||||
};
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
//
|
||||
// A reflection database and its interface, consistent with the OpenGL API reflection queries.
|
||||
|
@ -846,7 +846,7 @@ public:
|
|||
virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0;
|
||||
};
|
||||
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
// Make one TProgram per set of shaders that will get linked together. Add all
|
||||
// the shaders that are to be linked together. After calling shader.parse()
|
||||
|
@ -867,7 +867,7 @@ public:
|
|||
|
||||
TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
|
||||
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
|
||||
// Reflection Interface
|
||||
|
||||
|
@ -961,7 +961,7 @@ public:
|
|||
// If resolver is not provided it uses the previous approach
|
||||
// and respects auto assignment and offsets.
|
||||
GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr);
|
||||
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
|
||||
#endif // !GLSLANG_WEB
|
||||
|
||||
protected:
|
||||
GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages);
|
||||
|
@ -972,7 +972,7 @@ protected:
|
|||
TIntermediate* intermediate[EShLangCount];
|
||||
bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage
|
||||
TInfoSink* infoSink;
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
#if !defined(GLSLANG_WEB)
|
||||
TReflection* reflection;
|
||||
#endif
|
||||
bool linked;
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
#ifndef GLSLANG_BUILD_INFO
|
||||
#define GLSLANG_BUILD_INFO
|
||||
|
||||
#define GLSLANG_VERSION_MAJOR 11
|
||||
#define GLSLANG_VERSION_MINOR 12
|
||||
#define GLSLANG_VERSION_MAJOR 12
|
||||
#define GLSLANG_VERSION_MINOR 2
|
||||
#define GLSLANG_VERSION_PATCH 0
|
||||
#define GLSLANG_VERSION_FLAVOR ""
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
** Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
**
|
||||
|
@ -31,16 +32,21 @@
|
|||
|
||||
/*
|
||||
** Enumeration tokens for SPIR-V, in various styles:
|
||||
** C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
** C, C++, C++11, JSON, Lua, Python, C#, D, Beef
|
||||
**
|
||||
** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
** - C++11 will use enum classes in the spv namespace, e.g.:
|
||||
*spv::SourceLanguage::GLSL
|
||||
** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
|
||||
** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
|
||||
** - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
** - C# will use enum classes in the Specification class located in the "Spv"
|
||||
*namespace,
|
||||
** e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
** - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
** - Beef will use enum classes in the Specification class located in the "Spv"
|
||||
*namespace,
|
||||
** e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
**
|
||||
** Some tokens act like mask values, which can be OR'd together,
|
||||
** while others are mutually exclusive. The mask-like ones have
|
||||
|
@ -96,6 +102,8 @@ typedef enum SpvExecutionModel_ {
|
|||
SpvExecutionModelMissNV = 5317,
|
||||
SpvExecutionModelCallableKHR = 5318,
|
||||
SpvExecutionModelCallableNV = 5318,
|
||||
SpvExecutionModelTaskEXT = 5364,
|
||||
SpvExecutionModelMeshEXT = 5365,
|
||||
SpvExecutionModelMax = 0x7fffffff,
|
||||
} SpvExecutionModel;
|
||||
|
||||
|
@ -156,6 +164,9 @@ typedef enum SpvExecutionMode_ {
|
|||
SpvExecutionModeSubgroupsPerWorkgroupId = 37,
|
||||
SpvExecutionModeLocalSizeId = 38,
|
||||
SpvExecutionModeLocalSizeHintId = 39,
|
||||
SpvExecutionModeNonCoherentColorAttachmentReadEXT = 4169,
|
||||
SpvExecutionModeNonCoherentDepthAttachmentReadEXT = 4170,
|
||||
SpvExecutionModeNonCoherentStencilAttachmentReadEXT = 4171,
|
||||
SpvExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
||||
SpvExecutionModePostDepthCoverage = 4446,
|
||||
SpvExecutionModeDenormPreserve = 4459,
|
||||
|
@ -163,11 +174,21 @@ typedef enum SpvExecutionMode_ {
|
|||
SpvExecutionModeSignedZeroInfNanPreserve = 4461,
|
||||
SpvExecutionModeRoundingModeRTE = 4462,
|
||||
SpvExecutionModeRoundingModeRTZ = 4463,
|
||||
SpvExecutionModeEarlyAndLateFragmentTestsAMD = 5017,
|
||||
SpvExecutionModeStencilRefReplacingEXT = 5027,
|
||||
SpvExecutionModeStencilRefUnchangedFrontAMD = 5079,
|
||||
SpvExecutionModeStencilRefGreaterFrontAMD = 5080,
|
||||
SpvExecutionModeStencilRefLessFrontAMD = 5081,
|
||||
SpvExecutionModeStencilRefUnchangedBackAMD = 5082,
|
||||
SpvExecutionModeStencilRefGreaterBackAMD = 5083,
|
||||
SpvExecutionModeStencilRefLessBackAMD = 5084,
|
||||
SpvExecutionModeOutputLinesEXT = 5269,
|
||||
SpvExecutionModeOutputLinesNV = 5269,
|
||||
SpvExecutionModeOutputPrimitivesEXT = 5270,
|
||||
SpvExecutionModeOutputPrimitivesNV = 5270,
|
||||
SpvExecutionModeDerivativeGroupQuadsNV = 5289,
|
||||
SpvExecutionModeDerivativeGroupLinearNV = 5290,
|
||||
SpvExecutionModeOutputTrianglesEXT = 5298,
|
||||
SpvExecutionModeOutputTrianglesNV = 5298,
|
||||
SpvExecutionModePixelInterlockOrderedEXT = 5366,
|
||||
SpvExecutionModePixelInterlockUnorderedEXT = 5367,
|
||||
|
@ -185,6 +206,8 @@ typedef enum SpvExecutionMode_ {
|
|||
SpvExecutionModeNoGlobalOffsetINTEL = 5895,
|
||||
SpvExecutionModeNumSIMDWorkitemsINTEL = 5896,
|
||||
SpvExecutionModeSchedulerTargetFmaxMhzINTEL = 5903,
|
||||
SpvExecutionModeStreamingInterfaceINTEL = 6154,
|
||||
SpvExecutionModeRegisterMapInterfaceINTEL = 6160,
|
||||
SpvExecutionModeNamedBarrierCountINTEL = 6417,
|
||||
SpvExecutionModeMax = 0x7fffffff,
|
||||
} SpvExecutionMode;
|
||||
|
@ -203,6 +226,7 @@ typedef enum SpvStorageClass_ {
|
|||
SpvStorageClassAtomicCounter = 10,
|
||||
SpvStorageClassImage = 11,
|
||||
SpvStorageClassStorageBuffer = 12,
|
||||
SpvStorageClassTileImageEXT = 4172,
|
||||
SpvStorageClassCallableDataKHR = 5328,
|
||||
SpvStorageClassCallableDataNV = 5328,
|
||||
SpvStorageClassIncomingCallableDataKHR = 5329,
|
||||
|
@ -217,6 +241,8 @@ typedef enum SpvStorageClass_ {
|
|||
SpvStorageClassShaderRecordBufferNV = 5343,
|
||||
SpvStorageClassPhysicalStorageBuffer = 5349,
|
||||
SpvStorageClassPhysicalStorageBufferEXT = 5349,
|
||||
SpvStorageClassHitObjectAttributeNV = 5385,
|
||||
SpvStorageClassTaskPayloadWorkgroupEXT = 5402,
|
||||
SpvStorageClassCodeSectionINTEL = 5605,
|
||||
SpvStorageClassDeviceOnlyINTEL = 5936,
|
||||
SpvStorageClassHostOnlyINTEL = 5937,
|
||||
|
@ -231,6 +257,7 @@ typedef enum SpvDim_ {
|
|||
SpvDimRect = 4,
|
||||
SpvDimBuffer = 5,
|
||||
SpvDimSubpassData = 6,
|
||||
SpvDimTileImageDataEXT = 4173,
|
||||
SpvDimMax = 0x7fffffff,
|
||||
} SpvDim;
|
||||
|
||||
|
@ -441,6 +468,7 @@ typedef enum SpvFunctionParameterAttribute_ {
|
|||
SpvFunctionParameterAttributeNoCapture = 5,
|
||||
SpvFunctionParameterAttributeNoWrite = 6,
|
||||
SpvFunctionParameterAttributeNoReadWrite = 7,
|
||||
SpvFunctionParameterAttributeRuntimeAlignedINTEL = 5940,
|
||||
SpvFunctionParameterAttributeMax = 0x7fffffff,
|
||||
} SpvFunctionParameterAttribute;
|
||||
|
||||
|
@ -494,11 +522,14 @@ typedef enum SpvDecoration_ {
|
|||
SpvDecorationMaxByteOffsetId = 47,
|
||||
SpvDecorationNoSignedWrap = 4469,
|
||||
SpvDecorationNoUnsignedWrap = 4470,
|
||||
SpvDecorationWeightTextureQCOM = 4487,
|
||||
SpvDecorationBlockMatchTextureQCOM = 4488,
|
||||
SpvDecorationExplicitInterpAMD = 4999,
|
||||
SpvDecorationOverrideCoverageNV = 5248,
|
||||
SpvDecorationPassthroughNV = 5250,
|
||||
SpvDecorationViewportRelativeNV = 5252,
|
||||
SpvDecorationSecondaryViewportRelativeNV = 5256,
|
||||
SpvDecorationPerPrimitiveEXT = 5271,
|
||||
SpvDecorationPerPrimitiveNV = 5271,
|
||||
SpvDecorationPerViewNV = 5272,
|
||||
SpvDecorationPerTaskNV = 5273,
|
||||
|
@ -510,6 +541,7 @@ typedef enum SpvDecoration_ {
|
|||
SpvDecorationRestrictPointerEXT = 5355,
|
||||
SpvDecorationAliasedPointer = 5356,
|
||||
SpvDecorationAliasedPointerEXT = 5356,
|
||||
SpvDecorationHitObjectShaderRecordBufferNV = 5386,
|
||||
SpvDecorationBindlessSamplerNV = 5398,
|
||||
SpvDecorationBindlessImageNV = 5399,
|
||||
SpvDecorationBoundSamplerNV = 5400,
|
||||
|
@ -548,14 +580,29 @@ typedef enum SpvDecoration_ {
|
|||
SpvDecorationPrefetchINTEL = 5902,
|
||||
SpvDecorationStallEnableINTEL = 5905,
|
||||
SpvDecorationFuseLoopsInFunctionINTEL = 5907,
|
||||
SpvDecorationMathOpDSPModeINTEL = 5909,
|
||||
SpvDecorationAliasScopeINTEL = 5914,
|
||||
SpvDecorationNoAliasINTEL = 5915,
|
||||
SpvDecorationInitiationIntervalINTEL = 5917,
|
||||
SpvDecorationMaxConcurrencyINTEL = 5918,
|
||||
SpvDecorationPipelineEnableINTEL = 5919,
|
||||
SpvDecorationBufferLocationINTEL = 5921,
|
||||
SpvDecorationIOPipeStorageINTEL = 5944,
|
||||
SpvDecorationFunctionFloatingPointModeINTEL = 6080,
|
||||
SpvDecorationSingleElementVectorINTEL = 6085,
|
||||
SpvDecorationVectorComputeCallableFunctionINTEL = 6087,
|
||||
SpvDecorationMediaBlockIOINTEL = 6140,
|
||||
SpvDecorationLatencyControlLabelINTEL = 6172,
|
||||
SpvDecorationLatencyControlConstraintINTEL = 6173,
|
||||
SpvDecorationConduitKernelArgumentINTEL = 6175,
|
||||
SpvDecorationRegisterMapKernelArgumentINTEL = 6176,
|
||||
SpvDecorationMMHostInterfaceAddressWidthINTEL = 6177,
|
||||
SpvDecorationMMHostInterfaceDataWidthINTEL = 6178,
|
||||
SpvDecorationMMHostInterfaceLatencyINTEL = 6179,
|
||||
SpvDecorationMMHostInterfaceReadWriteModeINTEL = 6180,
|
||||
SpvDecorationMMHostInterfaceMaxBurstINTEL = 6181,
|
||||
SpvDecorationMMHostInterfaceWaitRequestINTEL = 6182,
|
||||
SpvDecorationStableKernelArgumentINTEL = 6183,
|
||||
SpvDecorationMax = 0x7fffffff,
|
||||
} SpvDecoration;
|
||||
|
||||
|
@ -601,6 +648,11 @@ typedef enum SpvBuiltIn_ {
|
|||
SpvBuiltInSubgroupLocalInvocationId = 41,
|
||||
SpvBuiltInVertexIndex = 42,
|
||||
SpvBuiltInInstanceIndex = 43,
|
||||
SpvBuiltInCoreIDARM = 4160,
|
||||
SpvBuiltInCoreCountARM = 4161,
|
||||
SpvBuiltInCoreMaxIDARM = 4162,
|
||||
SpvBuiltInWarpIDARM = 4163,
|
||||
SpvBuiltInWarpMaxIDARM = 4164,
|
||||
SpvBuiltInSubgroupEqMask = 4416,
|
||||
SpvBuiltInSubgroupEqMaskKHR = 4416,
|
||||
SpvBuiltInSubgroupGeMask = 4417,
|
||||
|
@ -648,6 +700,10 @@ typedef enum SpvBuiltIn_ {
|
|||
SpvBuiltInFragmentSizeNV = 5292,
|
||||
SpvBuiltInFragInvocationCountEXT = 5293,
|
||||
SpvBuiltInInvocationsPerPixelNV = 5293,
|
||||
SpvBuiltInPrimitivePointIndicesEXT = 5294,
|
||||
SpvBuiltInPrimitiveLineIndicesEXT = 5295,
|
||||
SpvBuiltInPrimitiveTriangleIndicesEXT = 5296,
|
||||
SpvBuiltInCullPrimitiveEXT = 5299,
|
||||
SpvBuiltInLaunchIdKHR = 5319,
|
||||
SpvBuiltInLaunchIdNV = 5319,
|
||||
SpvBuiltInLaunchSizeKHR = 5320,
|
||||
|
@ -715,6 +771,8 @@ typedef enum SpvLoopControlShift_ {
|
|||
SpvLoopControlMaxInterleavingINTELShift = 21,
|
||||
SpvLoopControlSpeculatedIterationsINTELShift = 22,
|
||||
SpvLoopControlNoFusionINTELShift = 23,
|
||||
SpvLoopControlLoopCountINTELShift = 24,
|
||||
SpvLoopControlMaxReinvocationDelayINTELShift = 25,
|
||||
SpvLoopControlMax = 0x7fffffff,
|
||||
} SpvLoopControlShift;
|
||||
|
||||
|
@ -737,6 +795,8 @@ typedef enum SpvLoopControlMask_ {
|
|||
SpvLoopControlMaxInterleavingINTELMask = 0x00200000,
|
||||
SpvLoopControlSpeculatedIterationsINTELMask = 0x00400000,
|
||||
SpvLoopControlNoFusionINTELMask = 0x00800000,
|
||||
SpvLoopControlLoopCountINTELMask = 0x01000000,
|
||||
SpvLoopControlMaxReinvocationDelayINTELMask = 0x02000000,
|
||||
} SpvLoopControlMask;
|
||||
|
||||
typedef enum SpvFunctionControlShift_ {
|
||||
|
@ -940,6 +1000,10 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityShaderLayer = 69,
|
||||
SpvCapabilityShaderViewportIndex = 70,
|
||||
SpvCapabilityUniformDecoration = 71,
|
||||
SpvCapabilityCoreBuiltinsARM = 4165,
|
||||
SpvCapabilityTileImageColorReadAccessEXT = 4166,
|
||||
SpvCapabilityTileImageDepthReadAccessEXT = 4167,
|
||||
SpvCapabilityTileImageStencilReadAccessEXT = 4168,
|
||||
SpvCapabilityFragmentShadingRateKHR = 4422,
|
||||
SpvCapabilitySubgroupBallotKHR = 4423,
|
||||
SpvCapabilityDrawParameters = 4427,
|
||||
|
@ -971,6 +1035,9 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityRayQueryKHR = 4472,
|
||||
SpvCapabilityRayTraversalPrimitiveCullingKHR = 4478,
|
||||
SpvCapabilityRayTracingKHR = 4479,
|
||||
SpvCapabilityTextureSampleWeightedQCOM = 4484,
|
||||
SpvCapabilityTextureBoxFilterQCOM = 4485,
|
||||
SpvCapabilityTextureBlockMatchQCOM = 4486,
|
||||
SpvCapabilityFloat16ImageAMD = 5008,
|
||||
SpvCapabilityImageGatherBiasLodAMD = 5009,
|
||||
SpvCapabilityFragmentMaskAMD = 5010,
|
||||
|
@ -988,6 +1055,7 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityFragmentFullyCoveredEXT = 5265,
|
||||
SpvCapabilityMeshShadingNV = 5266,
|
||||
SpvCapabilityImageFootprintNV = 5282,
|
||||
SpvCapabilityMeshShadingEXT = 5283,
|
||||
SpvCapabilityFragmentBarycentricKHR = 5284,
|
||||
SpvCapabilityFragmentBarycentricNV = 5284,
|
||||
SpvCapabilityComputeDerivativeGroupQuadsNV = 5288,
|
||||
|
@ -1035,6 +1103,8 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityFragmentShaderPixelInterlockEXT = 5378,
|
||||
SpvCapabilityDemoteToHelperInvocation = 5379,
|
||||
SpvCapabilityDemoteToHelperInvocationEXT = 5379,
|
||||
SpvCapabilityRayTracingOpacityMicromapEXT = 5381,
|
||||
SpvCapabilityShaderInvocationReorderNV = 5383,
|
||||
SpvCapabilityBindlessTextureNV = 5390,
|
||||
SpvCapabilitySubgroupShuffleINTEL = 5568,
|
||||
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
|
@ -1068,10 +1138,13 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityFPGAMemoryAccessesINTEL = 5898,
|
||||
SpvCapabilityFPGAClusterAttributesINTEL = 5904,
|
||||
SpvCapabilityLoopFuseINTEL = 5906,
|
||||
SpvCapabilityFPGADSPControlINTEL = 5908,
|
||||
SpvCapabilityMemoryAccessAliasingINTEL = 5910,
|
||||
SpvCapabilityFPGAInvocationPipeliningAttributesINTEL = 5916,
|
||||
SpvCapabilityFPGABufferLocationINTEL = 5920,
|
||||
SpvCapabilityArbitraryPrecisionFixedPointINTEL = 5922,
|
||||
SpvCapabilityUSMStorageClassesINTEL = 5935,
|
||||
SpvCapabilityRuntimeAlignedAttributeINTEL = 5939,
|
||||
SpvCapabilityIOPipesINTEL = 5943,
|
||||
SpvCapabilityBlockingPipesINTEL = 5945,
|
||||
SpvCapabilityFPGARegINTEL = 5948,
|
||||
|
@ -1092,7 +1165,11 @@ typedef enum SpvCapability_ {
|
|||
SpvCapabilityOptNoneINTEL = 6094,
|
||||
SpvCapabilityAtomicFloat16AddEXT = 6095,
|
||||
SpvCapabilityDebugInfoModuleINTEL = 6114,
|
||||
SpvCapabilityBFloat16ConversionINTEL = 6115,
|
||||
SpvCapabilitySplitBarrierINTEL = 6141,
|
||||
SpvCapabilityFPGAKernelAttributesv2INTEL = 6161,
|
||||
SpvCapabilityFPGALatencyControlINTEL = 6171,
|
||||
SpvCapabilityFPGAArgumentInterfacesINTEL = 6174,
|
||||
SpvCapabilityGroupUniformArithmeticKHR = 6400,
|
||||
SpvCapabilityMax = 0x7fffffff,
|
||||
} SpvCapability;
|
||||
|
@ -1108,6 +1185,7 @@ typedef enum SpvRayFlagsShift_ {
|
|||
SpvRayFlagsCullNoOpaqueKHRShift = 7,
|
||||
SpvRayFlagsSkipTrianglesKHRShift = 8,
|
||||
SpvRayFlagsSkipAABBsKHRShift = 9,
|
||||
SpvRayFlagsForceOpacityMicromap2StateEXTShift = 10,
|
||||
SpvRayFlagsMax = 0x7fffffff,
|
||||
} SpvRayFlagsShift;
|
||||
|
||||
|
@ -1123,6 +1201,7 @@ typedef enum SpvRayFlagsMask_ {
|
|||
SpvRayFlagsCullNoOpaqueKHRMask = 0x00000080,
|
||||
SpvRayFlagsSkipTrianglesKHRMask = 0x00000100,
|
||||
SpvRayFlagsSkipAABBsKHRMask = 0x00000200,
|
||||
SpvRayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400,
|
||||
} SpvRayFlagsMask;
|
||||
|
||||
typedef enum SpvRayQueryIntersection_ {
|
||||
|
@ -1543,6 +1622,9 @@ typedef enum SpvOp_ {
|
|||
SpvOpPtrEqual = 401,
|
||||
SpvOpPtrNotEqual = 402,
|
||||
SpvOpPtrDiff = 403,
|
||||
SpvOpColorAttachmentReadEXT = 4160,
|
||||
SpvOpDepthAttachmentReadEXT = 4161,
|
||||
SpvOpStencilAttachmentReadEXT = 4162,
|
||||
SpvOpTerminateInvocation = 4416,
|
||||
SpvOpSubgroupBallotKHR = 4421,
|
||||
SpvOpSubgroupFirstInvocationKHR = 4422,
|
||||
|
@ -1575,6 +1657,10 @@ typedef enum SpvOp_ {
|
|||
SpvOpRayQueryConfirmIntersectionKHR = 4476,
|
||||
SpvOpRayQueryProceedKHR = 4477,
|
||||
SpvOpRayQueryGetIntersectionTypeKHR = 4479,
|
||||
SpvOpImageSampleWeightedQCOM = 4480,
|
||||
SpvOpImageBoxFilterQCOM = 4481,
|
||||
SpvOpImageBlockMatchSSDQCOM = 4482,
|
||||
SpvOpImageBlockMatchSADQCOM = 4483,
|
||||
SpvOpGroupIAddNonUniformAMD = 5000,
|
||||
SpvOpGroupFAddNonUniformAMD = 5001,
|
||||
SpvOpGroupFMinNonUniformAMD = 5002,
|
||||
|
@ -1586,7 +1672,42 @@ typedef enum SpvOp_ {
|
|||
SpvOpFragmentMaskFetchAMD = 5011,
|
||||
SpvOpFragmentFetchAMD = 5012,
|
||||
SpvOpReadClockKHR = 5056,
|
||||
SpvOpHitObjectRecordHitMotionNV = 5249,
|
||||
SpvOpHitObjectRecordHitWithIndexMotionNV = 5250,
|
||||
SpvOpHitObjectRecordMissMotionNV = 5251,
|
||||
SpvOpHitObjectGetWorldToObjectNV = 5252,
|
||||
SpvOpHitObjectGetObjectToWorldNV = 5253,
|
||||
SpvOpHitObjectGetObjectRayDirectionNV = 5254,
|
||||
SpvOpHitObjectGetObjectRayOriginNV = 5255,
|
||||
SpvOpHitObjectTraceRayMotionNV = 5256,
|
||||
SpvOpHitObjectGetShaderRecordBufferHandleNV = 5257,
|
||||
SpvOpHitObjectGetShaderBindingTableRecordIndexNV = 5258,
|
||||
SpvOpHitObjectRecordEmptyNV = 5259,
|
||||
SpvOpHitObjectTraceRayNV = 5260,
|
||||
SpvOpHitObjectRecordHitNV = 5261,
|
||||
SpvOpHitObjectRecordHitWithIndexNV = 5262,
|
||||
SpvOpHitObjectRecordMissNV = 5263,
|
||||
SpvOpHitObjectExecuteShaderNV = 5264,
|
||||
SpvOpHitObjectGetCurrentTimeNV = 5265,
|
||||
SpvOpHitObjectGetAttributesNV = 5266,
|
||||
SpvOpHitObjectGetHitKindNV = 5267,
|
||||
SpvOpHitObjectGetPrimitiveIndexNV = 5268,
|
||||
SpvOpHitObjectGetGeometryIndexNV = 5269,
|
||||
SpvOpHitObjectGetInstanceIdNV = 5270,
|
||||
SpvOpHitObjectGetInstanceCustomIndexNV = 5271,
|
||||
SpvOpHitObjectGetWorldRayDirectionNV = 5272,
|
||||
SpvOpHitObjectGetWorldRayOriginNV = 5273,
|
||||
SpvOpHitObjectGetRayTMaxNV = 5274,
|
||||
SpvOpHitObjectGetRayTMinNV = 5275,
|
||||
SpvOpHitObjectIsEmptyNV = 5276,
|
||||
SpvOpHitObjectIsHitNV = 5277,
|
||||
SpvOpHitObjectIsMissNV = 5278,
|
||||
SpvOpReorderThreadWithHitObjectNV = 5279,
|
||||
SpvOpReorderThreadWithHintNV = 5280,
|
||||
SpvOpTypeHitObjectNV = 5281,
|
||||
SpvOpImageSampleFootprintNV = 5283,
|
||||
SpvOpEmitMeshTasksEXT = 5294,
|
||||
SpvOpSetMeshOutputsEXT = 5295,
|
||||
SpvOpGroupNonUniformPartitionNV = 5296,
|
||||
SpvOpWritePackedPrimitiveIndices4x8NV = 5299,
|
||||
SpvOpReportIntersectionKHR = 5334,
|
||||
|
@ -1724,12 +1845,17 @@ typedef enum SpvOp_ {
|
|||
SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767,
|
||||
SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768,
|
||||
SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772,
|
||||
SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL =
|
||||
5770,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL =
|
||||
5771,
|
||||
SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL =
|
||||
5772,
|
||||
SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL =
|
||||
5773,
|
||||
SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774,
|
||||
SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775,
|
||||
SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL =
|
||||
5775,
|
||||
SpvOpSubgroupAvcImeGetBorderReachedINTEL = 5776,
|
||||
SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777,
|
||||
SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778,
|
||||
|
@ -1857,6 +1983,8 @@ typedef enum SpvOp_ {
|
|||
SpvOpTypeStructContinuedINTEL = 6090,
|
||||
SpvOpConstantCompositeContinuedINTEL = 6091,
|
||||
SpvOpSpecConstantCompositeContinuedINTEL = 6092,
|
||||
SpvOpConvertFToBF16INTEL = 6116,
|
||||
SpvOpConvertBF16ToFINTEL = 6117,
|
||||
SpvOpControlBarrierArriveINTEL = 6142,
|
||||
SpvOpControlBarrierWaitINTEL = 6143,
|
||||
SpvOpGroupIMulKHR = 6401,
|
||||
|
@ -2222,6 +2350,18 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|||
case SpvOpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpColorAttachmentReadEXT:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpDepthAttachmentReadEXT:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpStencilAttachmentReadEXT:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||
|
@ -2248,6 +2388,22 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|||
case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpImageSampleWeightedQCOM:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpImageBoxFilterQCOM:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpImageBlockMatchSSDQCOM:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpImageBlockMatchSADQCOM:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
|
||||
|
@ -2259,7 +2415,147 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|||
case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpReadClockKHR: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpHitObjectRecordHitMotionNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectRecordHitWithIndexMotionNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectRecordMissMotionNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectGetWorldToObjectNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetObjectToWorldNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetObjectRayDirectionNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetObjectRayOriginNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectTraceRayMotionNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectGetShaderRecordBufferHandleNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetShaderBindingTableRecordIndexNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectRecordEmptyNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectTraceRayNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectRecordHitNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectRecordHitWithIndexNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectRecordMissNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectExecuteShaderNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectGetCurrentTimeNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetAttributesNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpHitObjectGetHitKindNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetPrimitiveIndexNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetGeometryIndexNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetInstanceIdNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetInstanceCustomIndexNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetWorldRayDirectionNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetWorldRayOriginNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetRayTMaxNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectGetRayTMinNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectIsEmptyNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectIsHitNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpHitObjectIsMissNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpReorderThreadWithHitObjectNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpReorderThreadWithHintNV:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpTypeHitObjectNV:
|
||||
*hasResult = true;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpEmitMeshTasksEXT:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpSetMeshOutputsEXT:
|
||||
*hasResult = false;
|
||||
*hasResultType = false;
|
||||
break;
|
||||
case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
|
||||
case SpvOpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
|
||||
|
@ -2525,6 +2821,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|||
case SpvOpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpConvertFToBF16INTEL:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpConvertBF16ToFINTEL:
|
||||
*hasResult = true;
|
||||
*hasResultType = true;
|
||||
break;
|
||||
case SpvOpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break;
|
||||
case SpvOpGroupIMulKHR: *hasResult = true; *hasResultType = true; break;
|
||||
|
@ -2540,3 +2844,4 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|||
#endif /* SPV_ENABLE_UTILITY_CODE */
|
||||
|
||||
#endif
|
||||
/* clang-format on */
|
||||
|
|
|
@ -26,10 +26,10 @@ index 8c70ebecfb..c5ed7ab07d 100644
|
|||
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
|
||||
}
|
||||
break;
|
||||
-
|
||||
+// -- GODOT begin --
|
||||
|
||||
case SpvOpSpecConstantTrue:
|
||||
case SpvOpSpecConstantFalse:
|
||||
+// -- GODOT begin --
|
||||
- case SpvOpSpecConstant:
|
||||
+ case SpvOpSpecConstant: {
|
||||
+ CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c
|
||||
index c5ed7ab07d..f2be1f8cae 100644
|
||||
--- a/thirdparty/spirv-reflect/spirv_reflect.c
|
||||
+++ b/thirdparty/spirv-reflect/spirv_reflect.c
|
||||
@@ -3368,12 +3368,18 @@ static SpvReflectResult ParseExecutionModes(
|
||||
}
|
||||
for (size_t entry_point_idx = 0; entry_point_idx < p_module->entry_point_count; ++entry_point_idx) {
|
||||
SpvReflectEntryPoint* p_entry_point = &p_module->entry_points[entry_point_idx];
|
||||
- p_entry_point->execution_modes =
|
||||
- (SpvExecutionMode*)calloc(p_entry_point->execution_mode_count, sizeof(*p_entry_point->execution_modes));
|
||||
- if (IsNull(p_entry_point->execution_modes)) {
|
||||
- SafeFree(indices);
|
||||
- return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
+// -- GODOT begin --
|
||||
+ if (p_entry_point->execution_mode_count > 0) {
|
||||
+// -- GODOT end --
|
||||
+ p_entry_point->execution_modes =
|
||||
+ (SpvExecutionMode*)calloc(p_entry_point->execution_mode_count, sizeof(*p_entry_point->execution_modes));
|
||||
+ if (IsNull(p_entry_point->execution_modes)) {
|
||||
+ SafeFree(indices);
|
||||
+ return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
+ }
|
||||
+// -- GODOT begin --
|
||||
}
|
||||
+// -- GODOT end --
|
||||
}
|
||||
|
||||
for (size_t node_idx = 0; node_idx < p_parser->node_count; ++node_idx) {
|
|
@ -27,6 +27,12 @@
|
|||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#define FALLTHROUGH __attribute__((fallthrough))
|
||||
#else
|
||||
#define FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#if defined(SPIRV_REFLECT_ENABLE_ASSERTS)
|
||||
#define SPV_REFLECT_ASSERT(COND) \
|
||||
assert(COND);
|
||||
|
@ -695,7 +701,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
const char* p_source = (const char*)(p_parser->spirv_code + p_node->word_offset + 4);
|
||||
|
||||
const size_t source_len = strlen(p_source);
|
||||
char* p_source_temp = (char*)calloc(source_len + 1, sizeof(char*));
|
||||
char* p_source_temp = (char*)calloc(source_len + 1, sizeof(char));
|
||||
|
||||
if (IsNull(p_source_temp)) {
|
||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
|
@ -707,6 +713,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
strcpy(p_source_temp, p_source);
|
||||
#endif
|
||||
|
||||
SafeFree(p_parser->source_embedded);
|
||||
p_parser->source_embedded = p_source_temp;
|
||||
}
|
||||
}
|
||||
|
@ -717,7 +724,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
|
||||
const size_t source_len = strlen(p_source);
|
||||
const size_t embedded_source_len = strlen(p_parser->source_embedded);
|
||||
char* p_continued_source = (char*)calloc(source_len + embedded_source_len + 1, sizeof(char*));
|
||||
char* p_continued_source = (char*)calloc(source_len + embedded_source_len + 1, sizeof(char));
|
||||
|
||||
if (IsNull(p_continued_source)) {
|
||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
|
@ -725,7 +732,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
|
||||
#ifdef _WIN32
|
||||
strcpy_s(p_continued_source, embedded_source_len + 1, p_parser->source_embedded);
|
||||
strcat_s(p_continued_source, source_len + 1, p_source);
|
||||
strcat_s(p_continued_source, embedded_source_len + source_len + 1, p_source);
|
||||
#else
|
||||
strcpy(p_continued_source, p_parser->source_embedded);
|
||||
strcat(p_continued_source, p_source);
|
||||
|
@ -759,6 +766,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
case SpvOpTypeStruct:
|
||||
{
|
||||
p_node->member_count = p_node->word_count - 2;
|
||||
FALLTHROUGH;
|
||||
} // Fall through
|
||||
case SpvOpTypeVoid:
|
||||
case SpvOpTypeBool:
|
||||
|
@ -843,9 +851,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
|
||||
}
|
||||
break;
|
||||
// -- GODOT begin --
|
||||
case SpvOpSpecConstantTrue:
|
||||
case SpvOpSpecConstantFalse:
|
||||
// -- GODOT begin --
|
||||
case SpvOpSpecConstant: {
|
||||
CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id);
|
||||
CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id);
|
||||
|
@ -884,7 +892,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
CHECKED_READU32(p_parser, p_node->word_offset + 3, p_access_chain->base_id);
|
||||
//
|
||||
// SPIRV_ACCESS_CHAIN_INDEX_OFFSET (4) is the number of words up until the first index:
|
||||
// [SpvReflectPrvNode, Result Type Id, Result Id, Base Id, <Indexes>]
|
||||
// [Node, Result Type Id, Result Id, Base Id, <Indexes>]
|
||||
//
|
||||
p_access_chain->index_count = (node_word_count - SPIRV_ACCESS_CHAIN_INDEX_OFFSET);
|
||||
if (p_access_chain->index_count > 0) {
|
||||
|
@ -931,6 +939,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser)
|
|||
CHECKED_READU32(p_parser, p_func_node->word_offset + 2, p_func_node->result_id);
|
||||
++(p_parser->function_count);
|
||||
}
|
||||
FALLTHROUGH;
|
||||
} // Fall through
|
||||
|
||||
case SpvOpFunctionEnd:
|
||||
|
@ -1016,7 +1025,7 @@ static SpvReflectResult ParseSource(SpvReflectPrvParser* p_parser, SpvReflectSha
|
|||
if (IsNotNull(p_parser->source_embedded))
|
||||
{
|
||||
const size_t source_len = strlen(p_parser->source_embedded);
|
||||
char* p_source = (char*)calloc(source_len + 1, sizeof(char*));
|
||||
char* p_source = (char*)calloc(source_len + 1, sizeof(char));
|
||||
|
||||
if (IsNull(p_source)) {
|
||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
|
@ -2301,6 +2310,7 @@ static SpvReflectResult ParseDescriptorBlockVariable(
|
|||
ApplyArrayTraits(p_member_type, &p_member_var->array);
|
||||
}
|
||||
|
||||
p_member_var->word_offset.offset = p_type_node->member_decorations[member_index].offset.word_offset;
|
||||
p_member_var->type_description = p_member_type;
|
||||
}
|
||||
}
|
||||
|
@ -2449,7 +2459,7 @@ static SpvReflectResult ParseDescriptorBlockVariableSizes(
|
|||
|
||||
static void MarkSelfAndAllMemberVarsAsUsed(SpvReflectBlockVariable* p_var)
|
||||
{
|
||||
// Clear the current variable's USED flag
|
||||
// Clear the current variable's UNUSED flag
|
||||
p_var->flags &= ~SPV_REFLECT_VARIABLE_FLAGS_UNUSED;
|
||||
|
||||
SpvOp op_type = p_var->type_description->op;
|
||||
|
@ -2516,7 +2526,7 @@ static SpvReflectResult ParseDescriptorBlockVariableUsage(
|
|||
}
|
||||
|
||||
// Only continue parsing if there's remaining indices in the access
|
||||
// chain. If the end of the access chain has been reach then all
|
||||
// chain. If the end of the access chain has been reached then all
|
||||
// remaining variables (including those in struct hierarchies)
|
||||
// are considered USED.
|
||||
//
|
||||
|
@ -3184,7 +3194,9 @@ static SpvReflectResult ParseEntryPoints(
|
|||
case SpvExecutionModelFragment : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_FRAGMENT_BIT; break;
|
||||
case SpvExecutionModelGLCompute : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_COMPUTE_BIT; break;
|
||||
case SpvExecutionModelTaskNV : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV; break;
|
||||
case SpvExecutionModelTaskEXT : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_TASK_BIT_EXT; break;
|
||||
case SpvExecutionModelMeshNV : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV; break;
|
||||
case SpvExecutionModelMeshEXT : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_MESH_BIT_EXT; break;
|
||||
case SpvExecutionModelRayGenerationKHR : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_RAYGEN_BIT_KHR; break;
|
||||
case SpvExecutionModelIntersectionKHR : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_INTERSECTION_BIT_KHR; break;
|
||||
case SpvExecutionModelAnyHitKHR : p_entry_point->shader_stage = SPV_REFLECT_SHADER_STAGE_ANY_HIT_BIT_KHR; break;
|
||||
|
@ -3368,18 +3380,14 @@ static SpvReflectResult ParseExecutionModes(
|
|||
}
|
||||
for (size_t entry_point_idx = 0; entry_point_idx < p_module->entry_point_count; ++entry_point_idx) {
|
||||
SpvReflectEntryPoint* p_entry_point = &p_module->entry_points[entry_point_idx];
|
||||
// -- GODOT begin --
|
||||
if (p_entry_point->execution_mode_count > 0) {
|
||||
// -- GODOT end --
|
||||
p_entry_point->execution_modes =
|
||||
(SpvExecutionMode*)calloc(p_entry_point->execution_mode_count, sizeof(*p_entry_point->execution_modes));
|
||||
if (IsNull(p_entry_point->execution_modes)) {
|
||||
SafeFree(indices);
|
||||
return SPV_REFLECT_RESULT_ERROR_ALLOC_FAILED;
|
||||
}
|
||||
// -- GODOT begin --
|
||||
}
|
||||
// -- GODOT end --
|
||||
}
|
||||
|
||||
for (size_t node_idx = 0; node_idx < p_parser->node_count; ++node_idx) {
|
||||
|
@ -3534,6 +3542,25 @@ static SpvReflectResult ParsePushConstantBlocks(
|
|||
if (result != SPV_REFLECT_RESULT_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
for (uint32_t access_chain_index = 0;
|
||||
access_chain_index < p_parser->access_chain_count;
|
||||
++access_chain_index) {
|
||||
SpvReflectPrvAccessChain* p_access_chain =
|
||||
&(p_parser->access_chains[access_chain_index]);
|
||||
// Skip any access chains that aren't touching this push constant block
|
||||
if (p_push_constant->spirv_id != p_access_chain->base_id) {
|
||||
continue;
|
||||
}
|
||||
result = ParseDescriptorBlockVariableUsage(
|
||||
p_parser, p_module, p_access_chain, 0, (SpvOp)INVALID_VALUE,
|
||||
p_push_constant);
|
||||
if (result != SPV_REFLECT_RESULT_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
p_push_constant->name = p_node->name;
|
||||
result = ParseDescriptorBlockVariableSizes(p_parser, p_module, true, false, false, p_push_constant);
|
||||
if (result != SPV_REFLECT_RESULT_SUCCESS) {
|
||||
return result;
|
||||
|
@ -3784,7 +3811,11 @@ static SpvReflectResult CreateShaderModule(
|
|||
memcpy(p_module->_internal->spirv_code, p_code, size);
|
||||
}
|
||||
|
||||
SpvReflectPrvParser parser = { 0 };
|
||||
// Initialize everything to zero
|
||||
SpvReflectPrvParser parser;
|
||||
memset(&parser, 0, sizeof(SpvReflectPrvParser));
|
||||
|
||||
// Create parser
|
||||
SpvReflectResult result = CreateParser(p_module->_internal->spirv_size,
|
||||
p_module->_internal->spirv_code,
|
||||
&parser);
|
||||
|
|
|
@ -230,7 +230,9 @@ typedef enum SpvReflectShaderStageFlagBits {
|
|||
SPV_REFLECT_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, // = VK_SHADER_STAGE_FRAGMENT_BIT
|
||||
SPV_REFLECT_SHADER_STAGE_COMPUTE_BIT = 0x00000020, // = VK_SHADER_STAGE_COMPUTE_BIT
|
||||
SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV = 0x00000040, // = VK_SHADER_STAGE_TASK_BIT_NV
|
||||
SPV_REFLECT_SHADER_STAGE_TASK_BIT_EXT = SPV_REFLECT_SHADER_STAGE_TASK_BIT_NV, // = VK_SHADER_STAGE_CALLABLE_BIT_EXT
|
||||
SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV = 0x00000080, // = VK_SHADER_STAGE_MESH_BIT_NV
|
||||
SPV_REFLECT_SHADER_STAGE_MESH_BIT_EXT = SPV_REFLECT_SHADER_STAGE_MESH_BIT_NV, // = VK_SHADER_STAGE_CALLABLE_BIT_EXT
|
||||
SPV_REFLECT_SHADER_STAGE_RAYGEN_BIT_KHR = 0x00000100, // = VK_SHADER_STAGE_RAYGEN_BIT_KHR
|
||||
SPV_REFLECT_SHADER_STAGE_ANY_HIT_BIT_KHR = 0x00000200, // = VK_SHADER_STAGE_ANY_HIT_BIT_KHR
|
||||
SPV_REFLECT_SHADER_STAGE_CLOSEST_HIT_BIT_KHR = 0x00000400, // = VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR
|
||||
|
@ -401,6 +403,11 @@ typedef struct SpvReflectBlockVariable {
|
|||
struct SpvReflectBlockVariable* members;
|
||||
|
||||
SpvReflectTypeDescription* type_description;
|
||||
|
||||
struct {
|
||||
uint32_t offset;
|
||||
} word_offset;
|
||||
|
||||
} SpvReflectBlockVariable;
|
||||
|
||||
/*! @struct SpvReflectDescriptorBinding
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2018-2022 Arseny Kapoulkine
|
||||
Copyright (c) 2018-2023 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -564,6 +564,9 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)load(context, "vkGetAndroidHardwareBufferPropertiesANDROID");
|
||||
vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)load(context, "vkGetMemoryAndroidHardwareBufferANDROID");
|
||||
#endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */
|
||||
#if defined(VK_EXT_attachment_feedback_loop_dynamic_state)
|
||||
vkCmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)load(context, "vkCmdSetAttachmentFeedbackLoopEnableEXT");
|
||||
#endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */
|
||||
#if defined(VK_EXT_buffer_device_address)
|
||||
vkGetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)load(context, "vkGetBufferDeviceAddressEXT");
|
||||
#endif /* defined(VK_EXT_buffer_device_address) */
|
||||
|
@ -584,72 +587,37 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)load(context, "vkDebugMarkerSetObjectNameEXT");
|
||||
vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)load(context, "vkDebugMarkerSetObjectTagEXT");
|
||||
#endif /* defined(VK_EXT_debug_marker) */
|
||||
#if defined(VK_EXT_descriptor_buffer)
|
||||
vkCmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT");
|
||||
vkCmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT)load(context, "vkCmdBindDescriptorBuffersEXT");
|
||||
vkCmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT)load(context, "vkCmdSetDescriptorBufferOffsetsEXT");
|
||||
vkGetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)load(context, "vkGetBufferOpaqueCaptureDescriptorDataEXT");
|
||||
vkGetDescriptorEXT = (PFN_vkGetDescriptorEXT)load(context, "vkGetDescriptorEXT");
|
||||
vkGetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)load(context, "vkGetDescriptorSetLayoutBindingOffsetEXT");
|
||||
vkGetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT)load(context, "vkGetDescriptorSetLayoutSizeEXT");
|
||||
vkGetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageOpaqueCaptureDescriptorDataEXT");
|
||||
vkGetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageViewOpaqueCaptureDescriptorDataEXT");
|
||||
vkGetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)load(context, "vkGetSamplerOpaqueCaptureDescriptorDataEXT");
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) */
|
||||
#if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing))
|
||||
vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)load(context, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT");
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */
|
||||
#if defined(VK_EXT_device_fault)
|
||||
vkGetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)load(context, "vkGetDeviceFaultInfoEXT");
|
||||
#endif /* defined(VK_EXT_device_fault) */
|
||||
#if defined(VK_EXT_discard_rectangles)
|
||||
vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)load(context, "vkCmdSetDiscardRectangleEXT");
|
||||
#endif /* defined(VK_EXT_discard_rectangles) */
|
||||
#if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2
|
||||
vkCmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT)load(context, "vkCmdSetDiscardRectangleEnableEXT");
|
||||
vkCmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT)load(context, "vkCmdSetDiscardRectangleModeEXT");
|
||||
#endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_EXT_display_control)
|
||||
vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)load(context, "vkDisplayPowerControlEXT");
|
||||
vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)load(context, "vkGetSwapchainCounterEXT");
|
||||
vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)load(context, "vkRegisterDeviceEventEXT");
|
||||
vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)load(context, "vkRegisterDisplayEventEXT");
|
||||
#endif /* defined(VK_EXT_display_control) */
|
||||
#if defined(VK_EXT_extended_dynamic_state)
|
||||
vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT");
|
||||
vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT");
|
||||
vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT");
|
||||
vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT");
|
||||
vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT");
|
||||
vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT");
|
||||
vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT");
|
||||
vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT");
|
||||
vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT");
|
||||
vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT");
|
||||
vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT");
|
||||
vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state) */
|
||||
#if defined(VK_EXT_extended_dynamic_state2)
|
||||
vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT");
|
||||
vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT");
|
||||
vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT");
|
||||
vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT");
|
||||
vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state2) */
|
||||
#if defined(VK_EXT_extended_dynamic_state3)
|
||||
vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT");
|
||||
vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT");
|
||||
vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT");
|
||||
vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT");
|
||||
vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT");
|
||||
vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT");
|
||||
vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT");
|
||||
vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV");
|
||||
vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV");
|
||||
vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV");
|
||||
vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV");
|
||||
vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV");
|
||||
vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV");
|
||||
vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT");
|
||||
vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT");
|
||||
vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT");
|
||||
vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
|
||||
vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT");
|
||||
vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT");
|
||||
vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT");
|
||||
vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT");
|
||||
vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT");
|
||||
vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT");
|
||||
vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT");
|
||||
vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV");
|
||||
vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT");
|
||||
vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT");
|
||||
vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV");
|
||||
vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT");
|
||||
vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV");
|
||||
vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state3) */
|
||||
#if defined(VK_EXT_external_memory_host)
|
||||
vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)load(context, "vkGetMemoryHostPointerPropertiesEXT");
|
||||
#endif /* defined(VK_EXT_external_memory_host) */
|
||||
|
@ -719,6 +687,15 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT)load(context, "vkGetShaderModuleCreateInfoIdentifierEXT");
|
||||
vkGetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT)load(context, "vkGetShaderModuleIdentifierEXT");
|
||||
#endif /* defined(VK_EXT_shader_module_identifier) */
|
||||
#if defined(VK_EXT_shader_object)
|
||||
vkCmdBindShadersEXT = (PFN_vkCmdBindShadersEXT)load(context, "vkCmdBindShadersEXT");
|
||||
vkCreateShadersEXT = (PFN_vkCreateShadersEXT)load(context, "vkCreateShadersEXT");
|
||||
vkDestroyShaderEXT = (PFN_vkDestroyShaderEXT)load(context, "vkDestroyShaderEXT");
|
||||
vkGetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT)load(context, "vkGetShaderBinaryDataEXT");
|
||||
#endif /* defined(VK_EXT_shader_object) */
|
||||
#if defined(VK_EXT_swapchain_maintenance1)
|
||||
vkReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT)load(context, "vkReleaseSwapchainImagesEXT");
|
||||
#endif /* defined(VK_EXT_swapchain_maintenance1) */
|
||||
#if defined(VK_EXT_transform_feedback)
|
||||
vkCmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)load(context, "vkCmdBeginQueryIndexedEXT");
|
||||
vkCmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)load(context, "vkCmdBeginTransformFeedbackEXT");
|
||||
|
@ -733,9 +710,6 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)load(context, "vkGetValidationCacheDataEXT");
|
||||
vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)load(context, "vkMergeValidationCachesEXT");
|
||||
#endif /* defined(VK_EXT_validation_cache) */
|
||||
#if defined(VK_EXT_vertex_input_dynamic_state)
|
||||
vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT");
|
||||
#endif /* defined(VK_EXT_vertex_input_dynamic_state) */
|
||||
#if defined(VK_FUCHSIA_buffer_collection)
|
||||
vkCreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)load(context, "vkCreateBufferCollectionFUCHSIA");
|
||||
vkDestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)load(context, "vkDestroyBufferCollectionFUCHSIA");
|
||||
|
@ -755,6 +729,10 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE");
|
||||
vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE");
|
||||
#endif /* defined(VK_GOOGLE_display_timing) */
|
||||
#if defined(VK_HUAWEI_cluster_culling_shader)
|
||||
vkCmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI)load(context, "vkCmdDrawClusterHUAWEI");
|
||||
vkCmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI)load(context, "vkCmdDrawClusterIndirectHUAWEI");
|
||||
#endif /* defined(VK_HUAWEI_cluster_culling_shader) */
|
||||
#if defined(VK_HUAWEI_invocation_mask)
|
||||
vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI");
|
||||
#endif /* defined(VK_HUAWEI_invocation_mask) */
|
||||
|
@ -885,6 +863,10 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)load(context, "vkGetDeviceImageMemoryRequirementsKHR");
|
||||
vkGetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)load(context, "vkGetDeviceImageSparseMemoryRequirementsKHR");
|
||||
#endif /* defined(VK_KHR_maintenance4) */
|
||||
#if defined(VK_KHR_map_memory2)
|
||||
vkMapMemory2KHR = (PFN_vkMapMemory2KHR)load(context, "vkMapMemory2KHR");
|
||||
vkUnmapMemory2KHR = (PFN_vkUnmapMemory2KHR)load(context, "vkUnmapMemory2KHR");
|
||||
#endif /* defined(VK_KHR_map_memory2) */
|
||||
#if defined(VK_KHR_performance_query)
|
||||
vkAcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)load(context, "vkAcquireProfilingLockKHR");
|
||||
vkReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)load(context, "vkReleaseProfilingLockKHR");
|
||||
|
@ -977,6 +959,10 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
#if defined(VK_NV_clip_space_w_scaling)
|
||||
vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)load(context, "vkCmdSetViewportWScalingNV");
|
||||
#endif /* defined(VK_NV_clip_space_w_scaling) */
|
||||
#if defined(VK_NV_copy_memory_indirect)
|
||||
vkCmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV)load(context, "vkCmdCopyMemoryIndirectNV");
|
||||
vkCmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV)load(context, "vkCmdCopyMemoryToImageIndirectNV");
|
||||
#endif /* defined(VK_NV_copy_memory_indirect) */
|
||||
#if defined(VK_NV_device_diagnostic_checkpoints)
|
||||
vkCmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)load(context, "vkCmdSetCheckpointNV");
|
||||
vkGetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)load(context, "vkGetQueueCheckpointDataNV");
|
||||
|
@ -998,6 +984,10 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
#if defined(VK_NV_fragment_shading_rate_enums)
|
||||
vkCmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)load(context, "vkCmdSetFragmentShadingRateEnumNV");
|
||||
#endif /* defined(VK_NV_fragment_shading_rate_enums) */
|
||||
#if defined(VK_NV_memory_decompression)
|
||||
vkCmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV)load(context, "vkCmdDecompressMemoryIndirectCountNV");
|
||||
vkCmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV)load(context, "vkCmdDecompressMemoryNV");
|
||||
#endif /* defined(VK_NV_memory_decompression) */
|
||||
#if defined(VK_NV_mesh_shader)
|
||||
vkCmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)load(context, "vkCmdDrawMeshTasksIndirectCountNV");
|
||||
vkCmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)load(context, "vkCmdDrawMeshTasksIndirectNV");
|
||||
|
@ -1023,6 +1013,9 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)load(context, "vkGetAccelerationStructureMemoryRequirementsNV");
|
||||
vkGetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)load(context, "vkGetRayTracingShaderGroupHandlesNV");
|
||||
#endif /* defined(VK_NV_ray_tracing) */
|
||||
#if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2
|
||||
vkCmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV)load(context, "vkCmdSetExclusiveScissorEnableNV");
|
||||
#endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_NV_scissor_exclusive)
|
||||
vkCmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)load(context, "vkCmdSetExclusiveScissorNV");
|
||||
#endif /* defined(VK_NV_scissor_exclusive) */
|
||||
|
@ -1039,9 +1032,66 @@ static void volkGenLoadDevice(void* context, PFN_vkVoidFunction (*load)(void*, c
|
|||
vkGetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)load(context, "vkGetDescriptorSetHostMappingVALVE");
|
||||
vkGetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)load(context, "vkGetDescriptorSetLayoutHostMappingInfoVALVE");
|
||||
#endif /* defined(VK_VALVE_descriptor_set_host_mapping) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object))
|
||||
vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT");
|
||||
vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT");
|
||||
vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT");
|
||||
vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT");
|
||||
vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT");
|
||||
vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT");
|
||||
vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT");
|
||||
vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT");
|
||||
vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT");
|
||||
vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT");
|
||||
vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT");
|
||||
vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object))
|
||||
vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT");
|
||||
vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT");
|
||||
vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT");
|
||||
vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT");
|
||||
vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object))
|
||||
vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT");
|
||||
vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT");
|
||||
vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT");
|
||||
vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT");
|
||||
vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT");
|
||||
vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT");
|
||||
vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT");
|
||||
vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV");
|
||||
vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV");
|
||||
vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV");
|
||||
vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV");
|
||||
vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV");
|
||||
vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV");
|
||||
vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT");
|
||||
vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT");
|
||||
vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT");
|
||||
vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
|
||||
vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT");
|
||||
vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT");
|
||||
vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT");
|
||||
vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT");
|
||||
vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT");
|
||||
vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT");
|
||||
vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT");
|
||||
vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV");
|
||||
vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT");
|
||||
vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT");
|
||||
vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV");
|
||||
vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT");
|
||||
vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV");
|
||||
vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
|
||||
vkGetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)load(context, "vkGetDeviceGroupSurfacePresentModes2EXT");
|
||||
#endif /* (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1)) */
|
||||
#if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state))
|
||||
vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT");
|
||||
#endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */
|
||||
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
|
||||
vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)load(context, "vkCmdPushDescriptorSetWithTemplateKHR");
|
||||
#endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template)) */
|
||||
|
@ -1268,6 +1318,9 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID)load(context, "vkGetAndroidHardwareBufferPropertiesANDROID");
|
||||
table->vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID)load(context, "vkGetMemoryAndroidHardwareBufferANDROID");
|
||||
#endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */
|
||||
#if defined(VK_EXT_attachment_feedback_loop_dynamic_state)
|
||||
table->vkCmdSetAttachmentFeedbackLoopEnableEXT = (PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT)load(context, "vkCmdSetAttachmentFeedbackLoopEnableEXT");
|
||||
#endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */
|
||||
#if defined(VK_EXT_buffer_device_address)
|
||||
table->vkGetBufferDeviceAddressEXT = (PFN_vkGetBufferDeviceAddressEXT)load(context, "vkGetBufferDeviceAddressEXT");
|
||||
#endif /* defined(VK_EXT_buffer_device_address) */
|
||||
|
@ -1288,72 +1341,37 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)load(context, "vkDebugMarkerSetObjectNameEXT");
|
||||
table->vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)load(context, "vkDebugMarkerSetObjectTagEXT");
|
||||
#endif /* defined(VK_EXT_debug_marker) */
|
||||
#if defined(VK_EXT_descriptor_buffer)
|
||||
table->vkCmdBindDescriptorBufferEmbeddedSamplersEXT = (PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT)load(context, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT");
|
||||
table->vkCmdBindDescriptorBuffersEXT = (PFN_vkCmdBindDescriptorBuffersEXT)load(context, "vkCmdBindDescriptorBuffersEXT");
|
||||
table->vkCmdSetDescriptorBufferOffsetsEXT = (PFN_vkCmdSetDescriptorBufferOffsetsEXT)load(context, "vkCmdSetDescriptorBufferOffsetsEXT");
|
||||
table->vkGetBufferOpaqueCaptureDescriptorDataEXT = (PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT)load(context, "vkGetBufferOpaqueCaptureDescriptorDataEXT");
|
||||
table->vkGetDescriptorEXT = (PFN_vkGetDescriptorEXT)load(context, "vkGetDescriptorEXT");
|
||||
table->vkGetDescriptorSetLayoutBindingOffsetEXT = (PFN_vkGetDescriptorSetLayoutBindingOffsetEXT)load(context, "vkGetDescriptorSetLayoutBindingOffsetEXT");
|
||||
table->vkGetDescriptorSetLayoutSizeEXT = (PFN_vkGetDescriptorSetLayoutSizeEXT)load(context, "vkGetDescriptorSetLayoutSizeEXT");
|
||||
table->vkGetImageOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageOpaqueCaptureDescriptorDataEXT");
|
||||
table->vkGetImageViewOpaqueCaptureDescriptorDataEXT = (PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT)load(context, "vkGetImageViewOpaqueCaptureDescriptorDataEXT");
|
||||
table->vkGetSamplerOpaqueCaptureDescriptorDataEXT = (PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT)load(context, "vkGetSamplerOpaqueCaptureDescriptorDataEXT");
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) */
|
||||
#if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing))
|
||||
table->vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT = (PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT)load(context, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT");
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */
|
||||
#if defined(VK_EXT_device_fault)
|
||||
table->vkGetDeviceFaultInfoEXT = (PFN_vkGetDeviceFaultInfoEXT)load(context, "vkGetDeviceFaultInfoEXT");
|
||||
#endif /* defined(VK_EXT_device_fault) */
|
||||
#if defined(VK_EXT_discard_rectangles)
|
||||
table->vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT)load(context, "vkCmdSetDiscardRectangleEXT");
|
||||
#endif /* defined(VK_EXT_discard_rectangles) */
|
||||
#if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2
|
||||
table->vkCmdSetDiscardRectangleEnableEXT = (PFN_vkCmdSetDiscardRectangleEnableEXT)load(context, "vkCmdSetDiscardRectangleEnableEXT");
|
||||
table->vkCmdSetDiscardRectangleModeEXT = (PFN_vkCmdSetDiscardRectangleModeEXT)load(context, "vkCmdSetDiscardRectangleModeEXT");
|
||||
#endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_EXT_display_control)
|
||||
table->vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT)load(context, "vkDisplayPowerControlEXT");
|
||||
table->vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT)load(context, "vkGetSwapchainCounterEXT");
|
||||
table->vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT)load(context, "vkRegisterDeviceEventEXT");
|
||||
table->vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT)load(context, "vkRegisterDisplayEventEXT");
|
||||
#endif /* defined(VK_EXT_display_control) */
|
||||
#if defined(VK_EXT_extended_dynamic_state)
|
||||
table->vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT");
|
||||
table->vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT");
|
||||
table->vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT");
|
||||
table->vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT");
|
||||
table->vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT");
|
||||
table->vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT");
|
||||
table->vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT");
|
||||
table->vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT");
|
||||
table->vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT");
|
||||
table->vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT");
|
||||
table->vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT");
|
||||
table->vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state) */
|
||||
#if defined(VK_EXT_extended_dynamic_state2)
|
||||
table->vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT");
|
||||
table->vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT");
|
||||
table->vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT");
|
||||
table->vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT");
|
||||
table->vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state2) */
|
||||
#if defined(VK_EXT_extended_dynamic_state3)
|
||||
table->vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT");
|
||||
table->vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT");
|
||||
table->vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT");
|
||||
table->vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT");
|
||||
table->vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT");
|
||||
table->vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT");
|
||||
table->vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT");
|
||||
table->vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV");
|
||||
table->vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV");
|
||||
table->vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV");
|
||||
table->vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV");
|
||||
table->vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV");
|
||||
table->vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV");
|
||||
table->vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT");
|
||||
table->vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT");
|
||||
table->vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT");
|
||||
table->vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
|
||||
table->vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT");
|
||||
table->vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT");
|
||||
table->vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT");
|
||||
table->vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT");
|
||||
table->vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT");
|
||||
table->vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT");
|
||||
table->vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT");
|
||||
table->vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV");
|
||||
table->vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT");
|
||||
table->vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT");
|
||||
table->vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV");
|
||||
table->vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT");
|
||||
table->vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV");
|
||||
table->vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV");
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state3) */
|
||||
#if defined(VK_EXT_external_memory_host)
|
||||
table->vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)load(context, "vkGetMemoryHostPointerPropertiesEXT");
|
||||
#endif /* defined(VK_EXT_external_memory_host) */
|
||||
|
@ -1423,6 +1441,15 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetShaderModuleCreateInfoIdentifierEXT = (PFN_vkGetShaderModuleCreateInfoIdentifierEXT)load(context, "vkGetShaderModuleCreateInfoIdentifierEXT");
|
||||
table->vkGetShaderModuleIdentifierEXT = (PFN_vkGetShaderModuleIdentifierEXT)load(context, "vkGetShaderModuleIdentifierEXT");
|
||||
#endif /* defined(VK_EXT_shader_module_identifier) */
|
||||
#if defined(VK_EXT_shader_object)
|
||||
table->vkCmdBindShadersEXT = (PFN_vkCmdBindShadersEXT)load(context, "vkCmdBindShadersEXT");
|
||||
table->vkCreateShadersEXT = (PFN_vkCreateShadersEXT)load(context, "vkCreateShadersEXT");
|
||||
table->vkDestroyShaderEXT = (PFN_vkDestroyShaderEXT)load(context, "vkDestroyShaderEXT");
|
||||
table->vkGetShaderBinaryDataEXT = (PFN_vkGetShaderBinaryDataEXT)load(context, "vkGetShaderBinaryDataEXT");
|
||||
#endif /* defined(VK_EXT_shader_object) */
|
||||
#if defined(VK_EXT_swapchain_maintenance1)
|
||||
table->vkReleaseSwapchainImagesEXT = (PFN_vkReleaseSwapchainImagesEXT)load(context, "vkReleaseSwapchainImagesEXT");
|
||||
#endif /* defined(VK_EXT_swapchain_maintenance1) */
|
||||
#if defined(VK_EXT_transform_feedback)
|
||||
table->vkCmdBeginQueryIndexedEXT = (PFN_vkCmdBeginQueryIndexedEXT)load(context, "vkCmdBeginQueryIndexedEXT");
|
||||
table->vkCmdBeginTransformFeedbackEXT = (PFN_vkCmdBeginTransformFeedbackEXT)load(context, "vkCmdBeginTransformFeedbackEXT");
|
||||
|
@ -1437,9 +1464,6 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)load(context, "vkGetValidationCacheDataEXT");
|
||||
table->vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)load(context, "vkMergeValidationCachesEXT");
|
||||
#endif /* defined(VK_EXT_validation_cache) */
|
||||
#if defined(VK_EXT_vertex_input_dynamic_state)
|
||||
table->vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT");
|
||||
#endif /* defined(VK_EXT_vertex_input_dynamic_state) */
|
||||
#if defined(VK_FUCHSIA_buffer_collection)
|
||||
table->vkCreateBufferCollectionFUCHSIA = (PFN_vkCreateBufferCollectionFUCHSIA)load(context, "vkCreateBufferCollectionFUCHSIA");
|
||||
table->vkDestroyBufferCollectionFUCHSIA = (PFN_vkDestroyBufferCollectionFUCHSIA)load(context, "vkDestroyBufferCollectionFUCHSIA");
|
||||
|
@ -1459,6 +1483,10 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE)load(context, "vkGetPastPresentationTimingGOOGLE");
|
||||
table->vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE)load(context, "vkGetRefreshCycleDurationGOOGLE");
|
||||
#endif /* defined(VK_GOOGLE_display_timing) */
|
||||
#if defined(VK_HUAWEI_cluster_culling_shader)
|
||||
table->vkCmdDrawClusterHUAWEI = (PFN_vkCmdDrawClusterHUAWEI)load(context, "vkCmdDrawClusterHUAWEI");
|
||||
table->vkCmdDrawClusterIndirectHUAWEI = (PFN_vkCmdDrawClusterIndirectHUAWEI)load(context, "vkCmdDrawClusterIndirectHUAWEI");
|
||||
#endif /* defined(VK_HUAWEI_cluster_culling_shader) */
|
||||
#if defined(VK_HUAWEI_invocation_mask)
|
||||
table->vkCmdBindInvocationMaskHUAWEI = (PFN_vkCmdBindInvocationMaskHUAWEI)load(context, "vkCmdBindInvocationMaskHUAWEI");
|
||||
#endif /* defined(VK_HUAWEI_invocation_mask) */
|
||||
|
@ -1589,6 +1617,10 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetDeviceImageMemoryRequirementsKHR = (PFN_vkGetDeviceImageMemoryRequirementsKHR)load(context, "vkGetDeviceImageMemoryRequirementsKHR");
|
||||
table->vkGetDeviceImageSparseMemoryRequirementsKHR = (PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)load(context, "vkGetDeviceImageSparseMemoryRequirementsKHR");
|
||||
#endif /* defined(VK_KHR_maintenance4) */
|
||||
#if defined(VK_KHR_map_memory2)
|
||||
table->vkMapMemory2KHR = (PFN_vkMapMemory2KHR)load(context, "vkMapMemory2KHR");
|
||||
table->vkUnmapMemory2KHR = (PFN_vkUnmapMemory2KHR)load(context, "vkUnmapMemory2KHR");
|
||||
#endif /* defined(VK_KHR_map_memory2) */
|
||||
#if defined(VK_KHR_performance_query)
|
||||
table->vkAcquireProfilingLockKHR = (PFN_vkAcquireProfilingLockKHR)load(context, "vkAcquireProfilingLockKHR");
|
||||
table->vkReleaseProfilingLockKHR = (PFN_vkReleaseProfilingLockKHR)load(context, "vkReleaseProfilingLockKHR");
|
||||
|
@ -1681,6 +1713,10 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
#if defined(VK_NV_clip_space_w_scaling)
|
||||
table->vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV)load(context, "vkCmdSetViewportWScalingNV");
|
||||
#endif /* defined(VK_NV_clip_space_w_scaling) */
|
||||
#if defined(VK_NV_copy_memory_indirect)
|
||||
table->vkCmdCopyMemoryIndirectNV = (PFN_vkCmdCopyMemoryIndirectNV)load(context, "vkCmdCopyMemoryIndirectNV");
|
||||
table->vkCmdCopyMemoryToImageIndirectNV = (PFN_vkCmdCopyMemoryToImageIndirectNV)load(context, "vkCmdCopyMemoryToImageIndirectNV");
|
||||
#endif /* defined(VK_NV_copy_memory_indirect) */
|
||||
#if defined(VK_NV_device_diagnostic_checkpoints)
|
||||
table->vkCmdSetCheckpointNV = (PFN_vkCmdSetCheckpointNV)load(context, "vkCmdSetCheckpointNV");
|
||||
table->vkGetQueueCheckpointDataNV = (PFN_vkGetQueueCheckpointDataNV)load(context, "vkGetQueueCheckpointDataNV");
|
||||
|
@ -1702,6 +1738,10 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
#if defined(VK_NV_fragment_shading_rate_enums)
|
||||
table->vkCmdSetFragmentShadingRateEnumNV = (PFN_vkCmdSetFragmentShadingRateEnumNV)load(context, "vkCmdSetFragmentShadingRateEnumNV");
|
||||
#endif /* defined(VK_NV_fragment_shading_rate_enums) */
|
||||
#if defined(VK_NV_memory_decompression)
|
||||
table->vkCmdDecompressMemoryIndirectCountNV = (PFN_vkCmdDecompressMemoryIndirectCountNV)load(context, "vkCmdDecompressMemoryIndirectCountNV");
|
||||
table->vkCmdDecompressMemoryNV = (PFN_vkCmdDecompressMemoryNV)load(context, "vkCmdDecompressMemoryNV");
|
||||
#endif /* defined(VK_NV_memory_decompression) */
|
||||
#if defined(VK_NV_mesh_shader)
|
||||
table->vkCmdDrawMeshTasksIndirectCountNV = (PFN_vkCmdDrawMeshTasksIndirectCountNV)load(context, "vkCmdDrawMeshTasksIndirectCountNV");
|
||||
table->vkCmdDrawMeshTasksIndirectNV = (PFN_vkCmdDrawMeshTasksIndirectNV)load(context, "vkCmdDrawMeshTasksIndirectNV");
|
||||
|
@ -1727,6 +1767,9 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetAccelerationStructureMemoryRequirementsNV = (PFN_vkGetAccelerationStructureMemoryRequirementsNV)load(context, "vkGetAccelerationStructureMemoryRequirementsNV");
|
||||
table->vkGetRayTracingShaderGroupHandlesNV = (PFN_vkGetRayTracingShaderGroupHandlesNV)load(context, "vkGetRayTracingShaderGroupHandlesNV");
|
||||
#endif /* defined(VK_NV_ray_tracing) */
|
||||
#if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2
|
||||
table->vkCmdSetExclusiveScissorEnableNV = (PFN_vkCmdSetExclusiveScissorEnableNV)load(context, "vkCmdSetExclusiveScissorEnableNV");
|
||||
#endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_NV_scissor_exclusive)
|
||||
table->vkCmdSetExclusiveScissorNV = (PFN_vkCmdSetExclusiveScissorNV)load(context, "vkCmdSetExclusiveScissorNV");
|
||||
#endif /* defined(VK_NV_scissor_exclusive) */
|
||||
|
@ -1743,9 +1786,66 @@ static void volkGenLoadDeviceTable(struct VolkDeviceTable* table, void* context,
|
|||
table->vkGetDescriptorSetHostMappingVALVE = (PFN_vkGetDescriptorSetHostMappingVALVE)load(context, "vkGetDescriptorSetHostMappingVALVE");
|
||||
table->vkGetDescriptorSetLayoutHostMappingInfoVALVE = (PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE)load(context, "vkGetDescriptorSetLayoutHostMappingInfoVALVE");
|
||||
#endif /* defined(VK_VALVE_descriptor_set_host_mapping) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object))
|
||||
table->vkCmdBindVertexBuffers2EXT = (PFN_vkCmdBindVertexBuffers2EXT)load(context, "vkCmdBindVertexBuffers2EXT");
|
||||
table->vkCmdSetCullModeEXT = (PFN_vkCmdSetCullModeEXT)load(context, "vkCmdSetCullModeEXT");
|
||||
table->vkCmdSetDepthBoundsTestEnableEXT = (PFN_vkCmdSetDepthBoundsTestEnableEXT)load(context, "vkCmdSetDepthBoundsTestEnableEXT");
|
||||
table->vkCmdSetDepthCompareOpEXT = (PFN_vkCmdSetDepthCompareOpEXT)load(context, "vkCmdSetDepthCompareOpEXT");
|
||||
table->vkCmdSetDepthTestEnableEXT = (PFN_vkCmdSetDepthTestEnableEXT)load(context, "vkCmdSetDepthTestEnableEXT");
|
||||
table->vkCmdSetDepthWriteEnableEXT = (PFN_vkCmdSetDepthWriteEnableEXT)load(context, "vkCmdSetDepthWriteEnableEXT");
|
||||
table->vkCmdSetFrontFaceEXT = (PFN_vkCmdSetFrontFaceEXT)load(context, "vkCmdSetFrontFaceEXT");
|
||||
table->vkCmdSetPrimitiveTopologyEXT = (PFN_vkCmdSetPrimitiveTopologyEXT)load(context, "vkCmdSetPrimitiveTopologyEXT");
|
||||
table->vkCmdSetScissorWithCountEXT = (PFN_vkCmdSetScissorWithCountEXT)load(context, "vkCmdSetScissorWithCountEXT");
|
||||
table->vkCmdSetStencilOpEXT = (PFN_vkCmdSetStencilOpEXT)load(context, "vkCmdSetStencilOpEXT");
|
||||
table->vkCmdSetStencilTestEnableEXT = (PFN_vkCmdSetStencilTestEnableEXT)load(context, "vkCmdSetStencilTestEnableEXT");
|
||||
table->vkCmdSetViewportWithCountEXT = (PFN_vkCmdSetViewportWithCountEXT)load(context, "vkCmdSetViewportWithCountEXT");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object))
|
||||
table->vkCmdSetDepthBiasEnableEXT = (PFN_vkCmdSetDepthBiasEnableEXT)load(context, "vkCmdSetDepthBiasEnableEXT");
|
||||
table->vkCmdSetLogicOpEXT = (PFN_vkCmdSetLogicOpEXT)load(context, "vkCmdSetLogicOpEXT");
|
||||
table->vkCmdSetPatchControlPointsEXT = (PFN_vkCmdSetPatchControlPointsEXT)load(context, "vkCmdSetPatchControlPointsEXT");
|
||||
table->vkCmdSetPrimitiveRestartEnableEXT = (PFN_vkCmdSetPrimitiveRestartEnableEXT)load(context, "vkCmdSetPrimitiveRestartEnableEXT");
|
||||
table->vkCmdSetRasterizerDiscardEnableEXT = (PFN_vkCmdSetRasterizerDiscardEnableEXT)load(context, "vkCmdSetRasterizerDiscardEnableEXT");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object))
|
||||
table->vkCmdSetAlphaToCoverageEnableEXT = (PFN_vkCmdSetAlphaToCoverageEnableEXT)load(context, "vkCmdSetAlphaToCoverageEnableEXT");
|
||||
table->vkCmdSetAlphaToOneEnableEXT = (PFN_vkCmdSetAlphaToOneEnableEXT)load(context, "vkCmdSetAlphaToOneEnableEXT");
|
||||
table->vkCmdSetColorBlendAdvancedEXT = (PFN_vkCmdSetColorBlendAdvancedEXT)load(context, "vkCmdSetColorBlendAdvancedEXT");
|
||||
table->vkCmdSetColorBlendEnableEXT = (PFN_vkCmdSetColorBlendEnableEXT)load(context, "vkCmdSetColorBlendEnableEXT");
|
||||
table->vkCmdSetColorBlendEquationEXT = (PFN_vkCmdSetColorBlendEquationEXT)load(context, "vkCmdSetColorBlendEquationEXT");
|
||||
table->vkCmdSetColorWriteMaskEXT = (PFN_vkCmdSetColorWriteMaskEXT)load(context, "vkCmdSetColorWriteMaskEXT");
|
||||
table->vkCmdSetConservativeRasterizationModeEXT = (PFN_vkCmdSetConservativeRasterizationModeEXT)load(context, "vkCmdSetConservativeRasterizationModeEXT");
|
||||
table->vkCmdSetCoverageModulationModeNV = (PFN_vkCmdSetCoverageModulationModeNV)load(context, "vkCmdSetCoverageModulationModeNV");
|
||||
table->vkCmdSetCoverageModulationTableEnableNV = (PFN_vkCmdSetCoverageModulationTableEnableNV)load(context, "vkCmdSetCoverageModulationTableEnableNV");
|
||||
table->vkCmdSetCoverageModulationTableNV = (PFN_vkCmdSetCoverageModulationTableNV)load(context, "vkCmdSetCoverageModulationTableNV");
|
||||
table->vkCmdSetCoverageReductionModeNV = (PFN_vkCmdSetCoverageReductionModeNV)load(context, "vkCmdSetCoverageReductionModeNV");
|
||||
table->vkCmdSetCoverageToColorEnableNV = (PFN_vkCmdSetCoverageToColorEnableNV)load(context, "vkCmdSetCoverageToColorEnableNV");
|
||||
table->vkCmdSetCoverageToColorLocationNV = (PFN_vkCmdSetCoverageToColorLocationNV)load(context, "vkCmdSetCoverageToColorLocationNV");
|
||||
table->vkCmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)load(context, "vkCmdSetDepthClampEnableEXT");
|
||||
table->vkCmdSetDepthClipEnableEXT = (PFN_vkCmdSetDepthClipEnableEXT)load(context, "vkCmdSetDepthClipEnableEXT");
|
||||
table->vkCmdSetDepthClipNegativeOneToOneEXT = (PFN_vkCmdSetDepthClipNegativeOneToOneEXT)load(context, "vkCmdSetDepthClipNegativeOneToOneEXT");
|
||||
table->vkCmdSetExtraPrimitiveOverestimationSizeEXT = (PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)load(context, "vkCmdSetExtraPrimitiveOverestimationSizeEXT");
|
||||
table->vkCmdSetLineRasterizationModeEXT = (PFN_vkCmdSetLineRasterizationModeEXT)load(context, "vkCmdSetLineRasterizationModeEXT");
|
||||
table->vkCmdSetLineStippleEnableEXT = (PFN_vkCmdSetLineStippleEnableEXT)load(context, "vkCmdSetLineStippleEnableEXT");
|
||||
table->vkCmdSetLogicOpEnableEXT = (PFN_vkCmdSetLogicOpEnableEXT)load(context, "vkCmdSetLogicOpEnableEXT");
|
||||
table->vkCmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)load(context, "vkCmdSetPolygonModeEXT");
|
||||
table->vkCmdSetProvokingVertexModeEXT = (PFN_vkCmdSetProvokingVertexModeEXT)load(context, "vkCmdSetProvokingVertexModeEXT");
|
||||
table->vkCmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)load(context, "vkCmdSetRasterizationSamplesEXT");
|
||||
table->vkCmdSetRasterizationStreamEXT = (PFN_vkCmdSetRasterizationStreamEXT)load(context, "vkCmdSetRasterizationStreamEXT");
|
||||
table->vkCmdSetRepresentativeFragmentTestEnableNV = (PFN_vkCmdSetRepresentativeFragmentTestEnableNV)load(context, "vkCmdSetRepresentativeFragmentTestEnableNV");
|
||||
table->vkCmdSetSampleLocationsEnableEXT = (PFN_vkCmdSetSampleLocationsEnableEXT)load(context, "vkCmdSetSampleLocationsEnableEXT");
|
||||
table->vkCmdSetSampleMaskEXT = (PFN_vkCmdSetSampleMaskEXT)load(context, "vkCmdSetSampleMaskEXT");
|
||||
table->vkCmdSetShadingRateImageEnableNV = (PFN_vkCmdSetShadingRateImageEnableNV)load(context, "vkCmdSetShadingRateImageEnableNV");
|
||||
table->vkCmdSetTessellationDomainOriginEXT = (PFN_vkCmdSetTessellationDomainOriginEXT)load(context, "vkCmdSetTessellationDomainOriginEXT");
|
||||
table->vkCmdSetViewportSwizzleNV = (PFN_vkCmdSetViewportSwizzleNV)load(context, "vkCmdSetViewportSwizzleNV");
|
||||
table->vkCmdSetViewportWScalingEnableNV = (PFN_vkCmdSetViewportWScalingEnableNV)load(context, "vkCmdSetViewportWScalingEnableNV");
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
|
||||
table->vkGetDeviceGroupSurfacePresentModes2EXT = (PFN_vkGetDeviceGroupSurfacePresentModes2EXT)load(context, "vkGetDeviceGroupSurfacePresentModes2EXT");
|
||||
#endif /* (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1)) */
|
||||
#if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state))
|
||||
table->vkCmdSetVertexInputEXT = (PFN_vkCmdSetVertexInputEXT)load(context, "vkCmdSetVertexInputEXT");
|
||||
#endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */
|
||||
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
|
||||
table->vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR)load(context, "vkCmdPushDescriptorSetWithTemplateKHR");
|
||||
#endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template)) */
|
||||
|
@ -2016,6 +2116,9 @@ PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT;
|
|||
PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT;
|
||||
PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT;
|
||||
#endif /* defined(VK_EXT_acquire_xlib_display) */
|
||||
#if defined(VK_EXT_attachment_feedback_loop_dynamic_state)
|
||||
PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT;
|
||||
#endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */
|
||||
#if defined(VK_EXT_buffer_device_address)
|
||||
PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT;
|
||||
#endif /* defined(VK_EXT_buffer_device_address) */
|
||||
|
@ -2055,6 +2158,21 @@ PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT;
|
|||
PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT;
|
||||
PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT;
|
||||
#endif /* defined(VK_EXT_debug_utils) */
|
||||
#if defined(VK_EXT_descriptor_buffer)
|
||||
PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT;
|
||||
PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT;
|
||||
PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT;
|
||||
PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetDescriptorEXT vkGetDescriptorEXT;
|
||||
PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT;
|
||||
PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT;
|
||||
PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) */
|
||||
#if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing))
|
||||
PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */
|
||||
#if defined(VK_EXT_device_fault)
|
||||
PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT;
|
||||
#endif /* defined(VK_EXT_device_fault) */
|
||||
|
@ -2068,6 +2186,10 @@ PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectF
|
|||
#if defined(VK_EXT_discard_rectangles)
|
||||
PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) */
|
||||
#if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2
|
||||
PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT;
|
||||
PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_EXT_display_control)
|
||||
PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT;
|
||||
PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT;
|
||||
|
@ -2077,60 +2199,6 @@ PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT;
|
|||
#if defined(VK_EXT_display_surface_counter)
|
||||
PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT;
|
||||
#endif /* defined(VK_EXT_display_surface_counter) */
|
||||
#if defined(VK_EXT_extended_dynamic_state)
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state) */
|
||||
#if defined(VK_EXT_extended_dynamic_state2)
|
||||
PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state2) */
|
||||
#if defined(VK_EXT_extended_dynamic_state3)
|
||||
PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state3) */
|
||||
#if defined(VK_EXT_external_memory_host)
|
||||
PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT;
|
||||
#endif /* defined(VK_EXT_external_memory_host) */
|
||||
|
@ -2208,6 +2276,15 @@ PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePr
|
|||
PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT;
|
||||
PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT;
|
||||
#endif /* defined(VK_EXT_shader_module_identifier) */
|
||||
#if defined(VK_EXT_shader_object)
|
||||
PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT;
|
||||
PFN_vkCreateShadersEXT vkCreateShadersEXT;
|
||||
PFN_vkDestroyShaderEXT vkDestroyShaderEXT;
|
||||
PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT;
|
||||
#endif /* defined(VK_EXT_shader_object) */
|
||||
#if defined(VK_EXT_swapchain_maintenance1)
|
||||
PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT;
|
||||
#endif /* defined(VK_EXT_swapchain_maintenance1) */
|
||||
#if defined(VK_EXT_tooling_info)
|
||||
PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT;
|
||||
#endif /* defined(VK_EXT_tooling_info) */
|
||||
|
@ -2225,9 +2302,6 @@ PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT;
|
|||
PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT;
|
||||
PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT;
|
||||
#endif /* defined(VK_EXT_validation_cache) */
|
||||
#if defined(VK_EXT_vertex_input_dynamic_state)
|
||||
PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* defined(VK_EXT_vertex_input_dynamic_state) */
|
||||
#if defined(VK_FUCHSIA_buffer_collection)
|
||||
PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA;
|
||||
PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA;
|
||||
|
@ -2253,6 +2327,10 @@ PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP;
|
|||
PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
|
||||
PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
|
||||
#endif /* defined(VK_GOOGLE_display_timing) */
|
||||
#if defined(VK_HUAWEI_cluster_culling_shader)
|
||||
PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI;
|
||||
PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_cluster_culling_shader) */
|
||||
#if defined(VK_HUAWEI_invocation_mask)
|
||||
PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_invocation_mask) */
|
||||
|
@ -2427,6 +2505,10 @@ PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequirementsKH
|
|||
PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR;
|
||||
PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR;
|
||||
#endif /* defined(VK_KHR_maintenance4) */
|
||||
#if defined(VK_KHR_map_memory2)
|
||||
PFN_vkMapMemory2KHR vkMapMemory2KHR;
|
||||
PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR;
|
||||
#endif /* defined(VK_KHR_map_memory2) */
|
||||
#if defined(VK_KHR_performance_query)
|
||||
PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR;
|
||||
PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
|
||||
|
@ -2562,6 +2644,10 @@ PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV;
|
|||
#if defined(VK_NV_cooperative_matrix)
|
||||
PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV;
|
||||
#endif /* defined(VK_NV_cooperative_matrix) */
|
||||
#if defined(VK_NV_copy_memory_indirect)
|
||||
PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV;
|
||||
PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV;
|
||||
#endif /* defined(VK_NV_copy_memory_indirect) */
|
||||
#if defined(VK_NV_coverage_reduction_mode)
|
||||
PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
|
||||
#endif /* defined(VK_NV_coverage_reduction_mode) */
|
||||
|
@ -2589,6 +2675,10 @@ PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
|
|||
#if defined(VK_NV_fragment_shading_rate_enums)
|
||||
PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV;
|
||||
#endif /* defined(VK_NV_fragment_shading_rate_enums) */
|
||||
#if defined(VK_NV_memory_decompression)
|
||||
PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV;
|
||||
PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV;
|
||||
#endif /* defined(VK_NV_memory_decompression) */
|
||||
#if defined(VK_NV_mesh_shader)
|
||||
PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV;
|
||||
PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV;
|
||||
|
@ -2615,6 +2705,9 @@ PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV;
|
|||
PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV;
|
||||
PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV;
|
||||
#endif /* defined(VK_NV_ray_tracing) */
|
||||
#if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2
|
||||
PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_NV_scissor_exclusive)
|
||||
PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) */
|
||||
|
@ -2635,9 +2728,66 @@ PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPre
|
|||
PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE;
|
||||
PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE;
|
||||
#endif /* defined(VK_VALVE_descriptor_set_host_mapping) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
|
||||
PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT;
|
||||
#endif /* (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1)) */
|
||||
#if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state))
|
||||
PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */
|
||||
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
|
||||
PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR;
|
||||
#endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template)) */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* volk
|
||||
*
|
||||
* Copyright (C) 2018-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Copyright (C) 2018-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://github.com/zeux/volk
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end of this file.
|
||||
|
@ -15,7 +15,7 @@
|
|||
#endif
|
||||
|
||||
/* VOLK_GENERATE_VERSION_DEFINE */
|
||||
#define VOLK_HEADER_VERSION 231
|
||||
#define VOLK_HEADER_VERSION 250
|
||||
/* VOLK_GENERATE_VERSION_DEFINE */
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
@ -340,6 +340,9 @@ struct VolkDeviceTable
|
|||
PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID;
|
||||
PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID;
|
||||
#endif /* defined(VK_ANDROID_external_memory_android_hardware_buffer) */
|
||||
#if defined(VK_EXT_attachment_feedback_loop_dynamic_state)
|
||||
PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT;
|
||||
#endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */
|
||||
#if defined(VK_EXT_buffer_device_address)
|
||||
PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT;
|
||||
#endif /* defined(VK_EXT_buffer_device_address) */
|
||||
|
@ -360,72 +363,37 @@ struct VolkDeviceTable
|
|||
PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT;
|
||||
PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT;
|
||||
#endif /* defined(VK_EXT_debug_marker) */
|
||||
#if defined(VK_EXT_descriptor_buffer)
|
||||
PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT;
|
||||
PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT;
|
||||
PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT;
|
||||
PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetDescriptorEXT vkGetDescriptorEXT;
|
||||
PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT;
|
||||
PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT;
|
||||
PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT;
|
||||
PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) */
|
||||
#if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing))
|
||||
PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */
|
||||
#if defined(VK_EXT_device_fault)
|
||||
PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT;
|
||||
#endif /* defined(VK_EXT_device_fault) */
|
||||
#if defined(VK_EXT_discard_rectangles)
|
||||
PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) */
|
||||
#if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2
|
||||
PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT;
|
||||
PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_EXT_display_control)
|
||||
PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT;
|
||||
PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT;
|
||||
PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT;
|
||||
PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT;
|
||||
#endif /* defined(VK_EXT_display_control) */
|
||||
#if defined(VK_EXT_extended_dynamic_state)
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state) */
|
||||
#if defined(VK_EXT_extended_dynamic_state2)
|
||||
PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state2) */
|
||||
#if defined(VK_EXT_extended_dynamic_state3)
|
||||
PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state3) */
|
||||
#if defined(VK_EXT_external_memory_host)
|
||||
PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT;
|
||||
#endif /* defined(VK_EXT_external_memory_host) */
|
||||
|
@ -495,6 +463,15 @@ struct VolkDeviceTable
|
|||
PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT;
|
||||
PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT;
|
||||
#endif /* defined(VK_EXT_shader_module_identifier) */
|
||||
#if defined(VK_EXT_shader_object)
|
||||
PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT;
|
||||
PFN_vkCreateShadersEXT vkCreateShadersEXT;
|
||||
PFN_vkDestroyShaderEXT vkDestroyShaderEXT;
|
||||
PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT;
|
||||
#endif /* defined(VK_EXT_shader_object) */
|
||||
#if defined(VK_EXT_swapchain_maintenance1)
|
||||
PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT;
|
||||
#endif /* defined(VK_EXT_swapchain_maintenance1) */
|
||||
#if defined(VK_EXT_transform_feedback)
|
||||
PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT;
|
||||
PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT;
|
||||
|
@ -509,9 +486,6 @@ struct VolkDeviceTable
|
|||
PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT;
|
||||
PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT;
|
||||
#endif /* defined(VK_EXT_validation_cache) */
|
||||
#if defined(VK_EXT_vertex_input_dynamic_state)
|
||||
PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* defined(VK_EXT_vertex_input_dynamic_state) */
|
||||
#if defined(VK_FUCHSIA_buffer_collection)
|
||||
PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA;
|
||||
PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA;
|
||||
|
@ -531,6 +505,10 @@ struct VolkDeviceTable
|
|||
PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
|
||||
PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
|
||||
#endif /* defined(VK_GOOGLE_display_timing) */
|
||||
#if defined(VK_HUAWEI_cluster_culling_shader)
|
||||
PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI;
|
||||
PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_cluster_culling_shader) */
|
||||
#if defined(VK_HUAWEI_invocation_mask)
|
||||
PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_invocation_mask) */
|
||||
|
@ -661,6 +639,10 @@ struct VolkDeviceTable
|
|||
PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR;
|
||||
PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR;
|
||||
#endif /* defined(VK_KHR_maintenance4) */
|
||||
#if defined(VK_KHR_map_memory2)
|
||||
PFN_vkMapMemory2KHR vkMapMemory2KHR;
|
||||
PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR;
|
||||
#endif /* defined(VK_KHR_map_memory2) */
|
||||
#if defined(VK_KHR_performance_query)
|
||||
PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR;
|
||||
PFN_vkReleaseProfilingLockKHR vkReleaseProfilingLockKHR;
|
||||
|
@ -753,6 +735,10 @@ struct VolkDeviceTable
|
|||
#if defined(VK_NV_clip_space_w_scaling)
|
||||
PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV;
|
||||
#endif /* defined(VK_NV_clip_space_w_scaling) */
|
||||
#if defined(VK_NV_copy_memory_indirect)
|
||||
PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV;
|
||||
PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV;
|
||||
#endif /* defined(VK_NV_copy_memory_indirect) */
|
||||
#if defined(VK_NV_device_diagnostic_checkpoints)
|
||||
PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV;
|
||||
PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV;
|
||||
|
@ -774,6 +760,10 @@ struct VolkDeviceTable
|
|||
#if defined(VK_NV_fragment_shading_rate_enums)
|
||||
PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV;
|
||||
#endif /* defined(VK_NV_fragment_shading_rate_enums) */
|
||||
#if defined(VK_NV_memory_decompression)
|
||||
PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV;
|
||||
PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV;
|
||||
#endif /* defined(VK_NV_memory_decompression) */
|
||||
#if defined(VK_NV_mesh_shader)
|
||||
PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV;
|
||||
PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV;
|
||||
|
@ -799,6 +789,9 @@ struct VolkDeviceTable
|
|||
PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV;
|
||||
PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV;
|
||||
#endif /* defined(VK_NV_ray_tracing) */
|
||||
#if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2
|
||||
PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_NV_scissor_exclusive)
|
||||
PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) */
|
||||
|
@ -815,9 +808,66 @@ struct VolkDeviceTable
|
|||
PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE;
|
||||
PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE;
|
||||
#endif /* defined(VK_VALVE_descriptor_set_host_mapping) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object))
|
||||
PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
|
||||
PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT;
|
||||
#endif /* (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1)) */
|
||||
#if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state))
|
||||
PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */
|
||||
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
|
||||
PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR;
|
||||
#endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template)) */
|
||||
|
@ -1080,6 +1130,9 @@ extern PFN_vkGetDrmDisplayEXT vkGetDrmDisplayEXT;
|
|||
extern PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT;
|
||||
extern PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT;
|
||||
#endif /* defined(VK_EXT_acquire_xlib_display) */
|
||||
#if defined(VK_EXT_attachment_feedback_loop_dynamic_state)
|
||||
extern PFN_vkCmdSetAttachmentFeedbackLoopEnableEXT vkCmdSetAttachmentFeedbackLoopEnableEXT;
|
||||
#endif /* defined(VK_EXT_attachment_feedback_loop_dynamic_state) */
|
||||
#if defined(VK_EXT_buffer_device_address)
|
||||
extern PFN_vkGetBufferDeviceAddressEXT vkGetBufferDeviceAddressEXT;
|
||||
#endif /* defined(VK_EXT_buffer_device_address) */
|
||||
|
@ -1119,6 +1172,21 @@ extern PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT;
|
|||
extern PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT;
|
||||
extern PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT;
|
||||
#endif /* defined(VK_EXT_debug_utils) */
|
||||
#if defined(VK_EXT_descriptor_buffer)
|
||||
extern PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT vkCmdBindDescriptorBufferEmbeddedSamplersEXT;
|
||||
extern PFN_vkCmdBindDescriptorBuffersEXT vkCmdBindDescriptorBuffersEXT;
|
||||
extern PFN_vkCmdSetDescriptorBufferOffsetsEXT vkCmdSetDescriptorBufferOffsetsEXT;
|
||||
extern PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT vkGetBufferOpaqueCaptureDescriptorDataEXT;
|
||||
extern PFN_vkGetDescriptorEXT vkGetDescriptorEXT;
|
||||
extern PFN_vkGetDescriptorSetLayoutBindingOffsetEXT vkGetDescriptorSetLayoutBindingOffsetEXT;
|
||||
extern PFN_vkGetDescriptorSetLayoutSizeEXT vkGetDescriptorSetLayoutSizeEXT;
|
||||
extern PFN_vkGetImageOpaqueCaptureDescriptorDataEXT vkGetImageOpaqueCaptureDescriptorDataEXT;
|
||||
extern PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT vkGetImageViewOpaqueCaptureDescriptorDataEXT;
|
||||
extern PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT vkGetSamplerOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) */
|
||||
#if defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing))
|
||||
extern PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT;
|
||||
#endif /* defined(VK_EXT_descriptor_buffer) && (defined(VK_KHR_acceleration_structure) || defined(VK_NV_ray_tracing)) */
|
||||
#if defined(VK_EXT_device_fault)
|
||||
extern PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT;
|
||||
#endif /* defined(VK_EXT_device_fault) */
|
||||
|
@ -1132,6 +1200,10 @@ extern PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDevice
|
|||
#if defined(VK_EXT_discard_rectangles)
|
||||
extern PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) */
|
||||
#if defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2
|
||||
extern PFN_vkCmdSetDiscardRectangleEnableEXT vkCmdSetDiscardRectangleEnableEXT;
|
||||
extern PFN_vkCmdSetDiscardRectangleModeEXT vkCmdSetDiscardRectangleModeEXT;
|
||||
#endif /* defined(VK_EXT_discard_rectangles) && VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_EXT_display_control)
|
||||
extern PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT;
|
||||
extern PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT;
|
||||
|
@ -1141,60 +1213,6 @@ extern PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT;
|
|||
#if defined(VK_EXT_display_surface_counter)
|
||||
extern PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT;
|
||||
#endif /* defined(VK_EXT_display_surface_counter) */
|
||||
#if defined(VK_EXT_extended_dynamic_state)
|
||||
extern PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
extern PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
extern PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
extern PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
extern PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
extern PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
extern PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
extern PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
extern PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
extern PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
extern PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
extern PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state) */
|
||||
#if defined(VK_EXT_extended_dynamic_state2)
|
||||
extern PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
extern PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
extern PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
extern PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
extern PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state2) */
|
||||
#if defined(VK_EXT_extended_dynamic_state3)
|
||||
extern PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
extern PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
extern PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
extern PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
extern PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
extern PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
extern PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
extern PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
extern PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
extern PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
extern PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
extern PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
extern PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
extern PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
extern PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
extern PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
extern PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
extern PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
extern PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
extern PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
extern PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
extern PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
extern PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
extern PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
extern PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
extern PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
extern PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
extern PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
extern PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
extern PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
extern PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* defined(VK_EXT_extended_dynamic_state3) */
|
||||
#if defined(VK_EXT_external_memory_host)
|
||||
extern PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT;
|
||||
#endif /* defined(VK_EXT_external_memory_host) */
|
||||
|
@ -1272,6 +1290,15 @@ extern PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultis
|
|||
extern PFN_vkGetShaderModuleCreateInfoIdentifierEXT vkGetShaderModuleCreateInfoIdentifierEXT;
|
||||
extern PFN_vkGetShaderModuleIdentifierEXT vkGetShaderModuleIdentifierEXT;
|
||||
#endif /* defined(VK_EXT_shader_module_identifier) */
|
||||
#if defined(VK_EXT_shader_object)
|
||||
extern PFN_vkCmdBindShadersEXT vkCmdBindShadersEXT;
|
||||
extern PFN_vkCreateShadersEXT vkCreateShadersEXT;
|
||||
extern PFN_vkDestroyShaderEXT vkDestroyShaderEXT;
|
||||
extern PFN_vkGetShaderBinaryDataEXT vkGetShaderBinaryDataEXT;
|
||||
#endif /* defined(VK_EXT_shader_object) */
|
||||
#if defined(VK_EXT_swapchain_maintenance1)
|
||||
extern PFN_vkReleaseSwapchainImagesEXT vkReleaseSwapchainImagesEXT;
|
||||
#endif /* defined(VK_EXT_swapchain_maintenance1) */
|
||||
#if defined(VK_EXT_tooling_info)
|
||||
extern PFN_vkGetPhysicalDeviceToolPropertiesEXT vkGetPhysicalDeviceToolPropertiesEXT;
|
||||
#endif /* defined(VK_EXT_tooling_info) */
|
||||
|
@ -1289,9 +1316,6 @@ extern PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT;
|
|||
extern PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT;
|
||||
extern PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT;
|
||||
#endif /* defined(VK_EXT_validation_cache) */
|
||||
#if defined(VK_EXT_vertex_input_dynamic_state)
|
||||
extern PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* defined(VK_EXT_vertex_input_dynamic_state) */
|
||||
#if defined(VK_FUCHSIA_buffer_collection)
|
||||
extern PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA;
|
||||
extern PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA;
|
||||
|
@ -1317,6 +1341,10 @@ extern PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP
|
|||
extern PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
|
||||
extern PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
|
||||
#endif /* defined(VK_GOOGLE_display_timing) */
|
||||
#if defined(VK_HUAWEI_cluster_culling_shader)
|
||||
extern PFN_vkCmdDrawClusterHUAWEI vkCmdDrawClusterHUAWEI;
|
||||
extern PFN_vkCmdDrawClusterIndirectHUAWEI vkCmdDrawClusterIndirectHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_cluster_culling_shader) */
|
||||
#if defined(VK_HUAWEI_invocation_mask)
|
||||
extern PFN_vkCmdBindInvocationMaskHUAWEI vkCmdBindInvocationMaskHUAWEI;
|
||||
#endif /* defined(VK_HUAWEI_invocation_mask) */
|
||||
|
@ -1491,6 +1519,10 @@ extern PFN_vkGetDeviceBufferMemoryRequirementsKHR vkGetDeviceBufferMemoryRequire
|
|||
extern PFN_vkGetDeviceImageMemoryRequirementsKHR vkGetDeviceImageMemoryRequirementsKHR;
|
||||
extern PFN_vkGetDeviceImageSparseMemoryRequirementsKHR vkGetDeviceImageSparseMemoryRequirementsKHR;
|
||||
#endif /* defined(VK_KHR_maintenance4) */
|
||||
#if defined(VK_KHR_map_memory2)
|
||||
extern PFN_vkMapMemory2KHR vkMapMemory2KHR;
|
||||
extern PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR;
|
||||
#endif /* defined(VK_KHR_map_memory2) */
|
||||
#if defined(VK_KHR_performance_query)
|
||||
extern PFN_vkAcquireProfilingLockKHR vkAcquireProfilingLockKHR;
|
||||
extern PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR;
|
||||
|
@ -1626,6 +1658,10 @@ extern PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV;
|
|||
#if defined(VK_NV_cooperative_matrix)
|
||||
extern PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV vkGetPhysicalDeviceCooperativeMatrixPropertiesNV;
|
||||
#endif /* defined(VK_NV_cooperative_matrix) */
|
||||
#if defined(VK_NV_copy_memory_indirect)
|
||||
extern PFN_vkCmdCopyMemoryIndirectNV vkCmdCopyMemoryIndirectNV;
|
||||
extern PFN_vkCmdCopyMemoryToImageIndirectNV vkCmdCopyMemoryToImageIndirectNV;
|
||||
#endif /* defined(VK_NV_copy_memory_indirect) */
|
||||
#if defined(VK_NV_coverage_reduction_mode)
|
||||
extern PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV;
|
||||
#endif /* defined(VK_NV_coverage_reduction_mode) */
|
||||
|
@ -1653,6 +1689,10 @@ extern PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV;
|
|||
#if defined(VK_NV_fragment_shading_rate_enums)
|
||||
extern PFN_vkCmdSetFragmentShadingRateEnumNV vkCmdSetFragmentShadingRateEnumNV;
|
||||
#endif /* defined(VK_NV_fragment_shading_rate_enums) */
|
||||
#if defined(VK_NV_memory_decompression)
|
||||
extern PFN_vkCmdDecompressMemoryIndirectCountNV vkCmdDecompressMemoryIndirectCountNV;
|
||||
extern PFN_vkCmdDecompressMemoryNV vkCmdDecompressMemoryNV;
|
||||
#endif /* defined(VK_NV_memory_decompression) */
|
||||
#if defined(VK_NV_mesh_shader)
|
||||
extern PFN_vkCmdDrawMeshTasksIndirectCountNV vkCmdDrawMeshTasksIndirectCountNV;
|
||||
extern PFN_vkCmdDrawMeshTasksIndirectNV vkCmdDrawMeshTasksIndirectNV;
|
||||
|
@ -1679,6 +1719,9 @@ extern PFN_vkGetAccelerationStructureHandleNV vkGetAccelerationStructureHandleNV
|
|||
extern PFN_vkGetAccelerationStructureMemoryRequirementsNV vkGetAccelerationStructureMemoryRequirementsNV;
|
||||
extern PFN_vkGetRayTracingShaderGroupHandlesNV vkGetRayTracingShaderGroupHandlesNV;
|
||||
#endif /* defined(VK_NV_ray_tracing) */
|
||||
#if defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2
|
||||
extern PFN_vkCmdSetExclusiveScissorEnableNV vkCmdSetExclusiveScissorEnableNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) && VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION >= 2 */
|
||||
#if defined(VK_NV_scissor_exclusive)
|
||||
extern PFN_vkCmdSetExclusiveScissorNV vkCmdSetExclusiveScissorNV;
|
||||
#endif /* defined(VK_NV_scissor_exclusive) */
|
||||
|
@ -1699,9 +1742,66 @@ extern PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceSc
|
|||
extern PFN_vkGetDescriptorSetHostMappingVALVE vkGetDescriptorSetHostMappingVALVE;
|
||||
extern PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE vkGetDescriptorSetLayoutHostMappingInfoVALVE;
|
||||
#endif /* defined(VK_VALVE_descriptor_set_host_mapping) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object))
|
||||
extern PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
extern PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
extern PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
extern PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
extern PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
extern PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
extern PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
extern PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
extern PFN_vkCmdSetScissorWithCountEXT vkCmdSetScissorWithCountEXT;
|
||||
extern PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
extern PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
extern PFN_vkCmdSetViewportWithCountEXT vkCmdSetViewportWithCountEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object))
|
||||
extern PFN_vkCmdSetDepthBiasEnableEXT vkCmdSetDepthBiasEnableEXT;
|
||||
extern PFN_vkCmdSetLogicOpEXT vkCmdSetLogicOpEXT;
|
||||
extern PFN_vkCmdSetPatchControlPointsEXT vkCmdSetPatchControlPointsEXT;
|
||||
extern PFN_vkCmdSetPrimitiveRestartEnableEXT vkCmdSetPrimitiveRestartEnableEXT;
|
||||
extern PFN_vkCmdSetRasterizerDiscardEnableEXT vkCmdSetRasterizerDiscardEnableEXT;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state2)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object))
|
||||
extern PFN_vkCmdSetAlphaToCoverageEnableEXT vkCmdSetAlphaToCoverageEnableEXT;
|
||||
extern PFN_vkCmdSetAlphaToOneEnableEXT vkCmdSetAlphaToOneEnableEXT;
|
||||
extern PFN_vkCmdSetColorBlendAdvancedEXT vkCmdSetColorBlendAdvancedEXT;
|
||||
extern PFN_vkCmdSetColorBlendEnableEXT vkCmdSetColorBlendEnableEXT;
|
||||
extern PFN_vkCmdSetColorBlendEquationEXT vkCmdSetColorBlendEquationEXT;
|
||||
extern PFN_vkCmdSetColorWriteMaskEXT vkCmdSetColorWriteMaskEXT;
|
||||
extern PFN_vkCmdSetConservativeRasterizationModeEXT vkCmdSetConservativeRasterizationModeEXT;
|
||||
extern PFN_vkCmdSetCoverageModulationModeNV vkCmdSetCoverageModulationModeNV;
|
||||
extern PFN_vkCmdSetCoverageModulationTableEnableNV vkCmdSetCoverageModulationTableEnableNV;
|
||||
extern PFN_vkCmdSetCoverageModulationTableNV vkCmdSetCoverageModulationTableNV;
|
||||
extern PFN_vkCmdSetCoverageReductionModeNV vkCmdSetCoverageReductionModeNV;
|
||||
extern PFN_vkCmdSetCoverageToColorEnableNV vkCmdSetCoverageToColorEnableNV;
|
||||
extern PFN_vkCmdSetCoverageToColorLocationNV vkCmdSetCoverageToColorLocationNV;
|
||||
extern PFN_vkCmdSetDepthClampEnableEXT vkCmdSetDepthClampEnableEXT;
|
||||
extern PFN_vkCmdSetDepthClipEnableEXT vkCmdSetDepthClipEnableEXT;
|
||||
extern PFN_vkCmdSetDepthClipNegativeOneToOneEXT vkCmdSetDepthClipNegativeOneToOneEXT;
|
||||
extern PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT vkCmdSetExtraPrimitiveOverestimationSizeEXT;
|
||||
extern PFN_vkCmdSetLineRasterizationModeEXT vkCmdSetLineRasterizationModeEXT;
|
||||
extern PFN_vkCmdSetLineStippleEnableEXT vkCmdSetLineStippleEnableEXT;
|
||||
extern PFN_vkCmdSetLogicOpEnableEXT vkCmdSetLogicOpEnableEXT;
|
||||
extern PFN_vkCmdSetPolygonModeEXT vkCmdSetPolygonModeEXT;
|
||||
extern PFN_vkCmdSetProvokingVertexModeEXT vkCmdSetProvokingVertexModeEXT;
|
||||
extern PFN_vkCmdSetRasterizationSamplesEXT vkCmdSetRasterizationSamplesEXT;
|
||||
extern PFN_vkCmdSetRasterizationStreamEXT vkCmdSetRasterizationStreamEXT;
|
||||
extern PFN_vkCmdSetRepresentativeFragmentTestEnableNV vkCmdSetRepresentativeFragmentTestEnableNV;
|
||||
extern PFN_vkCmdSetSampleLocationsEnableEXT vkCmdSetSampleLocationsEnableEXT;
|
||||
extern PFN_vkCmdSetSampleMaskEXT vkCmdSetSampleMaskEXT;
|
||||
extern PFN_vkCmdSetShadingRateImageEnableNV vkCmdSetShadingRateImageEnableNV;
|
||||
extern PFN_vkCmdSetTessellationDomainOriginEXT vkCmdSetTessellationDomainOriginEXT;
|
||||
extern PFN_vkCmdSetViewportSwizzleNV vkCmdSetViewportSwizzleNV;
|
||||
extern PFN_vkCmdSetViewportWScalingEnableNV vkCmdSetViewportWScalingEnableNV;
|
||||
#endif /* (defined(VK_EXT_extended_dynamic_state3)) || (defined(VK_EXT_shader_object)) */
|
||||
#if (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1))
|
||||
extern PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT;
|
||||
#endif /* (defined(VK_EXT_full_screen_exclusive) && defined(VK_KHR_device_group)) || (defined(VK_EXT_full_screen_exclusive) && defined(VK_VERSION_1_1)) */
|
||||
#if (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state))
|
||||
extern PFN_vkCmdSetVertexInputEXT vkCmdSetVertexInputEXT;
|
||||
#endif /* (defined(VK_EXT_shader_object)) || (defined(VK_EXT_vertex_input_dynamic_state)) */
|
||||
#if (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template))
|
||||
extern PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR;
|
||||
#endif /* (defined(VK_KHR_descriptor_update_template) && defined(VK_KHR_push_descriptor)) || (defined(VK_KHR_push_descriptor) && defined(VK_VERSION_1_1)) || (defined(VK_KHR_push_descriptor) && defined(VK_KHR_descriptor_update_template)) */
|
||||
|
@ -1730,7 +1830,7 @@ extern PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR;
|
|||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2018-2022 Arseny Kapoulkine
|
||||
* Copyright (c) 2018-2023 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -20,11 +20,11 @@ extern "C" {
|
|||
|
||||
|
||||
#define vulkan_video_codec_h264std_decode 1
|
||||
// Vulkan 0.9 provisional Vulkan video H.264 decode std specification version number
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_8 VK_MAKE_VIDEO_STD_VERSION(0, 9, 8) // Patch version should always be set to 0
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_0_9_8
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_decode"
|
||||
|
||||
typedef enum StdVideoDecodeH264FieldOrderCount {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -21,9 +21,9 @@ extern "C" {
|
|||
|
||||
#define vulkan_video_codec_h264std_encode 1
|
||||
// Vulkan 0.9 provisional Vulkan video H.264 encode std specification version number
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_8 VK_MAKE_VIDEO_STD_VERSION(0, 9, 8) // Patch version should always be set to 0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_8
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_9
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode"
|
||||
typedef struct StdVideoEncodeH264WeightTableFlags {
|
||||
uint32_t luma_weight_l0_flag;
|
||||
|
@ -64,10 +64,10 @@ typedef struct StdVideoEncodeH264ReferenceInfoFlags {
|
|||
uint32_t used_for_long_term_reference : 1;
|
||||
} StdVideoEncodeH264ReferenceInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264RefMgmtFlags {
|
||||
uint32_t ref_pic_list_modification_l0_flag : 1;
|
||||
uint32_t ref_pic_list_modification_l1_flag : 1;
|
||||
} StdVideoEncodeH264RefMgmtFlags;
|
||||
typedef struct StdVideoEncodeH264ReferenceListsInfoFlags {
|
||||
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
||||
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
||||
} StdVideoEncodeH264ReferenceListsInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH264RefListModEntry {
|
||||
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
|
||||
|
@ -83,20 +83,26 @@ typedef struct StdVideoEncodeH264RefPicMarkingEntry {
|
|||
uint16_t max_long_term_frame_idx_plus1;
|
||||
} StdVideoEncodeH264RefPicMarkingEntry;
|
||||
|
||||
typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations {
|
||||
StdVideoEncodeH264RefMgmtFlags flags;
|
||||
typedef struct StdVideoEncodeH264ReferenceListsInfo {
|
||||
StdVideoEncodeH264ReferenceListsInfoFlags flags;
|
||||
uint8_t refPicList0EntryCount;
|
||||
uint8_t refPicList1EntryCount;
|
||||
uint8_t refList0ModOpCount;
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
||||
uint8_t refList1ModOpCount;
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
||||
uint8_t refPicMarkingOpCount;
|
||||
uint8_t reserved1[7];
|
||||
const uint8_t* pRefPicList0Entries;
|
||||
const uint8_t* pRefPicList1Entries;
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
||||
const StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
||||
const StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
|
||||
} StdVideoEncodeH264RefMemMgmtCtrlOperations;
|
||||
} StdVideoEncodeH264ReferenceListsInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH264PictureInfo {
|
||||
StdVideoEncodeH264PictureInfoFlags flags;
|
||||
uint8_t seq_parameter_set_id;
|
||||
uint8_t pic_parameter_set_id;
|
||||
uint16_t reserved1;
|
||||
StdVideoH264PictureType pictureType;
|
||||
uint32_t frame_num;
|
||||
int32_t PicOrderCnt;
|
||||
|
@ -104,6 +110,7 @@ typedef struct StdVideoEncodeH264PictureInfo {
|
|||
|
||||
typedef struct StdVideoEncodeH264ReferenceInfo {
|
||||
StdVideoEncodeH264ReferenceInfoFlags flags;
|
||||
StdVideoH264PictureType pictureType;
|
||||
uint32_t FrameNum;
|
||||
int32_t PicOrderCnt;
|
||||
uint16_t long_term_pic_num;
|
||||
|
@ -121,6 +128,8 @@ typedef struct StdVideoEncodeH264SliceHeader {
|
|||
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
|
||||
int8_t slice_alpha_c0_offset_div2;
|
||||
int8_t slice_beta_offset_div2;
|
||||
uint16_t reserved1;
|
||||
uint32_t reserved2;
|
||||
const StdVideoEncodeH264WeightTable* pWeightTable;
|
||||
} StdVideoEncodeH264SliceHeader;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -20,11 +20,11 @@ extern "C" {
|
|||
|
||||
|
||||
#define vulkan_video_codec_h265std_decode 1
|
||||
// Vulkan 0.9 provisional Vulkan video H.265 decode std specification version number
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9) // Patch version should always be set to 0
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
|
||||
|
||||
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_0_9_9
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_decode"
|
||||
typedef struct StdVideoDecodeH265PictureInfoFlags {
|
||||
uint32_t IrapPicFlag : 1;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -21,9 +21,9 @@ extern "C" {
|
|||
|
||||
#define vulkan_video_codec_h265std_encode 1
|
||||
// Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9 VK_MAKE_VIDEO_STD_VERSION(0, 9, 9) // Patch version should always be set to 0
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_10 VK_MAKE_VIDEO_STD_VERSION(0, 9, 10)
|
||||
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_9
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_10
|
||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode"
|
||||
typedef struct StdVideoEncodeH265WeightTableFlags {
|
||||
uint16_t luma_weight_l0_flag;
|
||||
|
@ -96,18 +96,21 @@ typedef struct StdVideoEncodeH265SliceSegmentHeader {
|
|||
const StdVideoEncodeH265WeightTable* pWeightTable;
|
||||
} StdVideoEncodeH265SliceSegmentHeader;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceModificationFlags {
|
||||
typedef struct StdVideoEncodeH265ReferenceListsInfoFlags {
|
||||
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
||||
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
||||
} StdVideoEncodeH265ReferenceModificationFlags;
|
||||
} StdVideoEncodeH265ReferenceListsInfoFlags;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceModifications {
|
||||
StdVideoEncodeH265ReferenceModificationFlags flags;
|
||||
uint8_t referenceList0ModificationsCount;
|
||||
const uint8_t* pReferenceList0Modifications;
|
||||
uint8_t referenceList1ModificationsCount;
|
||||
const uint8_t* pReferenceList1Modifications;
|
||||
} StdVideoEncodeH265ReferenceModifications;
|
||||
typedef struct StdVideoEncodeH265ReferenceListsInfo {
|
||||
StdVideoEncodeH265ReferenceListsInfoFlags flags;
|
||||
uint8_t num_ref_idx_l0_active_minus1;
|
||||
uint8_t num_ref_idx_l1_active_minus1;
|
||||
uint16_t reserved1;
|
||||
const uint8_t* pRefPicList0Entries;
|
||||
const uint8_t* pRefPicList1Entries;
|
||||
const uint8_t* pRefList0Modifications;
|
||||
const uint8_t* pRefList1Modifications;
|
||||
} StdVideoEncodeH265ReferenceListsInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH265PictureInfoFlags {
|
||||
uint32_t is_reference_flag : 1;
|
||||
|
@ -123,8 +126,8 @@ typedef struct StdVideoEncodeH265PictureInfo {
|
|||
uint8_t sps_video_parameter_set_id;
|
||||
uint8_t pps_seq_parameter_set_id;
|
||||
uint8_t pps_pic_parameter_set_id;
|
||||
int32_t PicOrderCntVal;
|
||||
uint8_t TemporalId;
|
||||
int32_t PicOrderCntVal;
|
||||
} StdVideoEncodeH265PictureInfo;
|
||||
|
||||
typedef struct StdVideoEncodeH265ReferenceInfoFlags {
|
||||
|
@ -134,6 +137,7 @@ typedef struct StdVideoEncodeH265ReferenceInfoFlags {
|
|||
|
||||
typedef struct StdVideoEncodeH265ReferenceInfo {
|
||||
StdVideoEncodeH265ReferenceInfoFlags flags;
|
||||
StdVideoH265PictureType PictureType;
|
||||
int32_t PicOrderCntVal;
|
||||
uint8_t TemporalId;
|
||||
} StdVideoEncodeH265ReferenceInfo;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// File: vk_icd.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
* Copyright (c) 2015-2023 LunarG, Inc.
|
||||
* Copyright (c) 2015-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2023 Valve Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,9 +19,7 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VKICD_H
|
||||
#define VKICD_H
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#include <stdbool.h>
|
||||
|
@ -42,7 +40,17 @@
|
|||
// call for any API version > 1.0. Otherwise, the loader will
|
||||
// manually determine if it can support the expected version.
|
||||
// Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices.
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 6
|
||||
// Version 7 - If an ICD supports any of the following functions, they must be
|
||||
// queryable with vk_icdGetInstanceProcAddr:
|
||||
// vk_icdNegotiateLoaderICDInterfaceVersion
|
||||
// vk_icdGetPhysicalDeviceProcAddr
|
||||
// vk_icdEnumerateAdapterPhysicalDevices (Windows only)
|
||||
// In addition, these functions no longer need to be exported directly.
|
||||
// This version allows drivers provided through the extension
|
||||
// VK_LUNARG_direct_driver_loading be able to support the entire
|
||||
// Driver-Loader interface.
|
||||
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 7
|
||||
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
|
||||
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
|
||||
|
||||
|
@ -70,7 +78,7 @@ extern "C" {
|
|||
#endif
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
|
||||
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName);
|
||||
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName);
|
||||
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName);
|
||||
#if defined(VK_USE_PLATFORM_WIN32_KHR)
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
|
||||
uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
|
||||
|
@ -123,6 +131,7 @@ typedef enum {
|
|||
VK_ICD_WSI_PLATFORM_VI,
|
||||
VK_ICD_WSI_PLATFORM_GGP,
|
||||
VK_ICD_WSI_PLATFORM_SCREEN,
|
||||
VK_ICD_WSI_PLATFORM_FUCHSIA,
|
||||
} VkIcdWsiPlatform;
|
||||
|
||||
typedef struct {
|
||||
|
@ -242,4 +251,8 @@ typedef struct {
|
|||
} VkIcdSurfaceScreen;
|
||||
#endif // VK_USE_PLATFORM_SCREEN_QNX
|
||||
|
||||
#endif // VKICD_H
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
} VkIcdSurfaceImagePipe;
|
||||
#endif // VK_USE_PLATFORM_FUCHSIA
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// File: vk_layer.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2017 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2017 Valve Corporation
|
||||
* Copyright (c) 2015-2017 LunarG, Inc.
|
||||
* Copyright (c) 2015-2023 LunarG, Inc.
|
||||
* Copyright (c) 2015-2023 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2023 Valve Corporation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -19,21 +19,14 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/* Need to define dispatch table
|
||||
* Core struct can then have ptr to dispatch table at the top
|
||||
* Along with object ptrs for current and next OBJ
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VK_LAYER_EXPORT
|
||||
#endif
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#define MAX_NUM_UNKNOWN_EXTS 250
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright 2014-2022 The Khronos Group Inc.
|
||||
** Copyright 2014-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -84,6 +84,14 @@
|
|||
#include "vulkan_screen.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_SCI
|
||||
#include <nvscisync.h>
|
||||
#include <nvscibuf.h>
|
||||
#include "vulkan_sci.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
#include "vulkan_beta.h"
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_BETA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
@ -19,356 +19,6 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
#define VK_KHR_video_queue 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionKHR)
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkVideoSessionParametersKHR)
|
||||
#define VK_KHR_VIDEO_QUEUE_SPEC_VERSION 7
|
||||
#define VK_KHR_VIDEO_QUEUE_EXTENSION_NAME "VK_KHR_video_queue"
|
||||
|
||||
typedef enum VkQueryResultStatusKHR {
|
||||
VK_QUERY_RESULT_STATUS_ERROR_KHR = -1,
|
||||
VK_QUERY_RESULT_STATUS_NOT_READY_KHR = 0,
|
||||
VK_QUERY_RESULT_STATUS_COMPLETE_KHR = 1,
|
||||
VK_QUERY_RESULT_STATUS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkQueryResultStatusKHR;
|
||||
|
||||
typedef enum VkVideoCodecOperationFlagBitsKHR {
|
||||
VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0,
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000,
|
||||
#endif
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 0x00020000,
|
||||
#endif
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 0x00000001,
|
||||
#endif
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT = 0x00000002,
|
||||
#endif
|
||||
VK_VIDEO_CODEC_OPERATION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoCodecOperationFlagBitsKHR;
|
||||
typedef VkFlags VkVideoCodecOperationFlagsKHR;
|
||||
|
||||
typedef enum VkVideoChromaSubsamplingFlagBitsKHR {
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0,
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 0x00000008,
|
||||
VK_VIDEO_CHROMA_SUBSAMPLING_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoChromaSubsamplingFlagBitsKHR;
|
||||
typedef VkFlags VkVideoChromaSubsamplingFlagsKHR;
|
||||
|
||||
typedef enum VkVideoComponentBitDepthFlagBitsKHR {
|
||||
VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0,
|
||||
VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 0x00000010,
|
||||
VK_VIDEO_COMPONENT_BIT_DEPTH_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoComponentBitDepthFlagBitsKHR;
|
||||
typedef VkFlags VkVideoComponentBitDepthFlagsKHR;
|
||||
|
||||
typedef enum VkVideoCapabilityFlagBitsKHR {
|
||||
VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoCapabilityFlagBitsKHR;
|
||||
typedef VkFlags VkVideoCapabilityFlagsKHR;
|
||||
|
||||
typedef enum VkVideoSessionCreateFlagBitsKHR {
|
||||
VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoSessionCreateFlagBitsKHR;
|
||||
typedef VkFlags VkVideoSessionCreateFlagsKHR;
|
||||
typedef VkFlags VkVideoSessionParametersCreateFlagsKHR;
|
||||
typedef VkFlags VkVideoBeginCodingFlagsKHR;
|
||||
typedef VkFlags VkVideoEndCodingFlagsKHR;
|
||||
|
||||
typedef enum VkVideoCodingControlFlagBitsKHR {
|
||||
VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001,
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002,
|
||||
#endif
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 0x00000004,
|
||||
#endif
|
||||
VK_VIDEO_CODING_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoCodingControlFlagBitsKHR;
|
||||
typedef VkFlags VkVideoCodingControlFlagsKHR;
|
||||
typedef struct VkQueueFamilyQueryResultStatusPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 queryResultStatusSupport;
|
||||
} VkQueueFamilyQueryResultStatusPropertiesKHR;
|
||||
|
||||
typedef struct VkQueueFamilyVideoPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoCodecOperationFlagsKHR videoCodecOperations;
|
||||
} VkQueueFamilyVideoPropertiesKHR;
|
||||
|
||||
typedef struct VkVideoProfileInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoCodecOperationFlagBitsKHR videoCodecOperation;
|
||||
VkVideoChromaSubsamplingFlagsKHR chromaSubsampling;
|
||||
VkVideoComponentBitDepthFlagsKHR lumaBitDepth;
|
||||
VkVideoComponentBitDepthFlagsKHR chromaBitDepth;
|
||||
} VkVideoProfileInfoKHR;
|
||||
|
||||
typedef struct VkVideoProfileListInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t profileCount;
|
||||
const VkVideoProfileInfoKHR* pProfiles;
|
||||
} VkVideoProfileListInfoKHR;
|
||||
|
||||
typedef struct VkVideoCapabilitiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoCapabilityFlagsKHR flags;
|
||||
VkDeviceSize minBitstreamBufferOffsetAlignment;
|
||||
VkDeviceSize minBitstreamBufferSizeAlignment;
|
||||
VkExtent2D pictureAccessGranularity;
|
||||
VkExtent2D minCodedExtent;
|
||||
VkExtent2D maxCodedExtent;
|
||||
uint32_t maxDpbSlots;
|
||||
uint32_t maxActiveReferencePictures;
|
||||
VkExtensionProperties stdHeaderVersion;
|
||||
} VkVideoCapabilitiesKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceVideoFormatInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImageUsageFlags imageUsage;
|
||||
} VkPhysicalDeviceVideoFormatInfoKHR;
|
||||
|
||||
typedef struct VkVideoFormatPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
VkComponentMapping componentMapping;
|
||||
VkImageCreateFlags imageCreateFlags;
|
||||
VkImageType imageType;
|
||||
VkImageTiling imageTiling;
|
||||
VkImageUsageFlags imageUsageFlags;
|
||||
} VkVideoFormatPropertiesKHR;
|
||||
|
||||
typedef struct VkVideoPictureResourceInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkOffset2D codedOffset;
|
||||
VkExtent2D codedExtent;
|
||||
uint32_t baseArrayLayer;
|
||||
VkImageView imageViewBinding;
|
||||
} VkVideoPictureResourceInfoKHR;
|
||||
|
||||
typedef struct VkVideoReferenceSlotInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
int32_t slotIndex;
|
||||
const VkVideoPictureResourceInfoKHR* pPictureResource;
|
||||
} VkVideoReferenceSlotInfoKHR;
|
||||
|
||||
typedef struct VkVideoSessionMemoryRequirementsKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryBindIndex;
|
||||
VkMemoryRequirements memoryRequirements;
|
||||
} VkVideoSessionMemoryRequirementsKHR;
|
||||
|
||||
typedef struct VkBindVideoSessionMemoryInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t memoryBindIndex;
|
||||
VkDeviceMemory memory;
|
||||
VkDeviceSize memoryOffset;
|
||||
VkDeviceSize memorySize;
|
||||
} VkBindVideoSessionMemoryInfoKHR;
|
||||
|
||||
typedef struct VkVideoSessionCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t queueFamilyIndex;
|
||||
VkVideoSessionCreateFlagsKHR flags;
|
||||
const VkVideoProfileInfoKHR* pVideoProfile;
|
||||
VkFormat pictureFormat;
|
||||
VkExtent2D maxCodedExtent;
|
||||
VkFormat referencePictureFormat;
|
||||
uint32_t maxDpbSlots;
|
||||
uint32_t maxActiveReferencePictures;
|
||||
const VkExtensionProperties* pStdHeaderVersion;
|
||||
} VkVideoSessionCreateInfoKHR;
|
||||
|
||||
typedef struct VkVideoSessionParametersCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoSessionParametersCreateFlagsKHR flags;
|
||||
VkVideoSessionParametersKHR videoSessionParametersTemplate;
|
||||
VkVideoSessionKHR videoSession;
|
||||
} VkVideoSessionParametersCreateInfoKHR;
|
||||
|
||||
typedef struct VkVideoSessionParametersUpdateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t updateSequenceCount;
|
||||
} VkVideoSessionParametersUpdateInfoKHR;
|
||||
|
||||
typedef struct VkVideoBeginCodingInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoBeginCodingFlagsKHR flags;
|
||||
VkVideoSessionKHR videoSession;
|
||||
VkVideoSessionParametersKHR videoSessionParameters;
|
||||
uint32_t referenceSlotCount;
|
||||
const VkVideoReferenceSlotInfoKHR* pReferenceSlots;
|
||||
} VkVideoBeginCodingInfoKHR;
|
||||
|
||||
typedef struct VkVideoEndCodingInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEndCodingFlagsKHR flags;
|
||||
} VkVideoEndCodingInfoKHR;
|
||||
|
||||
typedef struct VkVideoCodingControlInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoCodingControlFlagsKHR flags;
|
||||
} VkVideoCodingControlInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR)(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionKHR)(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionKHR)(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetVideoSessionMemoryRequirementsKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkBindVideoSessionMemoryKHR)(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateVideoSessionParametersKHR)(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkUpdateVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyVideoSessionParametersKHR)(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBeginVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdEndVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdControlVideoCodingKHR)(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoCapabilitiesKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkVideoProfileInfoKHR* pVideoProfile,
|
||||
VkVideoCapabilitiesKHR* pCapabilities);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoFormatPropertiesKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo,
|
||||
uint32_t* pVideoFormatPropertyCount,
|
||||
VkVideoFormatPropertiesKHR* pVideoFormatProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionKHR(
|
||||
VkDevice device,
|
||||
const VkVideoSessionCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkVideoSessionKHR* pVideoSession);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionKHR(
|
||||
VkDevice device,
|
||||
VkVideoSessionKHR videoSession,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetVideoSessionMemoryRequirementsKHR(
|
||||
VkDevice device,
|
||||
VkVideoSessionKHR videoSession,
|
||||
uint32_t* pMemoryRequirementsCount,
|
||||
VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkBindVideoSessionMemoryKHR(
|
||||
VkDevice device,
|
||||
VkVideoSessionKHR videoSession,
|
||||
uint32_t bindSessionMemoryInfoCount,
|
||||
const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionParametersKHR(
|
||||
VkDevice device,
|
||||
const VkVideoSessionParametersCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkVideoSessionParametersKHR* pVideoSessionParameters);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkUpdateVideoSessionParametersKHR(
|
||||
VkDevice device,
|
||||
VkVideoSessionParametersKHR videoSessionParameters,
|
||||
const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionParametersKHR(
|
||||
VkDevice device,
|
||||
VkVideoSessionParametersKHR videoSessionParameters,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBeginVideoCodingKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkVideoBeginCodingInfoKHR* pBeginInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdEndVideoCodingKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkVideoEndCodingInfoKHR* pEndCodingInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkVideoCodingControlInfoKHR* pCodingControlInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_video_decode_queue 1
|
||||
#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 6
|
||||
#define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue"
|
||||
|
||||
typedef enum VkVideoDecodeCapabilityFlagBitsKHR {
|
||||
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_DECODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoDecodeCapabilityFlagBitsKHR;
|
||||
typedef VkFlags VkVideoDecodeCapabilityFlagsKHR;
|
||||
|
||||
typedef enum VkVideoDecodeUsageFlagBitsKHR {
|
||||
VK_VIDEO_DECODE_USAGE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_DECODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoDecodeUsageFlagBitsKHR;
|
||||
typedef VkFlags VkVideoDecodeUsageFlagsKHR;
|
||||
typedef VkFlags VkVideoDecodeFlagsKHR;
|
||||
typedef struct VkVideoDecodeCapabilitiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoDecodeCapabilityFlagsKHR flags;
|
||||
} VkVideoDecodeCapabilitiesKHR;
|
||||
|
||||
typedef struct VkVideoDecodeUsageInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoDecodeUsageFlagsKHR videoUsageHints;
|
||||
} VkVideoDecodeUsageInfoKHR;
|
||||
|
||||
typedef struct VkVideoDecodeInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoDecodeFlagsKHR flags;
|
||||
VkBuffer srcBuffer;
|
||||
VkDeviceSize srcBufferOffset;
|
||||
VkDeviceSize srcBufferRange;
|
||||
VkVideoPictureResourceInfoKHR dstPictureResource;
|
||||
const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot;
|
||||
uint32_t referenceSlotCount;
|
||||
const VkVideoReferenceSlotInfoKHR* pReferenceSlots;
|
||||
} VkVideoDecodeInfoKHR;
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDecodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDecodeVideoKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkVideoDecodeInfoKHR* pDecodeInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_portability_subset 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
|
||||
|
@ -401,7 +51,7 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
|
|||
|
||||
|
||||
#define VK_KHR_video_encode_queue 1
|
||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 7
|
||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 8
|
||||
#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue"
|
||||
|
||||
typedef enum VkVideoEncodeTuningModeKHR {
|
||||
|
@ -421,13 +71,21 @@ typedef enum VkVideoEncodeCapabilityFlagBitsKHR {
|
|||
typedef VkFlags VkVideoEncodeCapabilityFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeRateControlModeFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 1,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 2,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004,
|
||||
VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeRateControlModeFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeFeedbackFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001,
|
||||
VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002,
|
||||
VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkVideoEncodeFeedbackFlagBitsKHR;
|
||||
typedef VkFlags VkVideoEncodeFeedbackFlagsKHR;
|
||||
|
||||
typedef enum VkVideoEncodeUsageFlagBitsKHR {
|
||||
VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0,
|
||||
VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001,
|
||||
|
@ -452,9 +110,9 @@ typedef struct VkVideoEncodeInfoKHR {
|
|||
const void* pNext;
|
||||
VkVideoEncodeFlagsKHR flags;
|
||||
uint32_t qualityLevel;
|
||||
VkBuffer dstBitstreamBuffer;
|
||||
VkDeviceSize dstBitstreamBufferOffset;
|
||||
VkDeviceSize dstBitstreamBufferMaxRange;
|
||||
VkBuffer dstBuffer;
|
||||
VkDeviceSize dstBufferOffset;
|
||||
VkDeviceSize dstBufferRange;
|
||||
VkVideoPictureResourceInfoKHR srcPictureResource;
|
||||
const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot;
|
||||
uint32_t referenceSlotCount;
|
||||
|
@ -467,11 +125,18 @@ typedef struct VkVideoEncodeCapabilitiesKHR {
|
|||
void* pNext;
|
||||
VkVideoEncodeCapabilityFlagsKHR flags;
|
||||
VkVideoEncodeRateControlModeFlagsKHR rateControlModes;
|
||||
uint8_t rateControlLayerCount;
|
||||
uint8_t qualityLevelCount;
|
||||
uint32_t maxRateControlLayers;
|
||||
uint32_t maxQualityLevels;
|
||||
VkExtent2D inputImageDataFillAlignment;
|
||||
VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags;
|
||||
} VkVideoEncodeCapabilitiesKHR;
|
||||
|
||||
typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags;
|
||||
} VkQueryPoolVideoEncodeFeedbackCreateInfoKHR;
|
||||
|
||||
typedef struct VkVideoEncodeUsageInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -483,8 +148,8 @@ typedef struct VkVideoEncodeUsageInfoKHR {
|
|||
typedef struct VkVideoEncodeRateControlLayerInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t averageBitrate;
|
||||
uint32_t maxBitrate;
|
||||
uint64_t averageBitrate;
|
||||
uint64_t maxBitrate;
|
||||
uint32_t frameRateNumerator;
|
||||
uint32_t frameRateDenominator;
|
||||
uint32_t virtualBufferSizeInMs;
|
||||
|
@ -496,8 +161,8 @@ typedef struct VkVideoEncodeRateControlInfoKHR {
|
|||
const void* pNext;
|
||||
VkVideoEncodeRateControlFlagsKHR flags;
|
||||
VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode;
|
||||
uint8_t layerCount;
|
||||
const VkVideoEncodeRateControlLayerInfoKHR* pLayerConfigs;
|
||||
uint32_t layerCount;
|
||||
const VkVideoEncodeRateControlLayerInfoKHR* pLayers;
|
||||
} VkVideoEncodeRateControlInfoKHR;
|
||||
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo);
|
||||
|
@ -512,7 +177,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(
|
|||
#define VK_EXT_video_encode_h264 1
|
||||
#include "vk_video/vulkan_video_codec_h264std.h"
|
||||
#include "vk_video/vulkan_video_codec_h264std_encode.h"
|
||||
#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 9
|
||||
#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 10
|
||||
#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264"
|
||||
|
||||
typedef enum VkVideoEncodeH264RateControlStructureEXT {
|
||||
|
@ -548,34 +213,17 @@ typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT {
|
|||
VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 0x00400000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x00800000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x01000000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x02000000,
|
||||
VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH264CapabilityFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH264InputModeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H264_INPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH264InputModeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH264InputModeFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH264OutputModeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH264OutputModeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH264OutputModeFlagsEXT;
|
||||
typedef struct VkVideoEncodeH264CapabilitiesEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoEncodeH264CapabilityFlagsEXT flags;
|
||||
VkVideoEncodeH264InputModeFlagsEXT inputModeFlags;
|
||||
VkVideoEncodeH264OutputModeFlagsEXT outputModeFlags;
|
||||
uint8_t maxPPictureL0ReferenceCount;
|
||||
uint8_t maxBPictureL0ReferenceCount;
|
||||
uint8_t maxL1ReferenceCount;
|
||||
uint32_t maxPPictureL0ReferenceCount;
|
||||
uint32_t maxBPictureL0ReferenceCount;
|
||||
uint32_t maxL1ReferenceCount;
|
||||
VkBool32 motionVectorsOverPicBoundariesFlag;
|
||||
uint32_t maxBytesPerPicDenom;
|
||||
uint32_t maxBitsPerMbDenom;
|
||||
|
@ -600,48 +248,28 @@ typedef struct VkVideoEncodeH264SessionParametersCreateInfoEXT {
|
|||
const VkVideoEncodeH264SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoEncodeH264SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
int8_t slotIndex;
|
||||
const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH264DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264ReferenceListsInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t referenceList0EntryCount;
|
||||
const VkVideoEncodeH264DpbSlotInfoEXT* pReferenceList0Entries;
|
||||
uint8_t referenceList1EntryCount;
|
||||
const VkVideoEncodeH264DpbSlotInfoEXT* pReferenceList1Entries;
|
||||
const StdVideoEncodeH264RefMemMgmtCtrlOperations* pMemMgmtCtrlOperations;
|
||||
} VkVideoEncodeH264ReferenceListsInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264NaluSliceInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t mbCount;
|
||||
const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists;
|
||||
const StdVideoEncodeH264SliceHeader* pSliceHeaderStd;
|
||||
const StdVideoEncodeH264ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
const StdVideoEncodeH264SliceHeader* pStdSliceHeader;
|
||||
} VkVideoEncodeH264NaluSliceInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264VclFrameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const VkVideoEncodeH264ReferenceListsInfoEXT* pReferenceFinalLists;
|
||||
const StdVideoEncodeH264ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
uint32_t naluSliceEntryCount;
|
||||
const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries;
|
||||
const StdVideoEncodeH264PictureInfo* pCurrentPictureInfo;
|
||||
const StdVideoEncodeH264PictureInfo* pStdPictureInfo;
|
||||
} VkVideoEncodeH264VclFrameInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264EmitPictureParametersInfoEXT {
|
||||
typedef struct VkVideoEncodeH264DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t spsId;
|
||||
VkBool32 emitSpsEnable;
|
||||
uint32_t ppsIdEntryCount;
|
||||
const uint8_t* ppsIdEntries;
|
||||
} VkVideoEncodeH264EmitPictureParametersInfoEXT;
|
||||
const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH264DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
|
@ -656,7 +284,7 @@ typedef struct VkVideoEncodeH264RateControlInfoEXT {
|
|||
uint32_t idrPeriod;
|
||||
uint32_t consecutiveBFrameCount;
|
||||
VkVideoEncodeH264RateControlStructureEXT rateControlStructure;
|
||||
uint8_t temporalLayerCount;
|
||||
uint32_t temporalLayerCount;
|
||||
} VkVideoEncodeH264RateControlInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH264QpEXT {
|
||||
|
@ -674,7 +302,7 @@ typedef struct VkVideoEncodeH264FrameSizeEXT {
|
|||
typedef struct VkVideoEncodeH264RateControlLayerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t temporalLayerId;
|
||||
uint32_t temporalLayerId;
|
||||
VkBool32 useInitialRcQp;
|
||||
VkVideoEncodeH264QpEXT initialRcQp;
|
||||
VkBool32 useMinQp;
|
||||
|
@ -690,7 +318,7 @@ typedef struct VkVideoEncodeH264RateControlLayerInfoEXT {
|
|||
#define VK_EXT_video_encode_h265 1
|
||||
#include "vk_video/vulkan_video_codec_h265std.h"
|
||||
#include "vk_video/vulkan_video_codec_h265std_encode.h"
|
||||
#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 9
|
||||
#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 10
|
||||
#define VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_EXT_video_encode_h265"
|
||||
|
||||
typedef enum VkVideoEncodeH265RateControlStructureEXT {
|
||||
|
@ -727,26 +355,11 @@ typedef enum VkVideoEncodeH265CapabilityFlagBitsEXT {
|
|||
VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 0x00800000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x01000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x02000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x04000000,
|
||||
VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265CapabilityFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265InputModeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H265_INPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265InputModeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265InputModeFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265OutputModeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT = 0x00000004,
|
||||
VK_VIDEO_ENCODE_H265_OUTPUT_MODE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoEncodeH265OutputModeFlagBitsEXT;
|
||||
typedef VkFlags VkVideoEncodeH265OutputModeFlagsEXT;
|
||||
|
||||
typedef enum VkVideoEncodeH265CtbSizeFlagBitsEXT {
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 0x00000002,
|
||||
|
@ -767,25 +380,23 @@ typedef struct VkVideoEncodeH265CapabilitiesEXT {
|
|||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkVideoEncodeH265CapabilityFlagsEXT flags;
|
||||
VkVideoEncodeH265InputModeFlagsEXT inputModeFlags;
|
||||
VkVideoEncodeH265OutputModeFlagsEXT outputModeFlags;
|
||||
VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes;
|
||||
VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes;
|
||||
uint8_t maxPPictureL0ReferenceCount;
|
||||
uint8_t maxBPictureL0ReferenceCount;
|
||||
uint8_t maxL1ReferenceCount;
|
||||
uint8_t maxSubLayersCount;
|
||||
uint8_t minLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint8_t maxLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint8_t minLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint8_t maxLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint8_t minMaxTransformHierarchyDepthInter;
|
||||
uint8_t maxMaxTransformHierarchyDepthInter;
|
||||
uint8_t minMaxTransformHierarchyDepthIntra;
|
||||
uint8_t maxMaxTransformHierarchyDepthIntra;
|
||||
uint8_t maxDiffCuQpDeltaDepth;
|
||||
uint8_t minMaxNumMergeCand;
|
||||
uint8_t maxMaxNumMergeCand;
|
||||
uint32_t maxPPictureL0ReferenceCount;
|
||||
uint32_t maxBPictureL0ReferenceCount;
|
||||
uint32_t maxL1ReferenceCount;
|
||||
uint32_t maxSubLayersCount;
|
||||
uint32_t minLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint32_t maxLog2MinLumaCodingBlockSizeMinus3;
|
||||
uint32_t minLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint32_t maxLog2MinLumaTransformBlockSizeMinus2;
|
||||
uint32_t minMaxTransformHierarchyDepthInter;
|
||||
uint32_t maxMaxTransformHierarchyDepthInter;
|
||||
uint32_t minMaxTransformHierarchyDepthIntra;
|
||||
uint32_t maxMaxTransformHierarchyDepthIntra;
|
||||
uint32_t maxDiffCuQpDeltaDepth;
|
||||
uint32_t minMaxNumMergeCand;
|
||||
uint32_t maxMaxNumMergeCand;
|
||||
} VkVideoEncodeH265CapabilitiesEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265SessionParametersAddInfoEXT {
|
||||
|
@ -808,50 +419,28 @@ typedef struct VkVideoEncodeH265SessionParametersCreateInfoEXT {
|
|||
const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoEncodeH265SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
int8_t slotIndex;
|
||||
const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH265DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265ReferenceListsInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t referenceList0EntryCount;
|
||||
const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList0Entries;
|
||||
uint8_t referenceList1EntryCount;
|
||||
const VkVideoEncodeH265DpbSlotInfoEXT* pReferenceList1Entries;
|
||||
const StdVideoEncodeH265ReferenceModifications* pReferenceModifications;
|
||||
} VkVideoEncodeH265ReferenceListsInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265NaluSliceSegmentInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t ctbCount;
|
||||
const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists;
|
||||
const StdVideoEncodeH265SliceSegmentHeader* pSliceSegmentHeaderStd;
|
||||
const StdVideoEncodeH265ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader;
|
||||
} VkVideoEncodeH265NaluSliceSegmentInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265VclFrameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const VkVideoEncodeH265ReferenceListsInfoEXT* pReferenceFinalLists;
|
||||
const StdVideoEncodeH265ReferenceListsInfo* pStdReferenceFinalLists;
|
||||
uint32_t naluSliceSegmentEntryCount;
|
||||
const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries;
|
||||
const StdVideoEncodeH265PictureInfo* pCurrentPictureInfo;
|
||||
const StdVideoEncodeH265PictureInfo* pStdPictureInfo;
|
||||
} VkVideoEncodeH265VclFrameInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265EmitPictureParametersInfoEXT {
|
||||
typedef struct VkVideoEncodeH265DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t vpsId;
|
||||
uint8_t spsId;
|
||||
VkBool32 emitVpsEnable;
|
||||
VkBool32 emitSpsEnable;
|
||||
uint32_t ppsIdEntryCount;
|
||||
const uint8_t* ppsIdEntries;
|
||||
} VkVideoEncodeH265EmitPictureParametersInfoEXT;
|
||||
const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoEncodeH265DpbSlotInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
|
@ -866,7 +455,7 @@ typedef struct VkVideoEncodeH265RateControlInfoEXT {
|
|||
uint32_t idrPeriod;
|
||||
uint32_t consecutiveBFrameCount;
|
||||
VkVideoEncodeH265RateControlStructureEXT rateControlStructure;
|
||||
uint8_t subLayerCount;
|
||||
uint32_t subLayerCount;
|
||||
} VkVideoEncodeH265RateControlInfoEXT;
|
||||
|
||||
typedef struct VkVideoEncodeH265QpEXT {
|
||||
|
@ -884,7 +473,7 @@ typedef struct VkVideoEncodeH265FrameSizeEXT {
|
|||
typedef struct VkVideoEncodeH265RateControlLayerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint8_t temporalId;
|
||||
uint32_t temporalId;
|
||||
VkBool32 useInitialRcQp;
|
||||
VkVideoEncodeH265QpEXT initialRcQp;
|
||||
VkBool32 useMinQp;
|
||||
|
@ -897,114 +486,48 @@ typedef struct VkVideoEncodeH265RateControlLayerInfoEXT {
|
|||
|
||||
|
||||
|
||||
#define VK_EXT_video_decode_h264 1
|
||||
#include "vk_video/vulkan_video_codec_h264std_decode.h"
|
||||
#define VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION 7
|
||||
#define VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME "VK_EXT_video_decode_h264"
|
||||
#define VK_NV_displacement_micromap 1
|
||||
#define VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION 1
|
||||
#define VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME "VK_NV_displacement_micromap"
|
||||
|
||||
typedef enum VkVideoDecodeH264PictureLayoutFlagBitsEXT {
|
||||
VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT = 0,
|
||||
VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT = 0x00000001,
|
||||
VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT = 0x00000002,
|
||||
VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkVideoDecodeH264PictureLayoutFlagBitsEXT;
|
||||
typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsEXT;
|
||||
typedef struct VkVideoDecodeH264ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
StdVideoH264ProfileIdc stdProfileIdc;
|
||||
VkVideoDecodeH264PictureLayoutFlagBitsEXT pictureLayout;
|
||||
} VkVideoDecodeH264ProfileInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH264CapabilitiesEXT {
|
||||
typedef enum VkDisplacementMicromapFormatNV {
|
||||
VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1,
|
||||
VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2,
|
||||
VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3,
|
||||
VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV = 0x7FFFFFFF
|
||||
} VkDisplacementMicromapFormatNV;
|
||||
typedef struct VkPhysicalDeviceDisplacementMicromapFeaturesNV {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
StdVideoH264LevelIdc maxLevelIdc;
|
||||
VkOffset2D fieldOffsetGranularity;
|
||||
} VkVideoDecodeH264CapabilitiesEXT;
|
||||
VkBool32 displacementMicromap;
|
||||
} VkPhysicalDeviceDisplacementMicromapFeaturesNV;
|
||||
|
||||
typedef struct VkVideoDecodeH264SessionParametersAddInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t stdSPSCount;
|
||||
const StdVideoH264SequenceParameterSet* pStdSPSs;
|
||||
uint32_t stdPPSCount;
|
||||
const StdVideoH264PictureParameterSet* pStdPPSs;
|
||||
} VkVideoDecodeH264SessionParametersAddInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH264SessionParametersCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxStdSPSCount;
|
||||
uint32_t maxStdPPSCount;
|
||||
const VkVideoDecodeH264SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoDecodeH264SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH264PictureInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoDecodeH264PictureInfo* pStdPictureInfo;
|
||||
uint32_t sliceCount;
|
||||
const uint32_t* pSliceOffsets;
|
||||
} VkVideoDecodeH264PictureInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH264DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoDecodeH264ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoDecodeH264DpbSlotInfoEXT;
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_video_decode_h265 1
|
||||
#include "vk_video/vulkan_video_codec_h265std_decode.h"
|
||||
#define VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION 5
|
||||
#define VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME "VK_EXT_video_decode_h265"
|
||||
typedef struct VkVideoDecodeH265ProfileInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
StdVideoH265ProfileIdc stdProfileIdc;
|
||||
} VkVideoDecodeH265ProfileInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH265CapabilitiesEXT {
|
||||
typedef struct VkPhysicalDeviceDisplacementMicromapPropertiesNV {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
StdVideoH265LevelIdc maxLevelIdc;
|
||||
} VkVideoDecodeH265CapabilitiesEXT;
|
||||
uint32_t maxDisplacementMicromapSubdivisionLevel;
|
||||
} VkPhysicalDeviceDisplacementMicromapPropertiesNV;
|
||||
|
||||
typedef struct VkVideoDecodeH265SessionParametersAddInfoEXT {
|
||||
typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t stdVPSCount;
|
||||
const StdVideoH265VideoParameterSet* pStdVPSs;
|
||||
uint32_t stdSPSCount;
|
||||
const StdVideoH265SequenceParameterSet* pStdSPSs;
|
||||
uint32_t stdPPSCount;
|
||||
const StdVideoH265PictureParameterSet* pStdPPSs;
|
||||
} VkVideoDecodeH265SessionParametersAddInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH265SessionParametersCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxStdVPSCount;
|
||||
uint32_t maxStdSPSCount;
|
||||
uint32_t maxStdPPSCount;
|
||||
const VkVideoDecodeH265SessionParametersAddInfoEXT* pParametersAddInfo;
|
||||
} VkVideoDecodeH265SessionParametersCreateInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH265PictureInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
StdVideoDecodeH265PictureInfo* pStdPictureInfo;
|
||||
uint32_t sliceCount;
|
||||
const uint32_t* pSliceOffsets;
|
||||
} VkVideoDecodeH265PictureInfoEXT;
|
||||
|
||||
typedef struct VkVideoDecodeH265DpbSlotInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const StdVideoDecodeH265ReferenceInfo* pStdReferenceInfo;
|
||||
} VkVideoDecodeH265DpbSlotInfoEXT;
|
||||
void* pNext;
|
||||
VkFormat displacementBiasAndScaleFormat;
|
||||
VkFormat displacementVectorFormat;
|
||||
VkDeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer;
|
||||
VkDeviceSize displacementBiasAndScaleStride;
|
||||
VkDeviceOrHostAddressConstKHR displacementVectorBuffer;
|
||||
VkDeviceSize displacementVectorStride;
|
||||
VkDeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags;
|
||||
VkDeviceSize displacedMicromapPrimitiveFlagsStride;
|
||||
VkIndexType indexType;
|
||||
VkDeviceOrHostAddressConstKHR indexBuffer;
|
||||
VkDeviceSize indexStride;
|
||||
uint32_t baseTriangle;
|
||||
uint32_t usageCountsCount;
|
||||
const VkMicromapUsageEXT* pUsageCounts;
|
||||
const VkMicromapUsageEXT* const* ppUsageCounts;
|
||||
VkMicromapEXT micromap;
|
||||
} VkAccelerationStructureTrianglesDisplacementMicromapNV;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_DIRECTFB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_GGP_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2015-2022 The Khronos Group Inc.
|
||||
** Copyright 2015-2023 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue