mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Updated glslang.
This commit is contained in:
6
3rdparty/glslang/SPIRV/GlslangToSpv.cpp
vendored
6
3rdparty/glslang/SPIRV/GlslangToSpv.cpp
vendored
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Copyright (C) 2014-2016 LunarG, Inc.
|
||||
// Copyright (C) 2015-2020 Google, Inc.
|
||||
// Copyright (C) 2017, 2022-2024 Arm Limited.
|
||||
// Copyright (C) 2017, 2022-2025 Arm Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
@@ -1913,6 +1913,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
||||
case EShLangCallable:
|
||||
{
|
||||
auto& extensions = glslangIntermediate->getRequestedExtensions();
|
||||
if (extensions.find("GL_EXT_opacity_micromap") != extensions.end()) {
|
||||
builder.addCapability(spv::CapabilityRayTracingOpacityMicromapEXT);
|
||||
builder.addExtension("SPV_EXT_opacity_micromap");
|
||||
}
|
||||
if (extensions.find("GL_NV_ray_tracing") == extensions.end()) {
|
||||
builder.addCapability(spv::CapabilityRayTracingKHR);
|
||||
builder.addExtension("SPV_KHR_ray_tracing");
|
||||
|
||||
3
3rdparty/glslang/SPIRV/doc.cpp
vendored
3
3rdparty/glslang/SPIRV/doc.cpp
vendored
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (C) 2014-2015 LunarG, Inc.
|
||||
// Copyright (C) 2022-2024 Arm Limited.
|
||||
// Copyright (C) 2022-2025 Arm Limited.
|
||||
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// All rights reserved.
|
||||
@@ -1009,6 +1009,7 @@ const char* CapabilityString(int info)
|
||||
case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR";
|
||||
case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR";
|
||||
case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV";
|
||||
case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT";
|
||||
case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV";
|
||||
case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR";
|
||||
case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV";
|
||||
|
||||
1
3rdparty/glslang/StandAlone/StandAlone.cpp
vendored
1
3rdparty/glslang/StandAlone/StandAlone.cpp
vendored
@@ -56,6 +56,7 @@
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
2
3rdparty/glslang/StandAlone/spirv-remap.cpp
vendored
2
3rdparty/glslang/StandAlone/spirv-remap.cpp
vendored
@@ -182,7 +182,7 @@ namespace {
|
||||
std::cout << " " << basename(name) << " [--version | -V]" << std::endl;
|
||||
std::cout << " " << basename(name) << " [--help | -?]" << std::endl;
|
||||
|
||||
exit(5);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// grind through each SPIR in turn
|
||||
|
||||
2
3rdparty/glslang/build_info.h
vendored
2
3rdparty/glslang/build_info.h
vendored
@@ -35,7 +35,7 @@
|
||||
#define GLSLANG_BUILD_INFO
|
||||
|
||||
#define GLSLANG_VERSION_MAJOR 15
|
||||
#define GLSLANG_VERSION_MINOR 1
|
||||
#define GLSLANG_VERSION_MINOR 2
|
||||
#define GLSLANG_VERSION_PATCH 0
|
||||
#define GLSLANG_VERSION_FLAVOR ""
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "propagateNoContraction.h"
|
||||
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
@@ -1517,7 +1517,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
||||
!result->getAsTyped()->getType().isParameterized()) {
|
||||
if (auto unaryNode = result->getAsUnaryNode())
|
||||
result->setType(unaryNode->getOperand()->getAsTyped()->getType());
|
||||
else
|
||||
else
|
||||
result->setType(result->getAsAggregate()->getSequence()[0]->getAsTyped()->getType());
|
||||
}
|
||||
}
|
||||
@@ -1573,7 +1573,7 @@ void TParseContext::handleCoopMat2FunctionCall(const TSourceLoc& loc, const TFun
|
||||
error(loc, "coordinate parameters must be uint32_t", param->getAsSymbolNode()->getMangledName().c_str(), "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// error checking reduce function has matching parameters
|
||||
if (fnCandidate->getBuiltInOp() == EOpCooperativeMatrixReduceNV) {
|
||||
const TFunction* combineOp = symbolTable.find(param->getAsSymbolNode()->getMangledName())->getAsFunction();
|
||||
@@ -2103,7 +2103,8 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct
|
||||
// Will there be any output conversions?
|
||||
bool outputConversions = false;
|
||||
for (int i = 0; i < function.getParamCount(); ++i) {
|
||||
if (*function[i].type != arguments[i]->getAsTyped()->getType() && function[i].type->getQualifier().isParamOutput()) {
|
||||
if (*function[i].type != arguments[i]->getAsTyped()->getType() && function[i].type->getQualifier().isParamOutput() &&
|
||||
!function[i].type->isCoopMat()) {
|
||||
outputConversions = true;
|
||||
break;
|
||||
}
|
||||
@@ -2147,13 +2148,6 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct
|
||||
}
|
||||
TVariable* tempArg = makeInternalVariable("tempArg", paramType);
|
||||
tempArg->getWritableType().getQualifier().makeTemporary();
|
||||
if (function[i].type->getQualifier().isParamInput()) {
|
||||
// If the parameter is also an input, copy-in.
|
||||
TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc());
|
||||
TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, tempArgNode, intermediate.addSymbol(*arguments[i]->getAsTyped()->getAsSymbolNode()), arguments[i]->getLoc());
|
||||
conversionTree = intermediate.mergeAggregate(tempAssign, conversionTree, intermNode.getLoc());
|
||||
}
|
||||
|
||||
TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, intermNode.getLoc());
|
||||
TIntermTyped* tempAssign = intermediate.addAssign(EOpAssign, arguments[i]->getAsTyped(), tempArgNode, arguments[i]->getLoc());
|
||||
conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc());
|
||||
@@ -7061,6 +7055,15 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
error(loc, "Push constants blocks can't be an array", "push_constant", "");
|
||||
}
|
||||
|
||||
if (type.getBasicType() == EbtReference) {
|
||||
if (qualifier.isPipeInput())
|
||||
error(loc, "cannot contain any structs with buffer_reference.", "in",
|
||||
"If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead.");
|
||||
if (qualifier.isPipeOutput())
|
||||
error(loc, "cannot contain any structs with buffer_reference.", "out",
|
||||
"If you want to interface shader stages with a buffer_reference cast to a uint64 or uvec2 instead.");
|
||||
}
|
||||
|
||||
if (qualifier.hasBufferReference() && type.getBasicType() != EbtBlock)
|
||||
error(loc, "can only be used with a block", "buffer_reference", "");
|
||||
|
||||
@@ -7070,7 +7073,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(), "");
|
||||
error(loc, "cannot 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 {
|
||||
@@ -10311,7 +10315,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
||||
|
||||
if (publicType.shaderQualifiers.layoutPrimitiveCulling) {
|
||||
if (publicType.qualifier.storage != EvqTemporary)
|
||||
error(loc, "layout qualifier can not have storage qualifiers", "primitive_culling","", "");
|
||||
error(loc, "layout qualifier cannot have storage qualifiers", "primitive_culling", "", "");
|
||||
else {
|
||||
intermediate.setLayoutPrimitiveCulling();
|
||||
}
|
||||
|
||||
@@ -1108,9 +1108,13 @@ int TScanContext::tokenizeIdentifier()
|
||||
reservedWord();
|
||||
return keyword;
|
||||
case NONTEMPORAL:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
(parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword)))
|
||||
if (parseContext.symbolTable.atBuiltInLevel())
|
||||
return keyword;
|
||||
if (parseContext.extensionTurnedOn(E_GL_EXT_nontemporal_keyword)) {
|
||||
if (!parseContext.intermediate.usingVulkanMemoryModel())
|
||||
parseContext.warn(loc, "Nontemporal without the Vulkan Memory Model is ignored", tokenText, "");
|
||||
return keyword;
|
||||
}
|
||||
return identifierOrType();
|
||||
case PATCH:
|
||||
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||
|
||||
20
3rdparty/glslang/glslang/stub.cpp
vendored
20
3rdparty/glslang/glslang/stub.cpp
vendored
@@ -32,6 +32,20 @@
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
// This empty source file exists to support building stubbed versions of
|
||||
// deprecated libraries which have been integrated into the main glslang
|
||||
// library. It should be deleted once the stub libraries are fully removed.
|
||||
#ifdef GLSLANG_IS_SHARED_LIBRARY
|
||||
#ifdef _WIN32
|
||||
#ifdef GLSLANG_EXPORTING
|
||||
#define STUB_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define STUB_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#endif // GLSLANG_IS_SHARED_LIBRARY
|
||||
|
||||
#ifndef STUB_EXPORT
|
||||
#define STUB_EXPORT
|
||||
#endif
|
||||
|
||||
// Force stub library to export function to preserve backcompat.
|
||||
// https://github.com/KhronosGroup/glslang/issues/3882
|
||||
STUB_EXPORT int stub_library_function() { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user