Merge branch 'KhronosGroup:master' into master
This commit is contained in:
commit
8a5c5e8210
@ -77,8 +77,11 @@ after_test:
|
|||||||
bin\glslangValidator.exe
|
bin\glslangValidator.exe
|
||||||
bin\spirv-remap.exe
|
bin\spirv-remap.exe
|
||||||
include\glslang\*
|
include\glslang\*
|
||||||
|
lib\GenericCodeGen%SUFFIX%.lib
|
||||||
lib\glslang%SUFFIX%.lib
|
lib\glslang%SUFFIX%.lib
|
||||||
|
lib\glslang-default-resource-limits%SUFFIX%.lib
|
||||||
lib\HLSL%SUFFIX%.lib
|
lib\HLSL%SUFFIX%.lib
|
||||||
|
lib\MachineIndependent%SUFFIX%.lib
|
||||||
lib\OGLCompiler%SUFFIX%.lib
|
lib\OGLCompiler%SUFFIX%.lib
|
||||||
lib\OSDependent%SUFFIX%.lib
|
lib\OSDependent%SUFFIX%.lib
|
||||||
lib\SPIRV%SUFFIX%.lib
|
lib\SPIRV%SUFFIX%.lib
|
||||||
|
@ -109,8 +109,11 @@ after_success:
|
|||||||
zip ${TARBALL}
|
zip ${TARBALL}
|
||||||
bin/glslangValidator
|
bin/glslangValidator
|
||||||
include/glslang/*
|
include/glslang/*
|
||||||
|
lib/libGenericCodeGen${SUFFIX}.a
|
||||||
lib/libglslang${SUFFIX}.a
|
lib/libglslang${SUFFIX}.a
|
||||||
|
lib/libglslang-default-resource-limits${SUFFIX}.a
|
||||||
lib/libHLSL${SUFFIX}.a
|
lib/libHLSL${SUFFIX}.a
|
||||||
|
lib/libMachineIndependent${SUFFIX}.a
|
||||||
lib/libOGLCompiler${SUFFIX}.a
|
lib/libOGLCompiler${SUFFIX}.a
|
||||||
lib/libOSDependent${SUFFIX}.a
|
lib/libOSDependent${SUFFIX}.a
|
||||||
lib/libSPIRV${SUFFIX}.a
|
lib/libSPIRV${SUFFIX}.a
|
||||||
|
@ -125,6 +125,7 @@ LOCAL_SRC_FILES:= \
|
|||||||
glslang/MachineIndependent/RemoveTree.cpp \
|
glslang/MachineIndependent/RemoveTree.cpp \
|
||||||
glslang/MachineIndependent/Scan.cpp \
|
glslang/MachineIndependent/Scan.cpp \
|
||||||
glslang/MachineIndependent/ShaderLang.cpp \
|
glslang/MachineIndependent/ShaderLang.cpp \
|
||||||
|
glslang/MachineIndependent/SpirvIntrinsics.cpp \
|
||||||
glslang/MachineIndependent/SymbolTable.cpp \
|
glslang/MachineIndependent/SymbolTable.cpp \
|
||||||
glslang/MachineIndependent/Versions.cpp \
|
glslang/MachineIndependent/Versions.cpp \
|
||||||
glslang/MachineIndependent/preprocessor/PpAtom.cpp \
|
glslang/MachineIndependent/preprocessor/PpAtom.cpp \
|
||||||
|
2
BUILD.gn
2
BUILD.gn
@ -131,6 +131,7 @@ template("glslang_sources_common") {
|
|||||||
"glslang/Include/PoolAlloc.h",
|
"glslang/Include/PoolAlloc.h",
|
||||||
"glslang/Include/ResourceLimits.h",
|
"glslang/Include/ResourceLimits.h",
|
||||||
"glslang/Include/ShHandle.h",
|
"glslang/Include/ShHandle.h",
|
||||||
|
"glslang/Include/SpirvIntrinsics.h",
|
||||||
"glslang/Include/Types.h",
|
"glslang/Include/Types.h",
|
||||||
"glslang/Include/arrays.h",
|
"glslang/Include/arrays.h",
|
||||||
"glslang/Include/intermediate.h",
|
"glslang/Include/intermediate.h",
|
||||||
@ -151,6 +152,7 @@ template("glslang_sources_common") {
|
|||||||
"glslang/MachineIndependent/Scan.h",
|
"glslang/MachineIndependent/Scan.h",
|
||||||
"glslang/MachineIndependent/ScanContext.h",
|
"glslang/MachineIndependent/ScanContext.h",
|
||||||
"glslang/MachineIndependent/ShaderLang.cpp",
|
"glslang/MachineIndependent/ShaderLang.cpp",
|
||||||
|
"glslang/MachineIndependent/SpirvIntrinsics.cpp",
|
||||||
"glslang/MachineIndependent/SymbolTable.cpp",
|
"glslang/MachineIndependent/SymbolTable.cpp",
|
||||||
"glslang/MachineIndependent/SymbolTable.h",
|
"glslang/MachineIndependent/SymbolTable.h",
|
||||||
"glslang/MachineIndependent/Versions.cpp",
|
"glslang/MachineIndependent/Versions.cpp",
|
||||||
|
12
CHANGES.md
12
CHANGES.md
@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
|
## 11.5.0 2021-06-23
|
||||||
|
|
||||||
|
### Other changes
|
||||||
|
* Implement GLSL_EXT_shader_atomic_float2
|
||||||
|
* Implement GL_EXT_spirv_intrinsics
|
||||||
|
* Fixed SPIR-V remapper not remapping OpExtInst instruction set IDs
|
||||||
|
* only declare compatibility gl_ variables in compatibility mode
|
||||||
|
* Add support for float spec const vector initialization
|
||||||
|
* Implement GL_EXT_subgroup_uniform_control_flow.
|
||||||
|
* Fix arrays dimensioned with spec constant sized gl_WorkGroupSize
|
||||||
|
* Add support for 64bit integer scalar and vector types to bitCount() builtin
|
||||||
|
|
||||||
## 11.4.0 2021-04-22
|
## 11.4.0 2021-04-22
|
||||||
|
|
||||||
### Other changes
|
### Other changes
|
||||||
|
@ -36,6 +36,8 @@ static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fu
|
|||||||
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
|
static const char* const E_SPV_EXT_fragment_invocation_density = "SPV_EXT_fragment_invocation_density";
|
||||||
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
|
static const char* const E_SPV_EXT_demote_to_helper_invocation = "SPV_EXT_demote_to_helper_invocation";
|
||||||
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
|
static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_atomic_float_add";
|
||||||
|
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_image_int64 = "SPV_EXT_shader_image_int64";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextEXT_H
|
#endif // #ifndef GLSLextEXT_H
|
||||||
|
@ -51,5 +51,6 @@ static const char* const E_SPV_KHR_ray_query = "SPV_KHR_ray_q
|
|||||||
static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate";
|
static const char* const E_SPV_KHR_fragment_shading_rate = "SPV_KHR_fragment_shading_rate";
|
||||||
static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation";
|
static const char* const E_SPV_KHR_terminate_invocation = "SPV_KHR_terminate_invocation";
|
||||||
static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
|
static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_workgroup_memory_explicit_layout";
|
||||||
|
static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextKHR_H
|
#endif // #ifndef GLSLextKHR_H
|
||||||
|
@ -160,6 +160,7 @@ protected:
|
|||||||
spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const;
|
spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const;
|
||||||
spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const;
|
spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, std::vector<unsigned int>& operands) const;
|
||||||
spv::StorageClass TranslateStorageClass(const glslang::TType&);
|
spv::StorageClass TranslateStorageClass(const glslang::TType&);
|
||||||
|
void TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>&, std::vector<unsigned>&) const;
|
||||||
void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType);
|
void addIndirectionIndexCapabilities(const glslang::TType& baseType, const glslang::TType& indexType);
|
||||||
spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType);
|
spv::Id createSpvVariable(const glslang::TIntermSymbol*, spv::Id forcedType);
|
||||||
spv::Id getSampledType(const glslang::TSampler&);
|
spv::Id getSampledType(const glslang::TSampler&);
|
||||||
@ -1249,6 +1250,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||||||
{
|
{
|
||||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||||
return spv::StorageClassPrivate;
|
return spv::StorageClassPrivate;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (type.getQualifier().isSpirvByReference())
|
||||||
|
return spv::StorageClassFunction;
|
||||||
|
#endif
|
||||||
if (type.getQualifier().isPipeInput())
|
if (type.getQualifier().isPipeInput())
|
||||||
return spv::StorageClassInput;
|
return spv::StorageClassInput;
|
||||||
if (type.getQualifier().isPipeOutput())
|
if (type.getQualifier().isPipeOutput())
|
||||||
@ -1297,6 +1302,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||||||
case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
|
case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR;
|
||||||
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR;
|
||||||
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR;
|
||||||
|
case glslang::EvqSpirvStorageClass: return static_cast<spv::StorageClass>(type.getQualifier().spirvStorageClass);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
@ -1306,6 +1312,52 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||||||
return spv::StorageClassFunction;
|
return spv::StorageClassFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Translate glslang constants to SPIR-V literals
|
||||||
|
void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVector<const glslang::TIntermConstantUnion*>& constants,
|
||||||
|
std::vector<unsigned>& literals) const
|
||||||
|
{
|
||||||
|
for (auto constant : constants) {
|
||||||
|
if (constant->getBasicType() == glslang::EbtFloat) {
|
||||||
|
float floatValue = static_cast<float>(constant->getConstArray()[0].getDConst());
|
||||||
|
unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
|
||||||
|
literals.push_back(literal);
|
||||||
|
} else if (constant->getBasicType() == glslang::EbtInt) {
|
||||||
|
unsigned literal = constant->getConstArray()[0].getIConst();
|
||||||
|
literals.push_back(literal);
|
||||||
|
} else if (constant->getBasicType() == glslang::EbtUint) {
|
||||||
|
unsigned literal = constant->getConstArray()[0].getUConst();
|
||||||
|
literals.push_back(literal);
|
||||||
|
} else if (constant->getBasicType() == glslang::EbtBool) {
|
||||||
|
unsigned literal = constant->getConstArray()[0].getBConst();
|
||||||
|
literals.push_back(literal);
|
||||||
|
} else if (constant->getBasicType() == glslang::EbtString) {
|
||||||
|
auto str = constant->getConstArray()[0].getSConst()->c_str();
|
||||||
|
unsigned literal = 0;
|
||||||
|
char* literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
|
unsigned charCount = 0;
|
||||||
|
char ch = 0;
|
||||||
|
do {
|
||||||
|
ch = *(str++);
|
||||||
|
*(literalPtr++) = ch;
|
||||||
|
++charCount;
|
||||||
|
if (charCount == 4) {
|
||||||
|
literals.push_back(literal);
|
||||||
|
literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
|
charCount = 0;
|
||||||
|
}
|
||||||
|
} while (ch != 0);
|
||||||
|
|
||||||
|
// Partial literal is padded with 0
|
||||||
|
if (charCount > 0) {
|
||||||
|
for (; charCount < 4; ++charCount)
|
||||||
|
*(literalPtr++) = 0;
|
||||||
|
literals.push_back(literal);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
assert(0); // Unexpected type
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add capabilities pertaining to how an array is indexed.
|
// Add capabilities pertaining to how an array is indexed.
|
||||||
void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType,
|
void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TType& baseType,
|
||||||
const glslang::TType& indexType)
|
const glslang::TType& indexType)
|
||||||
@ -1526,6 +1578,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||||||
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR);
|
builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (glslangIntermediate->getSubgroupUniformControlFlow()) {
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow);
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned int mode;
|
unsigned int mode;
|
||||||
switch (glslangIntermediate->getStage()) {
|
switch (glslangIntermediate->getStage()) {
|
||||||
case EShLangVertex:
|
case EShLangVertex:
|
||||||
@ -1728,6 +1787,53 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
//
|
||||||
|
// Add SPIR-V requirements (GL_EXT_spirv_intrinsics)
|
||||||
|
//
|
||||||
|
if (glslangIntermediate->hasSpirvRequirement()) {
|
||||||
|
const glslang::TSpirvRequirement& spirvRequirement = glslangIntermediate->getSpirvRequirement();
|
||||||
|
|
||||||
|
// Add SPIR-V extension requirement
|
||||||
|
for (auto& extension : spirvRequirement.extensions)
|
||||||
|
builder.addExtension(extension.c_str());
|
||||||
|
|
||||||
|
// Add SPIR-V capability requirement
|
||||||
|
for (auto capability : spirvRequirement.capabilities)
|
||||||
|
builder.addCapability(static_cast<spv::Capability>(capability));
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Add SPIR-V execution mode qualifiers (GL_EXT_spirv_intrinsics)
|
||||||
|
//
|
||||||
|
if (glslangIntermediate->hasSpirvExecutionMode()) {
|
||||||
|
const glslang::TSpirvExecutionMode spirvExecutionMode = glslangIntermediate->getSpirvExecutionMode();
|
||||||
|
|
||||||
|
// Add spirv_execution_mode
|
||||||
|
for (auto& mode : spirvExecutionMode.modes) {
|
||||||
|
if (!mode.second.empty()) {
|
||||||
|
std::vector<unsigned> literals;
|
||||||
|
TranslateLiterals(mode.second, literals);
|
||||||
|
builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first), literals);
|
||||||
|
} else
|
||||||
|
builder.addExecutionMode(shaderEntry, static_cast<spv::ExecutionMode>(mode.first));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add spirv_execution_mode_id
|
||||||
|
for (auto& modeId : spirvExecutionMode.modeIds) {
|
||||||
|
std::vector<spv::Id> operandIds;
|
||||||
|
assert(!modeId.second.empty());
|
||||||
|
for (auto extraOperand : modeId.second) {
|
||||||
|
int nextConst = 0;
|
||||||
|
spv::Id operandId = createSpvConstantFromConstUnionArray(
|
||||||
|
extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
|
||||||
|
operandIds.push_back(operandId);
|
||||||
|
}
|
||||||
|
builder.addExecutionModeId(shaderEntry, static_cast<spv::ExecutionMode>(modeId.first), operandIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finish creating SPV, after the traversal is complete.
|
// Finish creating SPV, after the traversal is complete.
|
||||||
@ -2310,10 +2416,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||||||
node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
|
node->getOp() == glslang::EOpRayQueryGetWorldRayDirection ||
|
||||||
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
|
node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque ||
|
||||||
node->getOp() == glslang::EOpRayQueryTerminate ||
|
node->getOp() == glslang::EOpRayQueryTerminate ||
|
||||||
node->getOp() == glslang::EOpRayQueryConfirmIntersection) {
|
node->getOp() == glslang::EOpRayQueryConfirmIntersection ||
|
||||||
|
(node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) {
|
||||||
operand = builder.accessChainGetLValue(); // Special case l-value operands
|
operand = builder.accessChainGetLValue(); // Special case l-value operands
|
||||||
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
lvalueCoherentFlags = builder.getAccessChain().coherentFlags;
|
||||||
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
|
lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType());
|
||||||
|
} else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
||||||
|
// Will be translated to a literal value, make a placeholder here
|
||||||
|
operand = spv::NoResult;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -2334,6 +2444,38 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||||||
result = createUnaryOperation(node->getOp(), decorations, resultType(), operand,
|
result = createUnaryOperation(node->getOp(), decorations, resultType(), operand,
|
||||||
node->getOperand()->getBasicType(), lvalueCoherentFlags);
|
node->getOperand()->getBasicType(), lvalueCoherentFlags);
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// it could be attached to a SPIR-V intruction
|
||||||
|
if (!result) {
|
||||||
|
if (node->getOp() == glslang::EOpSpirvInst) {
|
||||||
|
const auto& spirvInst = node->getSpirvInstruction();
|
||||||
|
if (spirvInst.set == "") {
|
||||||
|
spv::IdImmediate idImmOp = {true, operand};
|
||||||
|
if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
||||||
|
// Translate the constant to a literal value
|
||||||
|
std::vector<unsigned> literals;
|
||||||
|
glslang::TVector<const glslang::TIntermConstantUnion*> constants;
|
||||||
|
constants.push_back(operandNode->getAsConstantUnion());
|
||||||
|
TranslateLiterals(constants, literals);
|
||||||
|
idImmOp = {false, literals[0]};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->getBasicType() == glslang::EbtVoid)
|
||||||
|
builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), {idImmOp});
|
||||||
|
else
|
||||||
|
result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), {idImmOp});
|
||||||
|
} else {
|
||||||
|
result = builder.createBuiltinCall(
|
||||||
|
resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
|
||||||
|
spirvInst.id, {operand});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->getBasicType() == glslang::EbtVoid)
|
||||||
|
return false; // done with this node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (invertedType) {
|
if (invertedType) {
|
||||||
result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result);
|
result = createInvertedSwizzle(decorations.precision, *node->getOperand(), result);
|
||||||
@ -3030,6 +3172,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
if (arg == 1)
|
if (arg == 1)
|
||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
|
case glslang::EOpSpirvInst:
|
||||||
|
if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference())
|
||||||
|
lvalue = true;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -3135,6 +3281,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
visitSymbol(itNode->second);
|
visitSymbol(itNode->second);
|
||||||
spv::Id symId = getSymbolId(itNode->second);
|
spv::Id symId = getSymbolId(itNode->second);
|
||||||
operands.push_back(symId);
|
operands.push_back(symId);
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
} else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
||||||
|
// Will be translated to a literal value, make a placeholder here
|
||||||
|
operands.push_back(spv::NoResult);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType()));
|
||||||
}
|
}
|
||||||
@ -3177,6 +3328,34 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType();
|
? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType();
|
||||||
result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy,
|
result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy,
|
||||||
lvalueCoherentFlags);
|
lvalueCoherentFlags);
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
} else if (node->getOp() == glslang::EOpSpirvInst) {
|
||||||
|
const auto& spirvInst = node->getSpirvInstruction();
|
||||||
|
if (spirvInst.set == "") {
|
||||||
|
std::vector<spv::IdImmediate> idImmOps;
|
||||||
|
for (int i = 0; i < glslangOperands.size(); ++i) {
|
||||||
|
if (glslangOperands[i]->getAsTyped()->getQualifier().isSpirvLiteral()) {
|
||||||
|
// Translate the constant to a literal value
|
||||||
|
std::vector<unsigned> literals;
|
||||||
|
glslang::TVector<const glslang::TIntermConstantUnion*> constants;
|
||||||
|
constants.push_back(glslangOperands[i]->getAsConstantUnion());
|
||||||
|
TranslateLiterals(constants, literals);
|
||||||
|
idImmOps.push_back({false, literals[0]});
|
||||||
|
} else
|
||||||
|
idImmOps.push_back({true, operands[i]});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->getBasicType() == glslang::EbtVoid)
|
||||||
|
builder.createNoResultOp(static_cast<spv::Op>(spirvInst.id), idImmOps);
|
||||||
|
else
|
||||||
|
result = builder.createOp(static_cast<spv::Op>(spirvInst.id), resultType(), idImmOps);
|
||||||
|
} else {
|
||||||
|
result = builder.createBuiltinCall(
|
||||||
|
resultType(), spirvInst.set == "GLSL.std.450" ? stdBuiltins : getExtBuiltins(spirvInst.set.c_str()),
|
||||||
|
spirvInst.id, operands);
|
||||||
|
}
|
||||||
|
noReturnValue = node->getBasicType() == glslang::EbtVoid;
|
||||||
|
#endif
|
||||||
} else if (node->getOp() == glslang::EOpDebugPrintf) {
|
} else if (node->getOp() == glslang::EOpDebugPrintf) {
|
||||||
if (!nonSemanticDebugPrintf) {
|
if (!nonSemanticDebugPrintf) {
|
||||||
nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf");
|
nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf");
|
||||||
@ -3457,6 +3636,11 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T
|
|||||||
|
|
||||||
void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
|
void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node)
|
||||||
{
|
{
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (node->getQualifier().isSpirvLiteral())
|
||||||
|
return; // Translated to a literal value, skip further processing
|
||||||
|
#endif
|
||||||
|
|
||||||
int nextConst = 0;
|
int nextConst = 0;
|
||||||
spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false);
|
spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false);
|
||||||
|
|
||||||
@ -3905,6 +4089,77 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
case glslang::EbtString:
|
case glslang::EbtString:
|
||||||
// no type used for OpString
|
// no type used for OpString
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case glslang::EbtSpirvType: {
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
const auto& spirvType = type.getSpirvType();
|
||||||
|
const auto& spirvInst = spirvType.spirvInst;
|
||||||
|
|
||||||
|
std::vector<spv::Id> operands;
|
||||||
|
for (const auto& typeParam : spirvType.typeParams) {
|
||||||
|
if (typeParam.isConstant) {
|
||||||
|
// Constant expression
|
||||||
|
if (typeParam.constant->isLiteral()) {
|
||||||
|
if (typeParam.constant->getBasicType() == glslang::EbtFloat) {
|
||||||
|
float floatValue = static_cast<float>(typeParam.constant->getConstArray()[0].getDConst());
|
||||||
|
unsigned literal = *reinterpret_cast<unsigned*>(&floatValue);
|
||||||
|
operands.push_back(literal);
|
||||||
|
} else if (typeParam.constant->getBasicType() == glslang::EbtInt) {
|
||||||
|
unsigned literal = typeParam.constant->getConstArray()[0].getIConst();
|
||||||
|
operands.push_back(literal);
|
||||||
|
} else if (typeParam.constant->getBasicType() == glslang::EbtUint) {
|
||||||
|
unsigned literal = typeParam.constant->getConstArray()[0].getUConst();
|
||||||
|
operands.push_back(literal);
|
||||||
|
} else if (typeParam.constant->getBasicType() == glslang::EbtBool) {
|
||||||
|
unsigned literal = typeParam.constant->getConstArray()[0].getBConst();
|
||||||
|
operands.push_back(literal);
|
||||||
|
} else if (typeParam.constant->getBasicType() == glslang::EbtString) {
|
||||||
|
auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str();
|
||||||
|
unsigned literal = 0;
|
||||||
|
char* literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
|
unsigned charCount = 0;
|
||||||
|
char ch = 0;
|
||||||
|
do {
|
||||||
|
ch = *(str++);
|
||||||
|
*(literalPtr++) = ch;
|
||||||
|
++charCount;
|
||||||
|
if (charCount == 4) {
|
||||||
|
operands.push_back(literal);
|
||||||
|
literalPtr = reinterpret_cast<char*>(&literal);
|
||||||
|
charCount = 0;
|
||||||
|
}
|
||||||
|
} while (ch != 0);
|
||||||
|
|
||||||
|
// Partial literal is padded with 0
|
||||||
|
if (charCount > 0) {
|
||||||
|
for (; charCount < 4; ++charCount)
|
||||||
|
*(literalPtr++) = 0;
|
||||||
|
operands.push_back(literal);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
assert(0); // Unexpected type
|
||||||
|
} else {
|
||||||
|
int nextConst = 0;
|
||||||
|
spv::Id constant = createSpvConstantFromConstUnionArray(
|
||||||
|
typeParam.constant->getType(), typeParam.constant->getConstArray(), nextConst, false);
|
||||||
|
operands.push_back(constant);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Type specifier
|
||||||
|
spv::Id typeId = convertGlslangToSpvType(*typeParam.type);
|
||||||
|
operands.push_back(typeId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spirvInst.set == "")
|
||||||
|
spvType = builder.createOp(static_cast<spv::Op>(spirvInst.id), spv::NoType, operands);
|
||||||
|
else {
|
||||||
|
spvType = builder.createBuiltinCall(
|
||||||
|
spv::NoType, getExtBuiltins(spirvInst.set.c_str()), spirvInst.id, operands);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
break;
|
break;
|
||||||
@ -4218,6 +4473,38 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||||||
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
|
builder.addCapability(spv::CapabilityGeometryShaderPassthroughNV);
|
||||||
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
|
builder.addExtension(spv::E_SPV_NV_geometry_shader_passthrough);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Add SPIR-V decorations for members (GL_EXT_spirv_intrinsics)
|
||||||
|
//
|
||||||
|
if (glslangMember.getQualifier().hasSprivDecorate()) {
|
||||||
|
const glslang::TSpirvDecorate& spirvDecorate = glslangMember.getQualifier().getSpirvDecorate();
|
||||||
|
|
||||||
|
// Add spirv_decorate
|
||||||
|
for (auto& decorate : spirvDecorate.decorates) {
|
||||||
|
if (!decorate.second.empty()) {
|
||||||
|
std::vector<unsigned> literals;
|
||||||
|
TranslateLiterals(decorate.second, literals);
|
||||||
|
builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first), literals);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
builder.addMemberDecoration(spvType, member, static_cast<spv::Decoration>(decorate.first));
|
||||||
|
}
|
||||||
|
|
||||||
|
// spirv_decorate_id not applied to members
|
||||||
|
assert(spirvDecorate.decorateIds.empty());
|
||||||
|
|
||||||
|
// Add spirv_decorate_string
|
||||||
|
for (auto& decorateString : spirvDecorate.decorateStrings) {
|
||||||
|
std::vector<const char*> strings;
|
||||||
|
assert(!decorateString.second.empty());
|
||||||
|
for (auto extraOperand : decorateString.second) {
|
||||||
|
const char* string = extraOperand->getConstArray()[0].getSConst()->c_str();
|
||||||
|
strings.push_back(string);
|
||||||
|
}
|
||||||
|
builder.addDecoration(spvType, static_cast<spv::Decoration>(decorateString.first), strings);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4607,6 +4894,9 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier,
|
|||||||
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
|
if (glslangIntermediate->getSource() == glslang::EShSourceHlsl)
|
||||||
return paramType.getBasicType() == glslang::EbtBlock;
|
return paramType.getBasicType() == glslang::EbtBlock;
|
||||||
return paramType.containsOpaque() || // sampler, etc.
|
return paramType.containsOpaque() || // sampler, etc.
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
paramType.getQualifier().isSpirvByReference() || // spirv_by_reference
|
||||||
|
#endif
|
||||||
(paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO
|
(paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5562,7 +5852,7 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
|
|||||||
++lValueCount;
|
++lValueCount;
|
||||||
} else {
|
} else {
|
||||||
// process r-value, which involves a copy for a type mismatch
|
// process r-value, which involves a copy for a type mismatch
|
||||||
if (function->getParamType(a) != convertGlslangToSpvType(*argTypes[a]) ||
|
if (function->getParamType(a) != builder.getTypeId(rValues[rValueCount]) ||
|
||||||
TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a))
|
TranslatePrecisionDecoration(*argTypes[a]) != function->getParamPrecision(a))
|
||||||
{
|
{
|
||||||
spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction, function->getParamType(a), "arg");
|
spv::Id argCopy = builder.createVariable(function->getParamPrecision(a), spv::StorageClassFunction, function->getParamType(a), "arg");
|
||||||
@ -6893,14 +7183,18 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
|||||||
case glslang::EOpImageAtomicAdd:
|
case glslang::EOpImageAtomicAdd:
|
||||||
case glslang::EOpAtomicCounterAdd:
|
case glslang::EOpAtomicCounterAdd:
|
||||||
opCode = spv::OpAtomicIAdd;
|
opCode = spv::OpAtomicIAdd;
|
||||||
if (typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
|
if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
|
||||||
opCode = spv::OpAtomicFAddEXT;
|
opCode = spv::OpAtomicFAddEXT;
|
||||||
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add);
|
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_add);
|
||||||
if (typeProxy == glslang::EbtFloat)
|
if (typeProxy == glslang::EbtFloat16) {
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float16_add);
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat16AddEXT);
|
||||||
|
} else if (typeProxy == glslang::EbtFloat) {
|
||||||
builder.addCapability(spv::CapabilityAtomicFloat32AddEXT);
|
builder.addCapability(spv::CapabilityAtomicFloat32AddEXT);
|
||||||
else
|
} else {
|
||||||
builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
|
builder.addCapability(spv::CapabilityAtomicFloat64AddEXT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EOpAtomicSubtract:
|
case glslang::EOpAtomicSubtract:
|
||||||
case glslang::EOpAtomicCounterSubtract:
|
case glslang::EOpAtomicCounterSubtract:
|
||||||
@ -6909,14 +7203,38 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
|
|||||||
case glslang::EOpAtomicMin:
|
case glslang::EOpAtomicMin:
|
||||||
case glslang::EOpImageAtomicMin:
|
case glslang::EOpImageAtomicMin:
|
||||||
case glslang::EOpAtomicCounterMin:
|
case glslang::EOpAtomicCounterMin:
|
||||||
opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
|
if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
|
||||||
spv::OpAtomicUMin : spv::OpAtomicSMin;
|
opCode = spv::OpAtomicFMinEXT;
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max);
|
||||||
|
if (typeProxy == glslang::EbtFloat16)
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT);
|
||||||
|
else if (typeProxy == glslang::EbtFloat)
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT);
|
||||||
|
else
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT);
|
||||||
|
} else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) {
|
||||||
|
opCode = spv::OpAtomicUMin;
|
||||||
|
} else {
|
||||||
|
opCode = spv::OpAtomicSMin;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EOpAtomicMax:
|
case glslang::EOpAtomicMax:
|
||||||
case glslang::EOpImageAtomicMax:
|
case glslang::EOpImageAtomicMax:
|
||||||
case glslang::EOpAtomicCounterMax:
|
case glslang::EOpAtomicCounterMax:
|
||||||
opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ?
|
if (typeProxy == glslang::EbtFloat16 || typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble) {
|
||||||
spv::OpAtomicUMax : spv::OpAtomicSMax;
|
opCode = spv::OpAtomicFMaxEXT;
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_atomic_float_min_max);
|
||||||
|
if (typeProxy == glslang::EbtFloat16)
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat16MinMaxEXT);
|
||||||
|
else if (typeProxy == glslang::EbtFloat)
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat32MinMaxEXT);
|
||||||
|
else
|
||||||
|
builder.addCapability(spv::CapabilityAtomicFloat64MinMaxEXT);
|
||||||
|
} else if (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) {
|
||||||
|
opCode = spv::OpAtomicUMax;
|
||||||
|
} else {
|
||||||
|
opCode = spv::OpAtomicSMax;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case glslang::EOpAtomicAnd:
|
case glslang::EOpAtomicAnd:
|
||||||
case glslang::EOpImageAtomicAnd:
|
case glslang::EOpImageAtomicAnd:
|
||||||
@ -8458,6 +8776,48 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
|||||||
builder.addDecoration(id, symbol->getType().getQualifier().restrict ?
|
builder.addDecoration(id, symbol->getType().getQualifier().restrict ?
|
||||||
spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
|
spv::DecorationRestrictPointerEXT : spv::DecorationAliasedPointerEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Add SPIR-V decorations for structure (GL_EXT_spirv_intrinsics)
|
||||||
|
//
|
||||||
|
if (symbol->getType().getQualifier().hasSprivDecorate()) {
|
||||||
|
const glslang::TSpirvDecorate& spirvDecorate = symbol->getType().getQualifier().getSpirvDecorate();
|
||||||
|
|
||||||
|
// Add spirv_decorate
|
||||||
|
for (auto& decorate : spirvDecorate.decorates) {
|
||||||
|
if (!decorate.second.empty()) {
|
||||||
|
std::vector<unsigned> literals;
|
||||||
|
TranslateLiterals(decorate.second, literals);
|
||||||
|
builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first), literals);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
builder.addDecoration(id, static_cast<spv::Decoration>(decorate.first));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add spirv_decorate_id
|
||||||
|
for (auto& decorateId : spirvDecorate.decorateIds) {
|
||||||
|
std::vector<spv::Id> operandIds;
|
||||||
|
assert(!decorateId.second.empty());
|
||||||
|
for (auto extraOperand : decorateId.second) {
|
||||||
|
int nextConst = 0;
|
||||||
|
spv::Id operandId = createSpvConstantFromConstUnionArray(
|
||||||
|
extraOperand->getType(), extraOperand->getConstArray(), nextConst, false);
|
||||||
|
operandIds.push_back(operandId);
|
||||||
|
}
|
||||||
|
builder.addDecoration(id, static_cast<spv::Decoration>(decorateId.first), operandIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add spirv_decorate_string
|
||||||
|
for (auto& decorateString : spirvDecorate.decorateStrings) {
|
||||||
|
std::vector<const char*> strings;
|
||||||
|
assert(!decorateString.second.empty());
|
||||||
|
for (auto extraOperand : decorateString.second) {
|
||||||
|
const char* string = extraOperand->getConstArray()[0].getSConst()->c_str();
|
||||||
|
strings.push_back(string);
|
||||||
|
}
|
||||||
|
builder.addDecoration(id, static_cast<spv::Decoration>(decorateString.first), strings);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
@ -544,6 +544,9 @@ namespace spv {
|
|||||||
// Extended instructions: currently, assume everything is an ID.
|
// Extended instructions: currently, assume everything is an ID.
|
||||||
// TODO: add whatever data we need for exceptions to that
|
// TODO: add whatever data we need for exceptions to that
|
||||||
if (opCode == spv::OpExtInst) {
|
if (opCode == spv::OpExtInst) {
|
||||||
|
|
||||||
|
idFn(asId(word)); // Instruction set is an ID that also needs to be mapped
|
||||||
|
|
||||||
word += 2; // instruction set, and instruction from set
|
word += 2; // instruction set, and instruction from set
|
||||||
numOperands -= 2;
|
numOperands -= 2;
|
||||||
|
|
||||||
|
@ -2543,7 +2543,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
|
|||||||
int row = 0;
|
int row = 0;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
|
|
||||||
for (int arg = 0; arg < (int)sources.size(); ++arg) {
|
for (int arg = 0; arg < (int)sources.size() && col < numCols; ++arg) {
|
||||||
Id argComp = sources[arg];
|
Id argComp = sources[arg];
|
||||||
for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
|
for (int comp = 0; comp < getNumComponents(sources[arg]); ++comp) {
|
||||||
if (getNumComponents(sources[arg]) > 1) {
|
if (getNumComponents(sources[arg]) > 1) {
|
||||||
@ -2555,6 +2555,10 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
|
|||||||
row = 0;
|
row = 0;
|
||||||
col++;
|
col++;
|
||||||
}
|
}
|
||||||
|
if (col == numCols) {
|
||||||
|
// If more components are provided than fit the matrix, discard the rest.
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,6 +188,7 @@ const char* ExecutionModeString(int mode)
|
|||||||
case ExecutionModeRoundingModeRTE: return "RoundingModeRTE";
|
case ExecutionModeRoundingModeRTE: return "RoundingModeRTE";
|
||||||
case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ";
|
case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ";
|
||||||
case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT";
|
case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT";
|
||||||
|
case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlow";
|
||||||
|
|
||||||
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
|
case ExecutionModeOutputLinesNV: return "OutputLinesNV";
|
||||||
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
|
case ExecutionModeOutputPrimitivesNV: return "OutputPrimitivesNV";
|
||||||
@ -965,8 +966,12 @@ const char* CapabilityString(int info)
|
|||||||
|
|
||||||
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
case CapabilityIntegerFunctions2INTEL: return "CapabilityIntegerFunctions2INTEL";
|
||||||
|
|
||||||
|
case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT";
|
||||||
case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT";
|
case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT";
|
||||||
case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT";
|
case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT";
|
||||||
|
case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT";
|
||||||
|
case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT";
|
||||||
|
case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT";
|
||||||
|
|
||||||
case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
|
case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR";
|
||||||
case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
|
case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR";
|
||||||
@ -1351,6 +1356,8 @@ const char* OpcodeString(int op)
|
|||||||
case 4432: return "OpSubgroupReadInvocationKHR";
|
case 4432: return "OpSubgroupReadInvocationKHR";
|
||||||
|
|
||||||
case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
|
case OpAtomicFAddEXT: return "OpAtomicFAddEXT";
|
||||||
|
case OpAtomicFMinEXT: return "OpAtomicFMinEXT";
|
||||||
|
case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT";
|
||||||
|
|
||||||
case 5000: return "OpGroupIAddNonUniformAMD";
|
case 5000: return "OpGroupIAddNonUniformAMD";
|
||||||
case 5001: return "OpGroupFAddNonUniformAMD";
|
case 5001: return "OpGroupFAddNonUniformAMD";
|
||||||
@ -2341,6 +2348,16 @@ void Parameterize()
|
|||||||
InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
|
InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||||
InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
|
InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'");
|
||||||
|
|
||||||
|
InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'");
|
||||||
|
InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'");
|
||||||
|
InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||||
|
InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'");
|
||||||
|
|
||||||
|
InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'");
|
||||||
|
InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'");
|
||||||
|
InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||||
|
InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'");
|
||||||
|
|
||||||
InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
|
InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'");
|
||||||
InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
|
InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'");
|
||||||
InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
|
InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'");
|
||||||
|
@ -150,6 +150,7 @@ enum ExecutionMode {
|
|||||||
ExecutionModeSubgroupsPerWorkgroupId = 37,
|
ExecutionModeSubgroupsPerWorkgroupId = 37,
|
||||||
ExecutionModeLocalSizeId = 38,
|
ExecutionModeLocalSizeId = 38,
|
||||||
ExecutionModeLocalSizeHintId = 39,
|
ExecutionModeLocalSizeHintId = 39,
|
||||||
|
ExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
||||||
ExecutionModePostDepthCoverage = 4446,
|
ExecutionModePostDepthCoverage = 4446,
|
||||||
ExecutionModeDenormPreserve = 4459,
|
ExecutionModeDenormPreserve = 4459,
|
||||||
ExecutionModeDenormFlushToZero = 4460,
|
ExecutionModeDenormFlushToZero = 4460,
|
||||||
@ -409,6 +410,7 @@ enum FPRoundingMode {
|
|||||||
enum LinkageType {
|
enum LinkageType {
|
||||||
LinkageTypeExport = 0,
|
LinkageTypeExport = 0,
|
||||||
LinkageTypeImport = 1,
|
LinkageTypeImport = 1,
|
||||||
|
LinkageTypeLinkOnceODR = 2,
|
||||||
LinkageTypeMax = 0x7fffffff,
|
LinkageTypeMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1010,8 +1012,12 @@ enum Capability {
|
|||||||
CapabilityFunctionPointersINTEL = 5603,
|
CapabilityFunctionPointersINTEL = 5603,
|
||||||
CapabilityIndirectReferencesINTEL = 5604,
|
CapabilityIndirectReferencesINTEL = 5604,
|
||||||
CapabilityAsmINTEL = 5606,
|
CapabilityAsmINTEL = 5606,
|
||||||
|
CapabilityAtomicFloat32MinMaxEXT = 5612,
|
||||||
|
CapabilityAtomicFloat64MinMaxEXT = 5613,
|
||||||
|
CapabilityAtomicFloat16MinMaxEXT = 5616,
|
||||||
CapabilityVectorComputeINTEL = 5617,
|
CapabilityVectorComputeINTEL = 5617,
|
||||||
CapabilityVectorAnyINTEL = 5619,
|
CapabilityVectorAnyINTEL = 5619,
|
||||||
|
CapabilityExpectAssumeKHR = 5629,
|
||||||
CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
|
CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
|
||||||
CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
|
CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
|
||||||
CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
|
CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
|
||||||
@ -1035,6 +1041,7 @@ enum Capability {
|
|||||||
CapabilityAtomicFloat32AddEXT = 6033,
|
CapabilityAtomicFloat32AddEXT = 6033,
|
||||||
CapabilityAtomicFloat64AddEXT = 6034,
|
CapabilityAtomicFloat64AddEXT = 6034,
|
||||||
CapabilityLongConstantCompositeINTEL = 6089,
|
CapabilityLongConstantCompositeINTEL = 6089,
|
||||||
|
CapabilityAtomicFloat16AddEXT = 6095,
|
||||||
CapabilityMax = 0x7fffffff,
|
CapabilityMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1537,6 +1544,10 @@ enum Op {
|
|||||||
OpAsmTargetINTEL = 5609,
|
OpAsmTargetINTEL = 5609,
|
||||||
OpAsmINTEL = 5610,
|
OpAsmINTEL = 5610,
|
||||||
OpAsmCallINTEL = 5611,
|
OpAsmCallINTEL = 5611,
|
||||||
|
OpAtomicFMinEXT = 5614,
|
||||||
|
OpAtomicFMaxEXT = 5615,
|
||||||
|
OpAssumeTrueKHR = 5630,
|
||||||
|
OpExpectKHR = 5631,
|
||||||
OpDecorateString = 5632,
|
OpDecorateString = 5632,
|
||||||
OpDecorateStringGOOGLE = 5632,
|
OpDecorateStringGOOGLE = 5632,
|
||||||
OpMemberDecorateString = 5633,
|
OpMemberDecorateString = 5633,
|
||||||
@ -2119,6 +2130,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||||||
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpAsmINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpExpectKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpDecorateString: *hasResult = false; *hasResultType = false; break;
|
case OpDecorateString: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
|
case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
|
case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
|
||||||
|
@ -3,7 +3,6 @@ ERROR: 0:4: 'redeclaration' : cannot redeclare with different qualification: gl_
|
|||||||
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
|
ERROR: 0:5: 'redeclaration' : cannot redeclare with different qualification: gl_FragCoord
|
||||||
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
|
ERROR: 0:6: 'layout qualifier' : can only apply origin_upper_left and pixel_center_origin to gl_FragCoord
|
||||||
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
|
ERROR: 0:14: 'gl_FragCoord' : cannot redeclare after use
|
||||||
ERROR: 0:50: 'gl_PerFragment' : cannot be used (maybe an instance name is needed)
|
|
||||||
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
|
ERROR: 0:50: 'gl_PerFragment' : undeclared identifier
|
||||||
ERROR: 0:53: 'double' : Reserved word.
|
ERROR: 0:53: 'double' : Reserved word.
|
||||||
ERROR: 0:53: 'double' : not supported for this version or the enabled extensions
|
ERROR: 0:53: 'double' : not supported for this version or the enabled extensions
|
||||||
@ -18,7 +17,7 @@ ERROR: 0:154: 'assign' : cannot convert from ' const float' to ' temp 2-compone
|
|||||||
ERROR: 0:155: 'textureQueryLod' : no matching overloaded function found
|
ERROR: 0:155: 'textureQueryLod' : no matching overloaded function found
|
||||||
ERROR: 0:155: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
|
ERROR: 0:155: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float'
|
||||||
ERROR: 0:183: 'mix' : required extension not requested: GL_EXT_shader_integer_mix
|
ERROR: 0:183: 'mix' : required extension not requested: GL_EXT_shader_integer_mix
|
||||||
ERROR: 19 compilation errors. No code generated.
|
ERROR: 18 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 150
|
Shader version: 150
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
150.vert
|
150.vert
|
||||||
|
ERROR: 0:18: 'gl_ClipVertex' : undeclared identifier
|
||||||
|
ERROR: 0:18: 'assign' : cannot convert from ' in 4-component vector of float' to ' temp float'
|
||||||
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
|
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
|
||||||
ERROR: 0:28: 'double' : Reserved word.
|
ERROR: 0:28: 'double' : Reserved word.
|
||||||
ERROR: 0:28: 'double' : not supported for this version or the enabled extensions
|
ERROR: 0:28: 'double' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:28: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
|
ERROR: 0:28: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:3001: '#error' : line of this error should be 3001
|
ERROR: 0:3001: '#error' : line of this error should be 3001
|
||||||
ERROR: 5 compilation errors. No code generated.
|
ERROR: 7 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 150
|
Shader version: 150
|
||||||
@ -15,20 +17,20 @@ ERROR: node is still EOpNull!
|
|||||||
0:15 Sequence
|
0:15 Sequence
|
||||||
0:15 move second child to first child ( temp 4-component vector of float)
|
0:15 move second child to first child ( temp 4-component vector of float)
|
||||||
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
||||||
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:15 Constant:
|
0:15 Constant:
|
||||||
0:15 0 (const uint)
|
0:15 0 (const uint)
|
||||||
0:15 'iv4' ( in 4-component vector of float)
|
0:15 'iv4' ( in 4-component vector of float)
|
||||||
0:16 move second child to first child ( temp float)
|
0:16 move second child to first child ( temp float)
|
||||||
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
|
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
|
||||||
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:16 Constant:
|
0:16 Constant:
|
||||||
0:16 1 (const uint)
|
0:16 1 (const uint)
|
||||||
0:16 'ps' ( uniform float)
|
0:16 'ps' ( uniform float)
|
||||||
0:17 move second child to first child ( temp float)
|
0:17 move second child to first child ( temp float)
|
||||||
0:17 direct index ( temp float ClipDistance)
|
0:17 direct index ( temp float ClipDistance)
|
||||||
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
|
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
|
||||||
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
0:17 2 (const uint)
|
0:17 2 (const uint)
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
@ -37,12 +39,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:17 'iv4' ( in 4-component vector of float)
|
0:17 'iv4' ( in 4-component vector of float)
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
0:17 0 (const int)
|
0:17 0 (const int)
|
||||||
0:18 move second child to first child ( temp 4-component vector of float)
|
0:18 'gl_ClipVertex' ( temp float)
|
||||||
0:18 gl_ClipVertex: direct index for structure ( gl_ClipVertex 4-component vector of float ClipVertex)
|
|
||||||
0:18 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
|
||||||
0:18 Constant:
|
|
||||||
0:18 3 (const uint)
|
|
||||||
0:18 'iv4' ( in 4-component vector of float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'iv4' ( in 4-component vector of float)
|
0:? 'iv4' ( in 4-component vector of float)
|
||||||
0:? 'ps' ( uniform float)
|
0:? 'ps' ( uniform float)
|
||||||
@ -67,7 +64,6 @@ ERROR: node is still EOpNull!
|
|||||||
|
|
||||||
Linked vertex stage:
|
Linked vertex stage:
|
||||||
|
|
||||||
ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)
|
|
||||||
|
|
||||||
Shader version: 150
|
Shader version: 150
|
||||||
Requested GL_ARB_vertex_attrib_64bit
|
Requested GL_ARB_vertex_attrib_64bit
|
||||||
@ -77,20 +73,20 @@ ERROR: node is still EOpNull!
|
|||||||
0:15 Sequence
|
0:15 Sequence
|
||||||
0:15 move second child to first child ( temp 4-component vector of float)
|
0:15 move second child to first child ( temp 4-component vector of float)
|
||||||
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
0:15 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
||||||
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:15 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:15 Constant:
|
0:15 Constant:
|
||||||
0:15 0 (const uint)
|
0:15 0 (const uint)
|
||||||
0:15 'iv4' ( in 4-component vector of float)
|
0:15 'iv4' ( in 4-component vector of float)
|
||||||
0:16 move second child to first child ( temp float)
|
0:16 move second child to first child ( temp float)
|
||||||
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
|
0:16 gl_PointSize: direct index for structure ( gl_PointSize float PointSize)
|
||||||
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:16 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:16 Constant:
|
0:16 Constant:
|
||||||
0:16 1 (const uint)
|
0:16 1 (const uint)
|
||||||
0:16 'ps' ( uniform float)
|
0:16 'ps' ( uniform float)
|
||||||
0:17 move second child to first child ( temp float)
|
0:17 move second child to first child ( temp float)
|
||||||
0:17 direct index ( temp float ClipDistance)
|
0:17 direct index ( temp float ClipDistance)
|
||||||
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
|
0:17 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance)
|
||||||
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:17 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
0:17 2 (const uint)
|
0:17 2 (const uint)
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
@ -99,12 +95,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:17 'iv4' ( in 4-component vector of float)
|
0:17 'iv4' ( in 4-component vector of float)
|
||||||
0:17 Constant:
|
0:17 Constant:
|
||||||
0:17 0 (const int)
|
0:17 0 (const int)
|
||||||
0:18 move second child to first child ( temp 4-component vector of float)
|
0:18 'gl_ClipVertex' ( temp float)
|
||||||
0:18 gl_ClipVertex: direct index for structure ( gl_ClipVertex 4-component vector of float ClipVertex)
|
|
||||||
0:18 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
|
||||||
0:18 Constant:
|
|
||||||
0:18 3 (const uint)
|
|
||||||
0:18 'iv4' ( in 4-component vector of float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'iv4' ( in 4-component vector of float)
|
0:? 'iv4' ( in 4-component vector of float)
|
||||||
0:? 'ps' ( uniform float)
|
0:? 'ps' ( uniform float)
|
||||||
|
@ -4,7 +4,7 @@ ERROR: 0:22: 'textureGatherOffset(...)' : must be a compile-time constant: compo
|
|||||||
ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument
|
ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument
|
||||||
ERROR: 0:30: 'location qualifier on input' : not supported for this version or the enabled extensions
|
ERROR: 0:30: 'location qualifier on input' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:38: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
|
ERROR: 0:38: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions
|
||||||
ERROR: 0:40: 'redeclaration' : cannot apply layout qualifier to gl_Color
|
ERROR: 0:40: 'gl_Color' : identifiers starting with "gl_" are reserved
|
||||||
ERROR: 0:41: 'redeclaration' : cannot change qualification of gl_ClipDistance
|
ERROR: 0:41: 'redeclaration' : cannot change qualification of gl_ClipDistance
|
||||||
ERROR: 0:43: 'gl_FragCoord' : cannot redeclare after use
|
ERROR: 0:43: 'gl_FragCoord' : cannot redeclare after use
|
||||||
ERROR: 0:51: 'texel offset' : argument must be compile-time constant
|
ERROR: 0:51: 'texel offset' : argument must be compile-time constant
|
||||||
@ -516,7 +516,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
|
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
|
||||||
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
|
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
|
||||||
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
|
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
|
||||||
0:? 'anon@0' ( in block{ in float FogFragCoord gl_FogFragCoord, in unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
|
0:? 'gl_Color' (layout( location=5) smooth in 4-component vector of float)
|
||||||
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
||||||
0:? 'u2drs' ( uniform sampler2DRectShadow)
|
0:? 'u2drs' ( uniform sampler2DRectShadow)
|
||||||
0:? 'patchIn' ( smooth patch in 4-component vector of float)
|
0:? 'patchIn' ( smooth patch in 4-component vector of float)
|
||||||
@ -691,7 +691,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
|
0:? 'vl' (layout( location=4) smooth in 4-component vector of float)
|
||||||
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
|
0:? 'vl2' (layout( location=6) smooth in 4-component vector of float)
|
||||||
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
|
0:? 'uv3' (layout( location=3) uniform 3-component vector of float)
|
||||||
0:? 'anon@0' ( in block{ in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, smooth in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
|
0:? 'gl_Color' (layout( location=5) smooth in 4-component vector of float)
|
||||||
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
0:? 'gl_FragCoord' ( gl_FragCoord 4-component vector of float FragCoord)
|
||||||
0:? 'u2drs' ( uniform sampler2DRectShadow)
|
0:? 'u2drs' ( uniform sampler2DRectShadow)
|
||||||
0:? 'patchIn' ( smooth patch in 4-component vector of float)
|
0:? 'patchIn' ( smooth patch in 4-component vector of float)
|
||||||
|
@ -63,7 +63,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:47 3.000000
|
0:47 3.000000
|
||||||
0:49 move second child to first child ( temp 4-component vector of float)
|
0:49 move second child to first child ( temp 4-component vector of float)
|
||||||
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
||||||
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 0 (const uint)
|
0:49 0 (const uint)
|
||||||
0:49 Construct vec4 ( temp 4-component vector of float)
|
0:49 Construct vec4 ( temp 4-component vector of float)
|
||||||
@ -168,7 +168,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:47 3.000000
|
0:47 3.000000
|
||||||
0:49 move second child to first child ( temp 4-component vector of float)
|
0:49 move second child to first child ( temp 4-component vector of float)
|
||||||
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
0:49 gl_Position: direct index for structure ( invariant gl_Position 4-component vector of float Position)
|
||||||
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:49 'anon@0' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 0 (const uint)
|
0:49 0 (const uint)
|
||||||
0:49 Construct vec4 ( temp 4-component vector of float)
|
0:49 Construct vec4 ( temp 4-component vector of float)
|
||||||
|
@ -34,7 +34,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
|
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
|
||||||
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
|
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
0:9 10 (const uint)
|
0:9 3 (const uint)
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
0:9 2 (const int)
|
0:9 2 (const int)
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
@ -98,7 +98,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
|
0:9 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance)
|
||||||
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
|
0:9 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance})
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
0:9 10 (const uint)
|
0:9 3 (const uint)
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
0:9 2 (const int)
|
0:9 2 (const int)
|
||||||
0:9 Constant:
|
0:9 Constant:
|
||||||
|
@ -3,7 +3,9 @@ WARNING: 0:1: '#define' : missing space after macro name
|
|||||||
ERROR: 0:3: 'preprocessor evaluation' : bad expression
|
ERROR: 0:3: 'preprocessor evaluation' : bad expression
|
||||||
ERROR: 0:3: '#if' : unexpected tokens following directive
|
ERROR: 0:3: '#if' : unexpected tokens following directive
|
||||||
ERROR: 0:6: 'string' : End of line in string
|
ERROR: 0:6: 'string' : End of line in string
|
||||||
ERROR: 0:6: 'string literal' : required extension not requested: GL_EXT_debug_printf
|
ERROR: 0:6: 'string literal' : required extension not requested: Possible extensions include:
|
||||||
|
GL_EXT_debug_printf
|
||||||
|
GL_EXT_spirv_intrinsics
|
||||||
ERROR: 0:6: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON
|
ERROR: 0:6: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON
|
||||||
ERROR: 5 compilation errors. No code generated.
|
ERROR: 5 compilation errors. No code generated.
|
||||||
|
|
||||||
|
@ -18,8 +18,12 @@ ERROR: 0:117: '#error' : bad5
|
|||||||
ERROR: 0:120: '#if' : unexpected tokens following directive
|
ERROR: 0:120: '#if' : unexpected tokens following directive
|
||||||
ERROR: 0:121: '#error' : bad6
|
ERROR: 0:121: '#error' : bad6
|
||||||
ERROR: 0:122: '#endif' : unexpected tokens following directive
|
ERROR: 0:122: '#endif' : unexpected tokens following directive
|
||||||
ERROR: 0:135: 'string literal' : required extension not requested: GL_EXT_debug_printf
|
ERROR: 0:135: 'string literal' : required extension not requested: Possible extensions include:
|
||||||
ERROR: 0:136: 'string literal' : required extension not requested: GL_EXT_debug_printf
|
GL_EXT_debug_printf
|
||||||
|
GL_EXT_spirv_intrinsics
|
||||||
|
ERROR: 0:136: 'string literal' : required extension not requested: Possible extensions include:
|
||||||
|
GL_EXT_debug_printf
|
||||||
|
GL_EXT_spirv_intrinsics
|
||||||
ERROR: 0:136: 'length' : no matching overloaded function found
|
ERROR: 0:136: 'length' : no matching overloaded function found
|
||||||
ERROR: 0:136: '=' : cannot convert from ' const float' to ' global int'
|
ERROR: 0:136: '=' : cannot convert from ' const float' to ' global int'
|
||||||
ERROR: 0:138: ''' : character literals not supported
|
ERROR: 0:138: ''' : character literals not supported
|
||||||
@ -134,7 +138,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:65 0.050000
|
0:65 0.050000
|
||||||
0:69 move second child to first child ( temp 4-component vector of float)
|
0:69 move second child to first child ( temp 4-component vector of float)
|
||||||
0:69 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:69 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:69 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:69 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:69 Constant:
|
0:69 Constant:
|
||||||
0:69 0 (const uint)
|
0:69 0 (const uint)
|
||||||
0:69 Construct vec4 ( temp 4-component vector of float)
|
0:69 Construct vec4 ( temp 4-component vector of float)
|
||||||
@ -174,7 +178,7 @@ ERROR: node is still EOpNull!
|
|||||||
12:20033 Sequence
|
12:20033 Sequence
|
||||||
12:20033 move second child to first child ( temp 4-component vector of float)
|
12:20033 move second child to first child ( temp 4-component vector of float)
|
||||||
12:20033 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
12:20033 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
12:20033 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
12:20033 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
12:20033 Constant:
|
12:20033 Constant:
|
||||||
12:20033 0 (const uint)
|
12:20033 0 (const uint)
|
||||||
12:20033 Constant:
|
12:20033 Constant:
|
||||||
@ -188,7 +192,7 @@ ERROR: node is still EOpNull!
|
|||||||
12:9011 'RECURSE' ( global int)
|
12:9011 'RECURSE' ( global int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'sum' ( global float)
|
0:? 'sum' ( global float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'linenumber' ( global int)
|
0:? 'linenumber' ( global int)
|
||||||
0:? 'filenumber' ( global int)
|
0:? 'filenumber' ( global int)
|
||||||
0:? 'version' ( global int)
|
0:? 'version' ( global int)
|
||||||
@ -246,7 +250,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:65 0.050000
|
0:65 0.050000
|
||||||
0:69 move second child to first child ( temp 4-component vector of float)
|
0:69 move second child to first child ( temp 4-component vector of float)
|
||||||
0:69 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:69 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:69 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:69 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:69 Constant:
|
0:69 Constant:
|
||||||
0:69 0 (const uint)
|
0:69 0 (const uint)
|
||||||
0:69 Construct vec4 ( temp 4-component vector of float)
|
0:69 Construct vec4 ( temp 4-component vector of float)
|
||||||
@ -287,7 +291,7 @@ ERROR: node is still EOpNull!
|
|||||||
12:9011 'RECURSE' ( global int)
|
12:9011 'RECURSE' ( global int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'sum' ( global float)
|
0:? 'sum' ( global float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'linenumber' ( global int)
|
0:? 'linenumber' ( global int)
|
||||||
0:? 'filenumber' ( global int)
|
0:? 'filenumber' ( global int)
|
||||||
0:? 'version' ( global int)
|
0:? 'version' ( global int)
|
||||||
|
@ -2,7 +2,7 @@ hlsl.attribute.expression.comp
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (4, 6, 8)
|
local_size = (4, 6, 8)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:9 Function Definition: @main( ( temp 4-component vector of float)
|
0:9 Function Definition: @main( ( temp void)
|
||||||
0:9 Function Parameters:
|
0:9 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:11 Sequence
|
0:11 Sequence
|
||||||
@ -22,21 +22,12 @@ local_size = (4, 6, 8)
|
|||||||
0:11 Loop Terminal Expression
|
0:11 Loop Terminal Expression
|
||||||
0:11 Pre-Increment ( temp int)
|
0:11 Pre-Increment ( temp int)
|
||||||
0:11 'x' ( temp int)
|
0:11 'x' ( temp int)
|
||||||
0:14 Branch: Return with expression
|
|
||||||
0:14 Constant:
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:9 Function Definition: main( ( temp void)
|
0:9 Function Definition: main( ( temp void)
|
||||||
0:9 Function Parameters:
|
0:9 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:9 move second child to first child ( temp 4-component vector of float)
|
0:9 Function Call: @main( ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:9 Function Call: @main( ( temp 4-component vector of float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
|
|
||||||
|
|
||||||
Linked compute stage:
|
Linked compute stage:
|
||||||
@ -45,7 +36,7 @@ Linked compute stage:
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (4, 6, 8)
|
local_size = (4, 6, 8)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:9 Function Definition: @main( ( temp 4-component vector of float)
|
0:9 Function Definition: @main( ( temp void)
|
||||||
0:9 Function Parameters:
|
0:9 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:11 Sequence
|
0:11 Sequence
|
||||||
@ -65,89 +56,70 @@ local_size = (4, 6, 8)
|
|||||||
0:11 Loop Terminal Expression
|
0:11 Loop Terminal Expression
|
||||||
0:11 Pre-Increment ( temp int)
|
0:11 Pre-Increment ( temp int)
|
||||||
0:11 'x' ( temp int)
|
0:11 'x' ( temp int)
|
||||||
0:14 Branch: Return with expression
|
|
||||||
0:14 Constant:
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:14 0.000000
|
|
||||||
0:9 Function Definition: main( ( temp void)
|
0:9 Function Definition: main( ( temp void)
|
||||||
0:9 Function Parameters:
|
0:9 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:9 move second child to first child ( temp 4-component vector of float)
|
0:9 Function Call: @main( ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:9 Function Call: @main( ( temp 4-component vector of float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound})
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 39
|
// Id's are bound by 30
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint GLCompute 4 "main" 37
|
EntryPoint GLCompute 4 "main"
|
||||||
ExecutionMode 4 LocalSize 4 6 8
|
ExecutionMode 4 LocalSize 4 6 8
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 9 "@main("
|
Name 6 "@main("
|
||||||
Name 13 "x"
|
Name 10 "x"
|
||||||
Name 21 "$Global"
|
Name 18 "$Global"
|
||||||
MemberName 21($Global) 0 "bound"
|
MemberName 18($Global) 0 "bound"
|
||||||
Name 23 ""
|
Name 20 ""
|
||||||
Name 37 "@entryPointOutput"
|
MemberDecorate 18($Global) 0 Offset 0
|
||||||
MemberDecorate 21($Global) 0 Offset 0
|
Decorate 18($Global) Block
|
||||||
Decorate 21($Global) Block
|
Decorate 20 DescriptorSet 0
|
||||||
Decorate 23 DescriptorSet 0
|
Decorate 20 Binding 0
|
||||||
Decorate 23 Binding 0
|
|
||||||
Decorate 37(@entryPointOutput) Location 0
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
8: TypeInt 32 1
|
||||||
7: TypeVector 6(float) 4
|
9: TypePointer Function 8(int)
|
||||||
8: TypeFunction 7(fvec4)
|
11: 8(int) Constant 0
|
||||||
11: TypeInt 32 1
|
18($Global): TypeStruct 8(int)
|
||||||
12: TypePointer Function 11(int)
|
19: TypePointer Uniform 18($Global)
|
||||||
14: 11(int) Constant 0
|
20: 19(ptr) Variable Uniform
|
||||||
21($Global): TypeStruct 11(int)
|
21: TypePointer Uniform 8(int)
|
||||||
22: TypePointer Uniform 21($Global)
|
24: TypeBool
|
||||||
23: 22(ptr) Variable Uniform
|
27: 8(int) Constant 1
|
||||||
24: TypePointer Uniform 11(int)
|
|
||||||
27: TypeBool
|
|
||||||
30: 11(int) Constant 1
|
|
||||||
32: 6(float) Constant 0
|
|
||||||
33: 7(fvec4) ConstantComposite 32 32 32 32
|
|
||||||
36: TypePointer Output 7(fvec4)
|
|
||||||
37(@entryPointOutput): 36(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
38: 7(fvec4) FunctionCall 9(@main()
|
29: 2 FunctionCall 6(@main()
|
||||||
Store 37(@entryPointOutput) 38
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
9(@main(): 7(fvec4) Function None 8
|
6(@main(): 2 Function None 3
|
||||||
10: Label
|
7: Label
|
||||||
13(x): 12(ptr) Variable Function
|
10(x): 9(ptr) Variable Function
|
||||||
Store 13(x) 14
|
Store 10(x) 11
|
||||||
|
Branch 12
|
||||||
|
12: Label
|
||||||
|
LoopMerge 14 15 Unroll
|
||||||
|
Branch 16
|
||||||
|
16: Label
|
||||||
|
17: 8(int) Load 10(x)
|
||||||
|
22: 21(ptr) AccessChain 20 11
|
||||||
|
23: 8(int) Load 22
|
||||||
|
25: 24(bool) SLessThan 17 23
|
||||||
|
BranchConditional 25 13 14
|
||||||
|
13: Label
|
||||||
Branch 15
|
Branch 15
|
||||||
15: Label
|
15: Label
|
||||||
LoopMerge 17 18 Unroll
|
26: 8(int) Load 10(x)
|
||||||
Branch 19
|
28: 8(int) IAdd 26 27
|
||||||
19: Label
|
Store 10(x) 28
|
||||||
20: 11(int) Load 13(x)
|
Branch 12
|
||||||
25: 24(ptr) AccessChain 23 14
|
14: Label
|
||||||
26: 11(int) Load 25
|
Return
|
||||||
28: 27(bool) SLessThan 20 26
|
|
||||||
BranchConditional 28 16 17
|
|
||||||
16: Label
|
|
||||||
Branch 18
|
|
||||||
18: Label
|
|
||||||
29: 11(int) Load 13(x)
|
|
||||||
31: 11(int) IAdd 29 30
|
|
||||||
Store 13(x) 31
|
|
||||||
Branch 15
|
|
||||||
17: Label
|
|
||||||
ReturnValue 33
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -2,7 +2,7 @@ hlsl.intrinsics.barriers.comp
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:3 Function Definition: @ComputeShaderFunction( ( temp float)
|
0:3 Function Definition: @ComputeShaderFunction( ( temp void)
|
||||||
0:3 Function Parameters:
|
0:3 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:4 MemoryBarrier ( temp void)
|
0:4 MemoryBarrier ( temp void)
|
||||||
@ -11,17 +11,11 @@ local_size = (1, 1, 1)
|
|||||||
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
|
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
|
||||||
0:8 WorkgroupMemoryBarrier ( temp void)
|
0:8 WorkgroupMemoryBarrier ( temp void)
|
||||||
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
|
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
|
||||||
0:11 Branch: Return with expression
|
|
||||||
0:11 Constant:
|
|
||||||
0:11 0.000000
|
|
||||||
0:3 Function Definition: ComputeShaderFunction( ( temp void)
|
0:3 Function Definition: ComputeShaderFunction( ( temp void)
|
||||||
0:3 Function Parameters:
|
0:3 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:3 move second child to first child ( temp float)
|
0:3 Function Call: @ComputeShaderFunction( ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out float)
|
|
||||||
0:3 Function Call: @ComputeShaderFunction( ( temp float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? '@entryPointOutput' (layout( location=0) out float)
|
|
||||||
|
|
||||||
|
|
||||||
Linked compute stage:
|
Linked compute stage:
|
||||||
@ -30,7 +24,7 @@ Linked compute stage:
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:3 Function Definition: @ComputeShaderFunction( ( temp float)
|
0:3 Function Definition: @ComputeShaderFunction( ( temp void)
|
||||||
0:3 Function Parameters:
|
0:3 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:4 MemoryBarrier ( temp void)
|
0:4 MemoryBarrier ( temp void)
|
||||||
@ -39,58 +33,44 @@ local_size = (1, 1, 1)
|
|||||||
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
|
0:7 DeviceMemoryBarrierWithGroupSync ( temp void)
|
||||||
0:8 WorkgroupMemoryBarrier ( temp void)
|
0:8 WorkgroupMemoryBarrier ( temp void)
|
||||||
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
|
0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void)
|
||||||
0:11 Branch: Return with expression
|
|
||||||
0:11 Constant:
|
|
||||||
0:11 0.000000
|
|
||||||
0:3 Function Definition: ComputeShaderFunction( ( temp void)
|
0:3 Function Definition: ComputeShaderFunction( ( temp void)
|
||||||
0:3 Function Parameters:
|
0:3 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:3 move second child to first child ( temp float)
|
0:3 Function Call: @ComputeShaderFunction( ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out float)
|
|
||||||
0:3 Function Call: @ComputeShaderFunction( ( temp float)
|
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? '@entryPointOutput' (layout( location=0) out float)
|
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 22
|
// Id's are bound by 15
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint GLCompute 4 "ComputeShaderFunction" 20
|
EntryPoint GLCompute 4 "ComputeShaderFunction"
|
||||||
ExecutionMode 4 LocalSize 1 1 1
|
ExecutionMode 4 LocalSize 1 1 1
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "ComputeShaderFunction"
|
Name 4 "ComputeShaderFunction"
|
||||||
Name 8 "@ComputeShaderFunction("
|
Name 6 "@ComputeShaderFunction("
|
||||||
Name 20 "@entryPointOutput"
|
|
||||||
Decorate 20(@entryPointOutput) Location 0
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
8: TypeInt 32 0
|
||||||
7: TypeFunction 6(float)
|
9: 8(int) Constant 1
|
||||||
10: TypeInt 32 0
|
10: 8(int) Constant 3400
|
||||||
11: 10(int) Constant 1
|
11: 8(int) Constant 2
|
||||||
12: 10(int) Constant 3400
|
12: 8(int) Constant 2120
|
||||||
13: 10(int) Constant 2
|
13: 8(int) Constant 264
|
||||||
14: 10(int) Constant 2120
|
|
||||||
15: 10(int) Constant 264
|
|
||||||
16: 6(float) Constant 0
|
|
||||||
19: TypePointer Output 6(float)
|
|
||||||
20(@entryPointOutput): 19(ptr) Variable Output
|
|
||||||
4(ComputeShaderFunction): 2 Function None 3
|
4(ComputeShaderFunction): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
21: 6(float) FunctionCall 8(@ComputeShaderFunction()
|
14: 2 FunctionCall 6(@ComputeShaderFunction()
|
||||||
Store 20(@entryPointOutput) 21
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
8(@ComputeShaderFunction(): 6(float) Function None 7
|
6(@ComputeShaderFunction(): 2 Function None 3
|
||||||
9: Label
|
7: Label
|
||||||
MemoryBarrier 11 12
|
MemoryBarrier 9 10
|
||||||
ControlBarrier 13 11 12
|
ControlBarrier 11 9 10
|
||||||
MemoryBarrier 11 14
|
MemoryBarrier 9 12
|
||||||
ControlBarrier 13 11 14
|
ControlBarrier 11 9 12
|
||||||
MemoryBarrier 13 15
|
MemoryBarrier 11 13
|
||||||
ControlBarrier 13 13 15
|
ControlBarrier 11 11 13
|
||||||
ReturnValue 16
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -2,86 +2,57 @@ hlsl.intrinsics.negative.comp
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp float)
|
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp void)
|
||||||
0:2 Function Parameters:
|
0:2 Function Parameters:
|
||||||
0:2 'inF0' ( in float)
|
0:2 'inF0' ( in float)
|
||||||
0:2 'inF1' ( in float)
|
0:2 'inF1' ( in float)
|
||||||
0:2 'inF2' ( in float)
|
0:2 'inF2' ( in float)
|
||||||
0:2 'inI0' ( in int)
|
0:2 'inI0' ( in int)
|
||||||
|
0:55 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp void)
|
||||||
|
0:55 Function Parameters:
|
||||||
|
0:55 'inF0' ( in 1-component vector of float)
|
||||||
|
0:55 'inF1' ( in 1-component vector of float)
|
||||||
|
0:55 'inF2' ( in 1-component vector of float)
|
||||||
|
0:55 'inI0' ( in 1-component vector of int)
|
||||||
|
0:62 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp void)
|
||||||
|
0:62 Function Parameters:
|
||||||
|
0:62 'inF0' ( in 2-component vector of float)
|
||||||
|
0:62 'inF1' ( in 2-component vector of float)
|
||||||
|
0:62 'inF2' ( in 2-component vector of float)
|
||||||
|
0:62 'inI0' ( in 2-component vector of int)
|
||||||
|
0:107 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp void)
|
||||||
|
0:107 Function Parameters:
|
||||||
|
0:107 'inF0' ( in 3-component vector of float)
|
||||||
|
0:107 'inF1' ( in 3-component vector of float)
|
||||||
|
0:107 'inF2' ( in 3-component vector of float)
|
||||||
|
0:107 'inI0' ( in 3-component vector of int)
|
||||||
|
0:150 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
|
||||||
|
0:150 Function Parameters:
|
||||||
|
0:150 'inF0' ( in 4-component vector of float)
|
||||||
|
0:150 'inF1' ( in 4-component vector of float)
|
||||||
|
0:150 'inF2' ( in 4-component vector of float)
|
||||||
|
0:150 'inI0' ( in 4-component vector of int)
|
||||||
|
0:150 Function Definition: ComputeShaderFunction( ( temp void)
|
||||||
|
0:150 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:53 Branch: Return with expression
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:53 Constant:
|
|
||||||
0:53 0.000000
|
|
||||||
0:57 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp 1-component vector of float)
|
|
||||||
0:57 Function Parameters:
|
|
||||||
0:57 'inF0' ( in 1-component vector of float)
|
|
||||||
0:57 'inF1' ( in 1-component vector of float)
|
|
||||||
0:57 'inF2' ( in 1-component vector of float)
|
|
||||||
0:57 'inI0' ( in 1-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:62 Branch: Return with expression
|
|
||||||
0:62 Constant:
|
|
||||||
0:62 0.000000
|
|
||||||
0:66 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp 2-component vector of float)
|
|
||||||
0:66 Function Parameters:
|
|
||||||
0:66 'inF0' ( in 2-component vector of float)
|
|
||||||
0:66 'inF1' ( in 2-component vector of float)
|
|
||||||
0:66 'inF2' ( in 2-component vector of float)
|
|
||||||
0:66 'inI0' ( in 2-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:109 Branch: Return with expression
|
|
||||||
0:109 Constant:
|
|
||||||
0:109 1.000000
|
|
||||||
0:109 2.000000
|
|
||||||
0:113 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp 3-component vector of float)
|
|
||||||
0:113 Function Parameters:
|
|
||||||
0:113 'inF0' ( in 3-component vector of float)
|
|
||||||
0:113 'inF1' ( in 3-component vector of float)
|
|
||||||
0:113 'inF2' ( in 3-component vector of float)
|
|
||||||
0:113 'inI0' ( in 3-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:154 Branch: Return with expression
|
|
||||||
0:154 Constant:
|
|
||||||
0:154 1.000000
|
|
||||||
0:154 2.000000
|
|
||||||
0:154 3.000000
|
|
||||||
0:158 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
|
|
||||||
0:158 Function Parameters:
|
|
||||||
0:158 'inF0' ( in 4-component vector of float)
|
|
||||||
0:158 'inF1' ( in 4-component vector of float)
|
|
||||||
0:158 'inF2' ( in 4-component vector of float)
|
|
||||||
0:158 'inI0' ( in 4-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:199 Branch: Return with expression
|
|
||||||
0:199 Constant:
|
|
||||||
0:199 1.000000
|
|
||||||
0:199 2.000000
|
|
||||||
0:199 3.000000
|
|
||||||
0:199 4.000000
|
|
||||||
0:158 Function Definition: ComputeShaderFunction( ( temp void)
|
|
||||||
0:158 Function Parameters:
|
|
||||||
0:? Sequence
|
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
|
||||||
0:? 'inF0' ( temp 4-component vector of float)
|
0:? 'inF0' ( temp 4-component vector of float)
|
||||||
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:? 'inF1' ( temp 4-component vector of float)
|
0:? 'inF1' ( temp 4-component vector of float)
|
||||||
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:? 'inF2' ( temp 4-component vector of float)
|
0:? 'inF2' ( temp 4-component vector of float)
|
||||||
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of int)
|
0:150 move second child to first child ( temp 4-component vector of int)
|
||||||
0:? 'inI0' ( temp 4-component vector of int)
|
0:? 'inI0' ( temp 4-component vector of int)
|
||||||
0:? 'inI0' (layout( location=3) in 4-component vector of int)
|
0:? 'inI0' (layout( location=3) in 4-component vector of int)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:158 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
|
|
||||||
0:? 'inF0' ( temp 4-component vector of float)
|
0:? 'inF0' ( temp 4-component vector of float)
|
||||||
0:? 'inF1' ( temp 4-component vector of float)
|
0:? 'inF1' ( temp 4-component vector of float)
|
||||||
0:? 'inF2' ( temp 4-component vector of float)
|
0:? 'inF2' ( temp 4-component vector of float)
|
||||||
0:? 'inI0' ( temp 4-component vector of int)
|
0:? 'inI0' ( temp 4-component vector of int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
||||||
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
||||||
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
||||||
@ -94,86 +65,57 @@ Linked compute stage:
|
|||||||
Shader version: 500
|
Shader version: 500
|
||||||
local_size = (1, 1, 1)
|
local_size = (1, 1, 1)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp float)
|
0:2 Function Definition: ComputeShaderFunctionS(f1;f1;f1;i1; ( temp void)
|
||||||
0:2 Function Parameters:
|
0:2 Function Parameters:
|
||||||
0:2 'inF0' ( in float)
|
0:2 'inF0' ( in float)
|
||||||
0:2 'inF1' ( in float)
|
0:2 'inF1' ( in float)
|
||||||
0:2 'inF2' ( in float)
|
0:2 'inF2' ( in float)
|
||||||
0:2 'inI0' ( in int)
|
0:2 'inI0' ( in int)
|
||||||
|
0:55 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp void)
|
||||||
|
0:55 Function Parameters:
|
||||||
|
0:55 'inF0' ( in 1-component vector of float)
|
||||||
|
0:55 'inF1' ( in 1-component vector of float)
|
||||||
|
0:55 'inF2' ( in 1-component vector of float)
|
||||||
|
0:55 'inI0' ( in 1-component vector of int)
|
||||||
|
0:62 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp void)
|
||||||
|
0:62 Function Parameters:
|
||||||
|
0:62 'inF0' ( in 2-component vector of float)
|
||||||
|
0:62 'inF1' ( in 2-component vector of float)
|
||||||
|
0:62 'inF2' ( in 2-component vector of float)
|
||||||
|
0:62 'inI0' ( in 2-component vector of int)
|
||||||
|
0:107 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp void)
|
||||||
|
0:107 Function Parameters:
|
||||||
|
0:107 'inF0' ( in 3-component vector of float)
|
||||||
|
0:107 'inF1' ( in 3-component vector of float)
|
||||||
|
0:107 'inF2' ( in 3-component vector of float)
|
||||||
|
0:107 'inI0' ( in 3-component vector of int)
|
||||||
|
0:150 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
|
||||||
|
0:150 Function Parameters:
|
||||||
|
0:150 'inF0' ( in 4-component vector of float)
|
||||||
|
0:150 'inF1' ( in 4-component vector of float)
|
||||||
|
0:150 'inF2' ( in 4-component vector of float)
|
||||||
|
0:150 'inI0' ( in 4-component vector of int)
|
||||||
|
0:150 Function Definition: ComputeShaderFunction( ( temp void)
|
||||||
|
0:150 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:53 Branch: Return with expression
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:53 Constant:
|
|
||||||
0:53 0.000000
|
|
||||||
0:57 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1;vi1; ( temp 1-component vector of float)
|
|
||||||
0:57 Function Parameters:
|
|
||||||
0:57 'inF0' ( in 1-component vector of float)
|
|
||||||
0:57 'inF1' ( in 1-component vector of float)
|
|
||||||
0:57 'inF2' ( in 1-component vector of float)
|
|
||||||
0:57 'inI0' ( in 1-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:62 Branch: Return with expression
|
|
||||||
0:62 Constant:
|
|
||||||
0:62 0.000000
|
|
||||||
0:66 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vi2; ( temp 2-component vector of float)
|
|
||||||
0:66 Function Parameters:
|
|
||||||
0:66 'inF0' ( in 2-component vector of float)
|
|
||||||
0:66 'inF1' ( in 2-component vector of float)
|
|
||||||
0:66 'inF2' ( in 2-component vector of float)
|
|
||||||
0:66 'inI0' ( in 2-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:109 Branch: Return with expression
|
|
||||||
0:109 Constant:
|
|
||||||
0:109 1.000000
|
|
||||||
0:109 2.000000
|
|
||||||
0:113 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vi3; ( temp 3-component vector of float)
|
|
||||||
0:113 Function Parameters:
|
|
||||||
0:113 'inF0' ( in 3-component vector of float)
|
|
||||||
0:113 'inF1' ( in 3-component vector of float)
|
|
||||||
0:113 'inF2' ( in 3-component vector of float)
|
|
||||||
0:113 'inI0' ( in 3-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:154 Branch: Return with expression
|
|
||||||
0:154 Constant:
|
|
||||||
0:154 1.000000
|
|
||||||
0:154 2.000000
|
|
||||||
0:154 3.000000
|
|
||||||
0:158 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
|
|
||||||
0:158 Function Parameters:
|
|
||||||
0:158 'inF0' ( in 4-component vector of float)
|
|
||||||
0:158 'inF1' ( in 4-component vector of float)
|
|
||||||
0:158 'inF2' ( in 4-component vector of float)
|
|
||||||
0:158 'inI0' ( in 4-component vector of int)
|
|
||||||
0:? Sequence
|
|
||||||
0:199 Branch: Return with expression
|
|
||||||
0:199 Constant:
|
|
||||||
0:199 1.000000
|
|
||||||
0:199 2.000000
|
|
||||||
0:199 3.000000
|
|
||||||
0:199 4.000000
|
|
||||||
0:158 Function Definition: ComputeShaderFunction( ( temp void)
|
|
||||||
0:158 Function Parameters:
|
|
||||||
0:? Sequence
|
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
|
||||||
0:? 'inF0' ( temp 4-component vector of float)
|
0:? 'inF0' ( temp 4-component vector of float)
|
||||||
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:? 'inF1' ( temp 4-component vector of float)
|
0:? 'inF1' ( temp 4-component vector of float)
|
||||||
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 move second child to first child ( temp 4-component vector of float)
|
||||||
0:? 'inF2' ( temp 4-component vector of float)
|
0:? 'inF2' ( temp 4-component vector of float)
|
||||||
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
||||||
0:158 move second child to first child ( temp 4-component vector of int)
|
0:150 move second child to first child ( temp 4-component vector of int)
|
||||||
0:? 'inI0' ( temp 4-component vector of int)
|
0:? 'inI0' ( temp 4-component vector of int)
|
||||||
0:? 'inI0' (layout( location=3) in 4-component vector of int)
|
0:? 'inI0' (layout( location=3) in 4-component vector of int)
|
||||||
0:158 move second child to first child ( temp 4-component vector of float)
|
0:150 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp void)
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:158 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float)
|
|
||||||
0:? 'inF0' ( temp 4-component vector of float)
|
0:? 'inF0' ( temp 4-component vector of float)
|
||||||
0:? 'inF1' ( temp 4-component vector of float)
|
0:? 'inF1' ( temp 4-component vector of float)
|
||||||
0:? 'inF2' ( temp 4-component vector of float)
|
0:? 'inF2' ( temp 4-component vector of float)
|
||||||
0:? 'inI0' ( temp 4-component vector of int)
|
0:? 'inI0' ( temp 4-component vector of int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
|
||||||
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
0:? 'inF0' (layout( location=0) in 4-component vector of float)
|
||||||
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
0:? 'inF1' (layout( location=1) in 4-component vector of float)
|
||||||
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
0:? 'inF2' (layout( location=2) in 4-component vector of float)
|
||||||
@ -181,12 +123,12 @@ local_size = (1, 1, 1)
|
|||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 99
|
// Id's are bound by 79
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint GLCompute 4 "ComputeShaderFunction" 76 79 82 86 89
|
EntryPoint GLCompute 4 "ComputeShaderFunction" 58 61 64 68
|
||||||
ExecutionMode 4 LocalSize 1 1 1
|
ExecutionMode 4 LocalSize 1 1 1
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "ComputeShaderFunction"
|
Name 4 "ComputeShaderFunction"
|
||||||
@ -215,129 +157,116 @@ local_size = (1, 1, 1)
|
|||||||
Name 51 "inF1"
|
Name 51 "inF1"
|
||||||
Name 52 "inF2"
|
Name 52 "inF2"
|
||||||
Name 53 "inI0"
|
Name 53 "inI0"
|
||||||
Name 74 "inF0"
|
Name 56 "inF0"
|
||||||
Name 76 "inF0"
|
Name 58 "inF0"
|
||||||
Name 78 "inF1"
|
Name 60 "inF1"
|
||||||
Name 79 "inF1"
|
Name 61 "inF1"
|
||||||
Name 81 "inF2"
|
Name 63 "inF2"
|
||||||
Name 82 "inF2"
|
Name 64 "inF2"
|
||||||
Name 84 "inI0"
|
Name 66 "inI0"
|
||||||
Name 86 "inI0"
|
Name 68 "inI0"
|
||||||
Name 89 "@entryPointOutput"
|
Name 70 "param"
|
||||||
Name 90 "param"
|
Name 72 "param"
|
||||||
Name 92 "param"
|
Name 74 "param"
|
||||||
Name 94 "param"
|
Name 76 "param"
|
||||||
Name 96 "param"
|
Decorate 58(inF0) Location 0
|
||||||
Decorate 76(inF0) Location 0
|
Decorate 61(inF1) Location 1
|
||||||
Decorate 79(inF1) Location 1
|
Decorate 64(inF2) Location 2
|
||||||
Decorate 82(inF2) Location 2
|
Decorate 68(inI0) Location 3
|
||||||
Decorate 86(inI0) Location 3
|
|
||||||
Decorate 89(@entryPointOutput) Location 0
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
7: TypePointer Function 6(float)
|
7: TypePointer Function 6(float)
|
||||||
8: TypeInt 32 1
|
8: TypeInt 32 1
|
||||||
9: TypePointer Function 8(int)
|
9: TypePointer Function 8(int)
|
||||||
10: TypeFunction 6(float) 7(ptr) 7(ptr) 7(ptr) 9(ptr)
|
10: TypeFunction 2 7(ptr) 7(ptr) 7(ptr) 9(ptr)
|
||||||
23: TypeVector 6(float) 2
|
23: TypeVector 6(float) 2
|
||||||
24: TypePointer Function 23(fvec2)
|
24: TypePointer Function 23(fvec2)
|
||||||
25: TypeVector 8(int) 2
|
25: TypeVector 8(int) 2
|
||||||
26: TypePointer Function 25(ivec2)
|
26: TypePointer Function 25(ivec2)
|
||||||
27: TypeFunction 23(fvec2) 24(ptr) 24(ptr) 24(ptr) 26(ptr)
|
27: TypeFunction 2 24(ptr) 24(ptr) 24(ptr) 26(ptr)
|
||||||
34: TypeVector 6(float) 3
|
34: TypeVector 6(float) 3
|
||||||
35: TypePointer Function 34(fvec3)
|
35: TypePointer Function 34(fvec3)
|
||||||
36: TypeVector 8(int) 3
|
36: TypeVector 8(int) 3
|
||||||
37: TypePointer Function 36(ivec3)
|
37: TypePointer Function 36(ivec3)
|
||||||
38: TypeFunction 34(fvec3) 35(ptr) 35(ptr) 35(ptr) 37(ptr)
|
38: TypeFunction 2 35(ptr) 35(ptr) 35(ptr) 37(ptr)
|
||||||
45: TypeVector 6(float) 4
|
45: TypeVector 6(float) 4
|
||||||
46: TypePointer Function 45(fvec4)
|
46: TypePointer Function 45(fvec4)
|
||||||
47: TypeVector 8(int) 4
|
47: TypeVector 8(int) 4
|
||||||
48: TypePointer Function 47(ivec4)
|
48: TypePointer Function 47(ivec4)
|
||||||
49: TypeFunction 45(fvec4) 46(ptr) 46(ptr) 46(ptr) 48(ptr)
|
49: TypeFunction 2 46(ptr) 46(ptr) 46(ptr) 48(ptr)
|
||||||
56: 6(float) Constant 0
|
57: TypePointer Input 45(fvec4)
|
||||||
61: 6(float) Constant 1065353216
|
58(inF0): 57(ptr) Variable Input
|
||||||
62: 6(float) Constant 1073741824
|
61(inF1): 57(ptr) Variable Input
|
||||||
63: 23(fvec2) ConstantComposite 61 62
|
64(inF2): 57(ptr) Variable Input
|
||||||
66: 6(float) Constant 1077936128
|
67: TypePointer Input 47(ivec4)
|
||||||
67: 34(fvec3) ConstantComposite 61 62 66
|
68(inI0): 67(ptr) Variable Input
|
||||||
70: 6(float) Constant 1082130432
|
|
||||||
71: 45(fvec4) ConstantComposite 61 62 66 70
|
|
||||||
75: TypePointer Input 45(fvec4)
|
|
||||||
76(inF0): 75(ptr) Variable Input
|
|
||||||
79(inF1): 75(ptr) Variable Input
|
|
||||||
82(inF2): 75(ptr) Variable Input
|
|
||||||
85: TypePointer Input 47(ivec4)
|
|
||||||
86(inI0): 85(ptr) Variable Input
|
|
||||||
88: TypePointer Output 45(fvec4)
|
|
||||||
89(@entryPointOutput): 88(ptr) Variable Output
|
|
||||||
4(ComputeShaderFunction): 2 Function None 3
|
4(ComputeShaderFunction): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
74(inF0): 46(ptr) Variable Function
|
56(inF0): 46(ptr) Variable Function
|
||||||
78(inF1): 46(ptr) Variable Function
|
60(inF1): 46(ptr) Variable Function
|
||||||
81(inF2): 46(ptr) Variable Function
|
63(inF2): 46(ptr) Variable Function
|
||||||
84(inI0): 48(ptr) Variable Function
|
66(inI0): 48(ptr) Variable Function
|
||||||
90(param): 46(ptr) Variable Function
|
70(param): 46(ptr) Variable Function
|
||||||
92(param): 46(ptr) Variable Function
|
72(param): 46(ptr) Variable Function
|
||||||
94(param): 46(ptr) Variable Function
|
74(param): 46(ptr) Variable Function
|
||||||
96(param): 48(ptr) Variable Function
|
76(param): 48(ptr) Variable Function
|
||||||
77: 45(fvec4) Load 76(inF0)
|
59: 45(fvec4) Load 58(inF0)
|
||||||
Store 74(inF0) 77
|
Store 56(inF0) 59
|
||||||
80: 45(fvec4) Load 79(inF1)
|
62: 45(fvec4) Load 61(inF1)
|
||||||
Store 78(inF1) 80
|
Store 60(inF1) 62
|
||||||
83: 45(fvec4) Load 82(inF2)
|
65: 45(fvec4) Load 64(inF2)
|
||||||
Store 81(inF2) 83
|
Store 63(inF2) 65
|
||||||
87: 47(ivec4) Load 86(inI0)
|
69: 47(ivec4) Load 68(inI0)
|
||||||
Store 84(inI0) 87
|
Store 66(inI0) 69
|
||||||
91: 45(fvec4) Load 74(inF0)
|
71: 45(fvec4) Load 56(inF0)
|
||||||
Store 90(param) 91
|
Store 70(param) 71
|
||||||
93: 45(fvec4) Load 78(inF1)
|
73: 45(fvec4) Load 60(inF1)
|
||||||
Store 92(param) 93
|
Store 72(param) 73
|
||||||
95: 45(fvec4) Load 81(inF2)
|
75: 45(fvec4) Load 63(inF2)
|
||||||
Store 94(param) 95
|
Store 74(param) 75
|
||||||
97: 47(ivec4) Load 84(inI0)
|
77: 47(ivec4) Load 66(inI0)
|
||||||
Store 96(param) 97
|
Store 76(param) 77
|
||||||
98: 45(fvec4) FunctionCall 54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;) 90(param) 92(param) 94(param) 96(param)
|
78: 2 FunctionCall 54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;) 70(param) 72(param) 74(param) 76(param)
|
||||||
Store 89(@entryPointOutput) 98
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
15(ComputeShaderFunctionS(f1;f1;f1;i1;): 6(float) Function None 10
|
15(ComputeShaderFunctionS(f1;f1;f1;i1;): 2 Function None 10
|
||||||
11(inF0): 7(ptr) FunctionParameter
|
11(inF0): 7(ptr) FunctionParameter
|
||||||
12(inF1): 7(ptr) FunctionParameter
|
12(inF1): 7(ptr) FunctionParameter
|
||||||
13(inF2): 7(ptr) FunctionParameter
|
13(inF2): 7(ptr) FunctionParameter
|
||||||
14(inI0): 9(ptr) FunctionParameter
|
14(inI0): 9(ptr) FunctionParameter
|
||||||
16: Label
|
16: Label
|
||||||
ReturnValue 56
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
21(ComputeShaderFunction1(vf1;vf1;vf1;vi1;): 6(float) Function None 10
|
21(ComputeShaderFunction1(vf1;vf1;vf1;vi1;): 2 Function None 10
|
||||||
17(inF0): 7(ptr) FunctionParameter
|
17(inF0): 7(ptr) FunctionParameter
|
||||||
18(inF1): 7(ptr) FunctionParameter
|
18(inF1): 7(ptr) FunctionParameter
|
||||||
19(inF2): 7(ptr) FunctionParameter
|
19(inF2): 7(ptr) FunctionParameter
|
||||||
20(inI0): 9(ptr) FunctionParameter
|
20(inI0): 9(ptr) FunctionParameter
|
||||||
22: Label
|
22: Label
|
||||||
ReturnValue 56
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
32(ComputeShaderFunction2(vf2;vf2;vf2;vi2;): 23(fvec2) Function None 27
|
32(ComputeShaderFunction2(vf2;vf2;vf2;vi2;): 2 Function None 27
|
||||||
28(inF0): 24(ptr) FunctionParameter
|
28(inF0): 24(ptr) FunctionParameter
|
||||||
29(inF1): 24(ptr) FunctionParameter
|
29(inF1): 24(ptr) FunctionParameter
|
||||||
30(inF2): 24(ptr) FunctionParameter
|
30(inF2): 24(ptr) FunctionParameter
|
||||||
31(inI0): 26(ptr) FunctionParameter
|
31(inI0): 26(ptr) FunctionParameter
|
||||||
33: Label
|
33: Label
|
||||||
ReturnValue 63
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
43(ComputeShaderFunction3(vf3;vf3;vf3;vi3;): 34(fvec3) Function None 38
|
43(ComputeShaderFunction3(vf3;vf3;vf3;vi3;): 2 Function None 38
|
||||||
39(inF0): 35(ptr) FunctionParameter
|
39(inF0): 35(ptr) FunctionParameter
|
||||||
40(inF1): 35(ptr) FunctionParameter
|
40(inF1): 35(ptr) FunctionParameter
|
||||||
41(inF2): 35(ptr) FunctionParameter
|
41(inF2): 35(ptr) FunctionParameter
|
||||||
42(inI0): 37(ptr) FunctionParameter
|
42(inI0): 37(ptr) FunctionParameter
|
||||||
44: Label
|
44: Label
|
||||||
ReturnValue 67
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;): 45(fvec4) Function None 49
|
54(@ComputeShaderFunction(vf4;vf4;vf4;vi4;): 2 Function None 49
|
||||||
50(inF0): 46(ptr) FunctionParameter
|
50(inF0): 46(ptr) FunctionParameter
|
||||||
51(inF1): 46(ptr) FunctionParameter
|
51(inF1): 46(ptr) FunctionParameter
|
||||||
52(inF2): 46(ptr) FunctionParameter
|
52(inF2): 46(ptr) FunctionParameter
|
||||||
53(inI0): 48(ptr) FunctionParameter
|
53(inI0): 48(ptr) FunctionParameter
|
||||||
55: Label
|
55: Label
|
||||||
ReturnValue 71
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -3,13 +3,20 @@ Shader version: 500
|
|||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
using depth_any
|
using depth_any
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
0:23 Function Definition: getOffset( ( temp 2-component vector of int)
|
||||||
|
0:23 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:24 Branch: Return with expression
|
||||||
|
0:24 Constant:
|
||||||
|
0:24 1 (const int)
|
||||||
|
0:24 1 (const int)
|
||||||
0:28 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
0:28 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
||||||
0:28 Function Parameters:
|
0:28 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:32 textureFetch ( temp 4-component vector of float)
|
0:32 textureFetch ( temp 4-component vector of float)
|
||||||
0:32 'g_tTex2dmsf4' ( uniform texture2DMS)
|
0:32 'g_tTex2dmsf4' ( uniform texture2DMS)
|
||||||
0:32 c2: direct index for structure ( uniform 2-component vector of int)
|
0:32 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:32 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:32 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:32 Constant:
|
0:32 Constant:
|
||||||
0:32 1 (const uint)
|
0:32 1 (const uint)
|
||||||
0:32 Constant:
|
0:32 Constant:
|
||||||
@ -17,7 +24,7 @@ using depth_any
|
|||||||
0:33 textureFetch ( temp 4-component vector of int)
|
0:33 textureFetch ( temp 4-component vector of int)
|
||||||
0:33 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
0:33 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
||||||
0:33 c2: direct index for structure ( uniform 2-component vector of int)
|
0:33 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:33 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:33 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:33 Constant:
|
0:33 Constant:
|
||||||
0:33 1 (const uint)
|
0:33 1 (const uint)
|
||||||
0:33 Constant:
|
0:33 Constant:
|
||||||
@ -25,7 +32,7 @@ using depth_any
|
|||||||
0:34 textureFetch ( temp 4-component vector of uint)
|
0:34 textureFetch ( temp 4-component vector of uint)
|
||||||
0:34 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
0:34 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
||||||
0:34 c2: direct index for structure ( uniform 2-component vector of int)
|
0:34 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:34 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:34 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:34 Constant:
|
0:34 Constant:
|
||||||
0:34 1 (const uint)
|
0:34 1 (const uint)
|
||||||
0:34 Constant:
|
0:34 Constant:
|
||||||
@ -33,43 +40,34 @@ using depth_any
|
|||||||
0:37 textureFetchOffset ( temp 4-component vector of float)
|
0:37 textureFetchOffset ( temp 4-component vector of float)
|
||||||
0:37 'g_tTex2dmsf4' ( uniform texture2DMS)
|
0:37 'g_tTex2dmsf4' ( uniform texture2DMS)
|
||||||
0:37 c2: direct index for structure ( uniform 2-component vector of int)
|
0:37 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 1 (const uint)
|
0:37 1 (const uint)
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 3 (const int)
|
0:37 3 (const int)
|
||||||
0:37 o2: direct index for structure ( uniform 2-component vector of int)
|
0:37 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:37 Constant:
|
|
||||||
0:37 5 (const uint)
|
|
||||||
0:38 textureFetchOffset ( temp 4-component vector of int)
|
0:38 textureFetchOffset ( temp 4-component vector of int)
|
||||||
0:38 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
0:38 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
||||||
0:38 c2: direct index for structure ( uniform 2-component vector of int)
|
0:38 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:38 Constant:
|
0:38 Constant:
|
||||||
0:38 1 (const uint)
|
0:38 1 (const uint)
|
||||||
0:38 Constant:
|
0:38 Constant:
|
||||||
0:38 3 (const int)
|
0:38 3 (const int)
|
||||||
0:38 o2: direct index for structure ( uniform 2-component vector of int)
|
0:38 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:38 Constant:
|
|
||||||
0:38 5 (const uint)
|
|
||||||
0:39 textureFetchOffset ( temp 4-component vector of uint)
|
0:39 textureFetchOffset ( temp 4-component vector of uint)
|
||||||
0:39 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
0:39 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
||||||
0:39 c2: direct index for structure ( uniform 2-component vector of int)
|
0:39 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 1 (const uint)
|
0:39 1 (const uint)
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 3 (const int)
|
0:39 3 (const int)
|
||||||
0:39 o2: direct index for structure ( uniform 2-component vector of int)
|
0:39 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:39 Constant:
|
|
||||||
0:39 5 (const uint)
|
|
||||||
0:42 textureFetch ( temp 4-component vector of float)
|
0:42 textureFetch ( temp 4-component vector of float)
|
||||||
0:42 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:42 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:42 c3: direct index for structure ( uniform 3-component vector of int)
|
0:42 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:42 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:42 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:42 Constant:
|
0:42 Constant:
|
||||||
0:42 2 (const uint)
|
0:42 2 (const uint)
|
||||||
0:42 Constant:
|
0:42 Constant:
|
||||||
@ -77,7 +75,7 @@ using depth_any
|
|||||||
0:43 textureFetch ( temp 4-component vector of int)
|
0:43 textureFetch ( temp 4-component vector of int)
|
||||||
0:43 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:43 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:43 c3: direct index for structure ( uniform 3-component vector of int)
|
0:43 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:43 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:43 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:43 Constant:
|
0:43 Constant:
|
||||||
0:43 2 (const uint)
|
0:43 2 (const uint)
|
||||||
0:43 Constant:
|
0:43 Constant:
|
||||||
@ -85,7 +83,7 @@ using depth_any
|
|||||||
0:44 textureFetch ( temp 4-component vector of uint)
|
0:44 textureFetch ( temp 4-component vector of uint)
|
||||||
0:44 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:44 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:44 c3: direct index for structure ( uniform 3-component vector of int)
|
0:44 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:44 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:44 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
0:44 2 (const uint)
|
0:44 2 (const uint)
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
@ -93,39 +91,30 @@ using depth_any
|
|||||||
0:47 textureFetchOffset ( temp 4-component vector of float)
|
0:47 textureFetchOffset ( temp 4-component vector of float)
|
||||||
0:47 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:47 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:47 c3: direct index for structure ( uniform 3-component vector of int)
|
0:47 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:47 Constant:
|
0:47 Constant:
|
||||||
0:47 2 (const uint)
|
0:47 2 (const uint)
|
||||||
0:47 Constant:
|
0:47 Constant:
|
||||||
0:47 3 (const int)
|
0:47 3 (const int)
|
||||||
0:47 o2: direct index for structure ( uniform 2-component vector of int)
|
0:47 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:47 Constant:
|
|
||||||
0:47 5 (const uint)
|
|
||||||
0:48 textureFetchOffset ( temp 4-component vector of int)
|
0:48 textureFetchOffset ( temp 4-component vector of int)
|
||||||
0:48 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:48 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:48 c3: direct index for structure ( uniform 3-component vector of int)
|
0:48 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:48 Constant:
|
0:48 Constant:
|
||||||
0:48 2 (const uint)
|
0:48 2 (const uint)
|
||||||
0:48 Constant:
|
0:48 Constant:
|
||||||
0:48 3 (const int)
|
0:48 3 (const int)
|
||||||
0:48 o2: direct index for structure ( uniform 2-component vector of int)
|
0:48 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:48 Constant:
|
|
||||||
0:48 5 (const uint)
|
|
||||||
0:49 textureFetchOffset ( temp 4-component vector of uint)
|
0:49 textureFetchOffset ( temp 4-component vector of uint)
|
||||||
0:49 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:49 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:49 c3: direct index for structure ( uniform 3-component vector of int)
|
0:49 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 2 (const uint)
|
0:49 2 (const uint)
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 3 (const int)
|
0:49 3 (const int)
|
||||||
0:49 o2: direct index for structure ( uniform 2-component vector of int)
|
0:49 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:49 Constant:
|
|
||||||
0:49 5 (const uint)
|
|
||||||
0:51 move second child to first child ( temp 4-component vector of float)
|
0:51 move second child to first child ( temp 4-component vector of float)
|
||||||
0:51 Color: direct index for structure ( temp 4-component vector of float)
|
0:51 Color: direct index for structure ( temp 4-component vector of float)
|
||||||
0:51 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
0:51 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
||||||
@ -172,7 +161,7 @@ using depth_any
|
|||||||
0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:? '@entryPointOutput.Depth' ( out float FragDepth)
|
0:? '@entryPointOutput.Depth' ( out float FragDepth)
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
@ -184,13 +173,20 @@ Shader version: 500
|
|||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
using depth_any
|
using depth_any
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
0:23 Function Definition: getOffset( ( temp 2-component vector of int)
|
||||||
|
0:23 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:24 Branch: Return with expression
|
||||||
|
0:24 Constant:
|
||||||
|
0:24 1 (const int)
|
||||||
|
0:24 1 (const int)
|
||||||
0:28 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
0:28 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
||||||
0:28 Function Parameters:
|
0:28 Function Parameters:
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:32 textureFetch ( temp 4-component vector of float)
|
0:32 textureFetch ( temp 4-component vector of float)
|
||||||
0:32 'g_tTex2dmsf4' ( uniform texture2DMS)
|
0:32 'g_tTex2dmsf4' ( uniform texture2DMS)
|
||||||
0:32 c2: direct index for structure ( uniform 2-component vector of int)
|
0:32 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:32 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:32 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:32 Constant:
|
0:32 Constant:
|
||||||
0:32 1 (const uint)
|
0:32 1 (const uint)
|
||||||
0:32 Constant:
|
0:32 Constant:
|
||||||
@ -198,7 +194,7 @@ using depth_any
|
|||||||
0:33 textureFetch ( temp 4-component vector of int)
|
0:33 textureFetch ( temp 4-component vector of int)
|
||||||
0:33 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
0:33 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
||||||
0:33 c2: direct index for structure ( uniform 2-component vector of int)
|
0:33 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:33 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:33 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:33 Constant:
|
0:33 Constant:
|
||||||
0:33 1 (const uint)
|
0:33 1 (const uint)
|
||||||
0:33 Constant:
|
0:33 Constant:
|
||||||
@ -206,7 +202,7 @@ using depth_any
|
|||||||
0:34 textureFetch ( temp 4-component vector of uint)
|
0:34 textureFetch ( temp 4-component vector of uint)
|
||||||
0:34 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
0:34 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
||||||
0:34 c2: direct index for structure ( uniform 2-component vector of int)
|
0:34 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:34 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:34 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:34 Constant:
|
0:34 Constant:
|
||||||
0:34 1 (const uint)
|
0:34 1 (const uint)
|
||||||
0:34 Constant:
|
0:34 Constant:
|
||||||
@ -214,43 +210,34 @@ using depth_any
|
|||||||
0:37 textureFetchOffset ( temp 4-component vector of float)
|
0:37 textureFetchOffset ( temp 4-component vector of float)
|
||||||
0:37 'g_tTex2dmsf4' ( uniform texture2DMS)
|
0:37 'g_tTex2dmsf4' ( uniform texture2DMS)
|
||||||
0:37 c2: direct index for structure ( uniform 2-component vector of int)
|
0:37 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 1 (const uint)
|
0:37 1 (const uint)
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 3 (const int)
|
0:37 3 (const int)
|
||||||
0:37 o2: direct index for structure ( uniform 2-component vector of int)
|
0:37 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:37 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:37 Constant:
|
|
||||||
0:37 5 (const uint)
|
|
||||||
0:38 textureFetchOffset ( temp 4-component vector of int)
|
0:38 textureFetchOffset ( temp 4-component vector of int)
|
||||||
0:38 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
0:38 'g_tTex2dmsi4' ( uniform itexture2DMS)
|
||||||
0:38 c2: direct index for structure ( uniform 2-component vector of int)
|
0:38 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:38 Constant:
|
0:38 Constant:
|
||||||
0:38 1 (const uint)
|
0:38 1 (const uint)
|
||||||
0:38 Constant:
|
0:38 Constant:
|
||||||
0:38 3 (const int)
|
0:38 3 (const int)
|
||||||
0:38 o2: direct index for structure ( uniform 2-component vector of int)
|
0:38 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:38 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:38 Constant:
|
|
||||||
0:38 5 (const uint)
|
|
||||||
0:39 textureFetchOffset ( temp 4-component vector of uint)
|
0:39 textureFetchOffset ( temp 4-component vector of uint)
|
||||||
0:39 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
0:39 'g_tTex2dmsu4' ( uniform utexture2DMS)
|
||||||
0:39 c2: direct index for structure ( uniform 2-component vector of int)
|
0:39 c2: direct index for structure ( uniform 2-component vector of int)
|
||||||
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 1 (const uint)
|
0:39 1 (const uint)
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 3 (const int)
|
0:39 3 (const int)
|
||||||
0:39 o2: direct index for structure ( uniform 2-component vector of int)
|
0:39 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:39 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:39 Constant:
|
|
||||||
0:39 5 (const uint)
|
|
||||||
0:42 textureFetch ( temp 4-component vector of float)
|
0:42 textureFetch ( temp 4-component vector of float)
|
||||||
0:42 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:42 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:42 c3: direct index for structure ( uniform 3-component vector of int)
|
0:42 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:42 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:42 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:42 Constant:
|
0:42 Constant:
|
||||||
0:42 2 (const uint)
|
0:42 2 (const uint)
|
||||||
0:42 Constant:
|
0:42 Constant:
|
||||||
@ -258,7 +245,7 @@ using depth_any
|
|||||||
0:43 textureFetch ( temp 4-component vector of int)
|
0:43 textureFetch ( temp 4-component vector of int)
|
||||||
0:43 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:43 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:43 c3: direct index for structure ( uniform 3-component vector of int)
|
0:43 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:43 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:43 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:43 Constant:
|
0:43 Constant:
|
||||||
0:43 2 (const uint)
|
0:43 2 (const uint)
|
||||||
0:43 Constant:
|
0:43 Constant:
|
||||||
@ -266,7 +253,7 @@ using depth_any
|
|||||||
0:44 textureFetch ( temp 4-component vector of uint)
|
0:44 textureFetch ( temp 4-component vector of uint)
|
||||||
0:44 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:44 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:44 c3: direct index for structure ( uniform 3-component vector of int)
|
0:44 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:44 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:44 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
0:44 2 (const uint)
|
0:44 2 (const uint)
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
@ -274,39 +261,30 @@ using depth_any
|
|||||||
0:47 textureFetchOffset ( temp 4-component vector of float)
|
0:47 textureFetchOffset ( temp 4-component vector of float)
|
||||||
0:47 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:47 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:47 c3: direct index for structure ( uniform 3-component vector of int)
|
0:47 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:47 Constant:
|
0:47 Constant:
|
||||||
0:47 2 (const uint)
|
0:47 2 (const uint)
|
||||||
0:47 Constant:
|
0:47 Constant:
|
||||||
0:47 3 (const int)
|
0:47 3 (const int)
|
||||||
0:47 o2: direct index for structure ( uniform 2-component vector of int)
|
0:47 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:47 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:47 Constant:
|
|
||||||
0:47 5 (const uint)
|
|
||||||
0:48 textureFetchOffset ( temp 4-component vector of int)
|
0:48 textureFetchOffset ( temp 4-component vector of int)
|
||||||
0:48 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:48 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:48 c3: direct index for structure ( uniform 3-component vector of int)
|
0:48 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:48 Constant:
|
0:48 Constant:
|
||||||
0:48 2 (const uint)
|
0:48 2 (const uint)
|
||||||
0:48 Constant:
|
0:48 Constant:
|
||||||
0:48 3 (const int)
|
0:48 3 (const int)
|
||||||
0:48 o2: direct index for structure ( uniform 2-component vector of int)
|
0:48 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:48 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:48 Constant:
|
|
||||||
0:48 5 (const uint)
|
|
||||||
0:49 textureFetchOffset ( temp 4-component vector of uint)
|
0:49 textureFetchOffset ( temp 4-component vector of uint)
|
||||||
0:49 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:49 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:49 c3: direct index for structure ( uniform 3-component vector of int)
|
0:49 c3: direct index for structure ( uniform 3-component vector of int)
|
||||||
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 2 (const uint)
|
0:49 2 (const uint)
|
||||||
0:49 Constant:
|
0:49 Constant:
|
||||||
0:49 3 (const int)
|
0:49 3 (const int)
|
||||||
0:49 o2: direct index for structure ( uniform 2-component vector of int)
|
0:49 Function Call: getOffset( ( temp 2-component vector of int)
|
||||||
0:49 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
|
||||||
0:49 Constant:
|
|
||||||
0:49 5 (const uint)
|
|
||||||
0:51 move second child to first child ( temp 4-component vector of float)
|
0:51 move second child to first child ( temp 4-component vector of float)
|
||||||
0:51 Color: direct index for structure ( temp 4-component vector of float)
|
0:51 Color: direct index for structure ( temp 4-component vector of float)
|
||||||
0:51 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
0:51 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth})
|
||||||
@ -353,208 +331,199 @@ using depth_any
|
|||||||
0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
|
||||||
0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray)
|
||||||
0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray)
|
||||||
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4})
|
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4})
|
||||||
0:? '@entryPointOutput.Depth' ( out float FragDepth)
|
0:? '@entryPointOutput.Depth' ( out float FragDepth)
|
||||||
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float)
|
||||||
|
|
||||||
Validation failed
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 130
|
// Id's are bound by 129
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability ImageGatherExtended
|
Capability ImageGatherExtended
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 120 124
|
EntryPoint Fragment 4 "main" 119 123
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
ExecutionMode 4 DepthReplacing
|
ExecutionMode 4 DepthReplacing
|
||||||
Source HLSL 500
|
Source HLSL 500
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 8 "PS_OUTPUT"
|
Name 9 "getOffset("
|
||||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
Name 13 "PS_OUTPUT"
|
||||||
MemberName 8(PS_OUTPUT) 1 "Depth"
|
MemberName 13(PS_OUTPUT) 0 "Color"
|
||||||
Name 10 "@main("
|
MemberName 13(PS_OUTPUT) 1 "Depth"
|
||||||
Name 14 "g_tTex2dmsf4"
|
Name 15 "@main("
|
||||||
Name 20 "$Global"
|
Name 23 "g_tTex2dmsf4"
|
||||||
MemberName 20($Global) 0 "c1"
|
Name 27 "$Global"
|
||||||
MemberName 20($Global) 1 "c2"
|
MemberName 27($Global) 0 "c1"
|
||||||
MemberName 20($Global) 2 "c3"
|
MemberName 27($Global) 1 "c2"
|
||||||
MemberName 20($Global) 3 "c4"
|
MemberName 27($Global) 2 "c3"
|
||||||
MemberName 20($Global) 4 "o1"
|
MemberName 27($Global) 3 "c4"
|
||||||
MemberName 20($Global) 5 "o2"
|
Name 29 ""
|
||||||
MemberName 20($Global) 6 "o3"
|
Name 37 "g_tTex2dmsi4"
|
||||||
MemberName 20($Global) 7 "o4"
|
Name 45 "g_tTex2dmsu4"
|
||||||
Name 22 ""
|
Name 68 "g_tTex2dmsf4a"
|
||||||
Name 31 "g_tTex2dmsi4"
|
Name 77 "g_tTex2dmsi4a"
|
||||||
Name 39 "g_tTex2dmsu4"
|
Name 84 "g_tTex2dmsu4a"
|
||||||
Name 66 "g_tTex2dmsf4a"
|
Name 105 "psout"
|
||||||
Name 75 "g_tTex2dmsi4a"
|
Name 116 "flattenTemp"
|
||||||
Name 82 "g_tTex2dmsu4a"
|
Name 119 "@entryPointOutput.Color"
|
||||||
Name 106 "psout"
|
Name 123 "@entryPointOutput.Depth"
|
||||||
Name 117 "flattenTemp"
|
Name 128 "g_sSamp"
|
||||||
Name 120 "@entryPointOutput.Color"
|
Decorate 23(g_tTex2dmsf4) DescriptorSet 0
|
||||||
Name 124 "@entryPointOutput.Depth"
|
Decorate 23(g_tTex2dmsf4) Binding 1
|
||||||
Name 129 "g_sSamp"
|
MemberDecorate 27($Global) 0 Offset 0
|
||||||
Decorate 14(g_tTex2dmsf4) DescriptorSet 0
|
MemberDecorate 27($Global) 1 Offset 8
|
||||||
Decorate 14(g_tTex2dmsf4) Binding 1
|
MemberDecorate 27($Global) 2 Offset 16
|
||||||
MemberDecorate 20($Global) 0 Offset 0
|
MemberDecorate 27($Global) 3 Offset 32
|
||||||
MemberDecorate 20($Global) 1 Offset 8
|
Decorate 27($Global) Block
|
||||||
MemberDecorate 20($Global) 2 Offset 16
|
Decorate 29 DescriptorSet 0
|
||||||
MemberDecorate 20($Global) 3 Offset 32
|
Decorate 29 Binding 7
|
||||||
MemberDecorate 20($Global) 4 Offset 48
|
Decorate 37(g_tTex2dmsi4) DescriptorSet 0
|
||||||
MemberDecorate 20($Global) 5 Offset 56
|
Decorate 37(g_tTex2dmsi4) Binding 2
|
||||||
MemberDecorate 20($Global) 6 Offset 64
|
Decorate 45(g_tTex2dmsu4) DescriptorSet 0
|
||||||
MemberDecorate 20($Global) 7 Offset 80
|
Decorate 45(g_tTex2dmsu4) Binding 3
|
||||||
Decorate 20($Global) Block
|
Decorate 68(g_tTex2dmsf4a) DescriptorSet 0
|
||||||
Decorate 22 DescriptorSet 0
|
Decorate 68(g_tTex2dmsf4a) Binding 4
|
||||||
Decorate 22 Binding 7
|
Decorate 77(g_tTex2dmsi4a) DescriptorSet 0
|
||||||
Decorate 31(g_tTex2dmsi4) DescriptorSet 0
|
Decorate 77(g_tTex2dmsi4a) Binding 5
|
||||||
Decorate 31(g_tTex2dmsi4) Binding 2
|
Decorate 84(g_tTex2dmsu4a) DescriptorSet 0
|
||||||
Decorate 39(g_tTex2dmsu4) DescriptorSet 0
|
Decorate 84(g_tTex2dmsu4a) Binding 6
|
||||||
Decorate 39(g_tTex2dmsu4) Binding 3
|
Decorate 119(@entryPointOutput.Color) Location 0
|
||||||
Decorate 66(g_tTex2dmsf4a) DescriptorSet 0
|
Decorate 123(@entryPointOutput.Depth) BuiltIn FragDepth
|
||||||
Decorate 66(g_tTex2dmsf4a) Binding 4
|
Decorate 128(g_sSamp) DescriptorSet 0
|
||||||
Decorate 75(g_tTex2dmsi4a) DescriptorSet 0
|
Decorate 128(g_sSamp) Binding 0
|
||||||
Decorate 75(g_tTex2dmsi4a) Binding 5
|
|
||||||
Decorate 82(g_tTex2dmsu4a) DescriptorSet 0
|
|
||||||
Decorate 82(g_tTex2dmsu4a) Binding 6
|
|
||||||
Decorate 120(@entryPointOutput.Color) Location 0
|
|
||||||
Decorate 124(@entryPointOutput.Depth) BuiltIn FragDepth
|
|
||||||
Decorate 129(g_sSamp) DescriptorSet 0
|
|
||||||
Decorate 129(g_sSamp) Binding 0
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeInt 32 1
|
||||||
7: TypeVector 6(float) 4
|
7: TypeVector 6(int) 2
|
||||||
8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float)
|
8: TypeFunction 7(ivec2)
|
||||||
9: TypeFunction 8(PS_OUTPUT)
|
11: TypeFloat 32
|
||||||
12: TypeImage 6(float) 2D multi-sampled sampled format:Unknown
|
12: TypeVector 11(float) 4
|
||||||
13: TypePointer UniformConstant 12
|
13(PS_OUTPUT): TypeStruct 12(fvec4) 11(float)
|
||||||
14(g_tTex2dmsf4): 13(ptr) Variable UniformConstant
|
14: TypeFunction 13(PS_OUTPUT)
|
||||||
16: TypeInt 32 1
|
17: 6(int) Constant 1
|
||||||
17: TypeVector 16(int) 2
|
18: 7(ivec2) ConstantComposite 17 17
|
||||||
18: TypeVector 16(int) 3
|
21: TypeImage 11(float) 2D multi-sampled sampled format:Unknown
|
||||||
19: TypeVector 16(int) 4
|
22: TypePointer UniformConstant 21
|
||||||
20($Global): TypeStruct 16(int) 17(ivec2) 18(ivec3) 19(ivec4) 16(int) 17(ivec2) 18(ivec3) 19(ivec4)
|
23(g_tTex2dmsf4): 22(ptr) Variable UniformConstant
|
||||||
21: TypePointer Uniform 20($Global)
|
25: TypeVector 6(int) 3
|
||||||
22: 21(ptr) Variable Uniform
|
26: TypeVector 6(int) 4
|
||||||
23: 16(int) Constant 1
|
27($Global): TypeStruct 6(int) 7(ivec2) 25(ivec3) 26(ivec4)
|
||||||
24: TypePointer Uniform 17(ivec2)
|
28: TypePointer Uniform 27($Global)
|
||||||
27: 16(int) Constant 3
|
29: 28(ptr) Variable Uniform
|
||||||
29: TypeImage 16(int) 2D multi-sampled sampled format:Unknown
|
30: TypePointer Uniform 7(ivec2)
|
||||||
30: TypePointer UniformConstant 29
|
33: 6(int) Constant 3
|
||||||
31(g_tTex2dmsi4): 30(ptr) Variable UniformConstant
|
35: TypeImage 6(int) 2D multi-sampled sampled format:Unknown
|
||||||
36: TypeInt 32 0
|
36: TypePointer UniformConstant 35
|
||||||
37: TypeImage 36(int) 2D multi-sampled sampled format:Unknown
|
37(g_tTex2dmsi4): 36(ptr) Variable UniformConstant
|
||||||
38: TypePointer UniformConstant 37
|
42: TypeInt 32 0
|
||||||
39(g_tTex2dmsu4): 38(ptr) Variable UniformConstant
|
43: TypeImage 42(int) 2D multi-sampled sampled format:Unknown
|
||||||
43: TypeVector 36(int) 4
|
44: TypePointer UniformConstant 43
|
||||||
48: 16(int) Constant 5
|
45(g_tTex2dmsu4): 44(ptr) Variable UniformConstant
|
||||||
64: TypeImage 6(float) 2D array multi-sampled sampled format:Unknown
|
49: TypeVector 42(int) 4
|
||||||
65: TypePointer UniformConstant 64
|
66: TypeImage 11(float) 2D array multi-sampled sampled format:Unknown
|
||||||
66(g_tTex2dmsf4a): 65(ptr) Variable UniformConstant
|
67: TypePointer UniformConstant 66
|
||||||
68: 16(int) Constant 2
|
68(g_tTex2dmsf4a): 67(ptr) Variable UniformConstant
|
||||||
69: TypePointer Uniform 18(ivec3)
|
70: 6(int) Constant 2
|
||||||
73: TypeImage 16(int) 2D array multi-sampled sampled format:Unknown
|
71: TypePointer Uniform 25(ivec3)
|
||||||
74: TypePointer UniformConstant 73
|
75: TypeImage 6(int) 2D array multi-sampled sampled format:Unknown
|
||||||
75(g_tTex2dmsi4a): 74(ptr) Variable UniformConstant
|
76: TypePointer UniformConstant 75
|
||||||
80: TypeImage 36(int) 2D array multi-sampled sampled format:Unknown
|
77(g_tTex2dmsi4a): 76(ptr) Variable UniformConstant
|
||||||
81: TypePointer UniformConstant 80
|
82: TypeImage 42(int) 2D array multi-sampled sampled format:Unknown
|
||||||
82(g_tTex2dmsu4a): 81(ptr) Variable UniformConstant
|
83: TypePointer UniformConstant 82
|
||||||
105: TypePointer Function 8(PS_OUTPUT)
|
84(g_tTex2dmsu4a): 83(ptr) Variable UniformConstant
|
||||||
107: 16(int) Constant 0
|
104: TypePointer Function 13(PS_OUTPUT)
|
||||||
108: 6(float) Constant 1065353216
|
106: 6(int) Constant 0
|
||||||
109: 7(fvec4) ConstantComposite 108 108 108 108
|
107: 11(float) Constant 1065353216
|
||||||
110: TypePointer Function 7(fvec4)
|
108: 12(fvec4) ConstantComposite 107 107 107 107
|
||||||
112: TypePointer Function 6(float)
|
109: TypePointer Function 12(fvec4)
|
||||||
119: TypePointer Output 7(fvec4)
|
111: TypePointer Function 11(float)
|
||||||
120(@entryPointOutput.Color): 119(ptr) Variable Output
|
118: TypePointer Output 12(fvec4)
|
||||||
123: TypePointer Output 6(float)
|
119(@entryPointOutput.Color): 118(ptr) Variable Output
|
||||||
124(@entryPointOutput.Depth): 123(ptr) Variable Output
|
122: TypePointer Output 11(float)
|
||||||
127: TypeSampler
|
123(@entryPointOutput.Depth): 122(ptr) Variable Output
|
||||||
128: TypePointer UniformConstant 127
|
126: TypeSampler
|
||||||
129(g_sSamp): 128(ptr) Variable UniformConstant
|
127: TypePointer UniformConstant 126
|
||||||
|
128(g_sSamp): 127(ptr) Variable UniformConstant
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
117(flattenTemp): 105(ptr) Variable Function
|
116(flattenTemp): 104(ptr) Variable Function
|
||||||
118:8(PS_OUTPUT) FunctionCall 10(@main()
|
117:13(PS_OUTPUT) FunctionCall 15(@main()
|
||||||
Store 117(flattenTemp) 118
|
Store 116(flattenTemp) 117
|
||||||
121: 110(ptr) AccessChain 117(flattenTemp) 107
|
120: 109(ptr) AccessChain 116(flattenTemp) 106
|
||||||
122: 7(fvec4) Load 121
|
121: 12(fvec4) Load 120
|
||||||
Store 120(@entryPointOutput.Color) 122
|
Store 119(@entryPointOutput.Color) 121
|
||||||
125: 112(ptr) AccessChain 117(flattenTemp) 23
|
124: 111(ptr) AccessChain 116(flattenTemp) 17
|
||||||
126: 6(float) Load 125
|
125: 11(float) Load 124
|
||||||
Store 124(@entryPointOutput.Depth) 126
|
Store 123(@entryPointOutput.Depth) 125
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
10(@main():8(PS_OUTPUT) Function None 9
|
9(getOffset(): 7(ivec2) Function None 8
|
||||||
11: Label
|
10: Label
|
||||||
106(psout): 105(ptr) Variable Function
|
ReturnValue 18
|
||||||
15: 12 Load 14(g_tTex2dmsf4)
|
FunctionEnd
|
||||||
25: 24(ptr) AccessChain 22 23
|
15(@main():13(PS_OUTPUT) Function None 14
|
||||||
26: 17(ivec2) Load 25
|
16: Label
|
||||||
28: 7(fvec4) ImageFetch 15 26 Sample 27
|
105(psout): 104(ptr) Variable Function
|
||||||
32: 29 Load 31(g_tTex2dmsi4)
|
24: 21 Load 23(g_tTex2dmsf4)
|
||||||
33: 24(ptr) AccessChain 22 23
|
31: 30(ptr) AccessChain 29 17
|
||||||
34: 17(ivec2) Load 33
|
32: 7(ivec2) Load 31
|
||||||
35: 19(ivec4) ImageFetch 32 34 Sample 27
|
34: 12(fvec4) ImageFetch 24 32 Sample 33
|
||||||
40: 37 Load 39(g_tTex2dmsu4)
|
38: 35 Load 37(g_tTex2dmsi4)
|
||||||
41: 24(ptr) AccessChain 22 23
|
39: 30(ptr) AccessChain 29 17
|
||||||
42: 17(ivec2) Load 41
|
40: 7(ivec2) Load 39
|
||||||
44: 43(ivec4) ImageFetch 40 42 Sample 27
|
41: 26(ivec4) ImageFetch 38 40 Sample 33
|
||||||
45: 12 Load 14(g_tTex2dmsf4)
|
46: 43 Load 45(g_tTex2dmsu4)
|
||||||
46: 24(ptr) AccessChain 22 23
|
47: 30(ptr) AccessChain 29 17
|
||||||
47: 17(ivec2) Load 46
|
48: 7(ivec2) Load 47
|
||||||
49: 24(ptr) AccessChain 22 48
|
50: 49(ivec4) ImageFetch 46 48 Sample 33
|
||||||
50: 17(ivec2) Load 49
|
51: 21 Load 23(g_tTex2dmsf4)
|
||||||
51: 7(fvec4) ImageFetch 45 47 Offset Sample 50 27
|
52: 30(ptr) AccessChain 29 17
|
||||||
52: 29 Load 31(g_tTex2dmsi4)
|
53: 7(ivec2) Load 52
|
||||||
53: 24(ptr) AccessChain 22 23
|
54: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
54: 17(ivec2) Load 53
|
55: 12(fvec4) ImageFetch 51 53 Offset Sample 54 33
|
||||||
55: 24(ptr) AccessChain 22 48
|
56: 35 Load 37(g_tTex2dmsi4)
|
||||||
56: 17(ivec2) Load 55
|
57: 30(ptr) AccessChain 29 17
|
||||||
57: 19(ivec4) ImageFetch 52 54 Offset Sample 56 27
|
58: 7(ivec2) Load 57
|
||||||
58: 37 Load 39(g_tTex2dmsu4)
|
59: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
59: 24(ptr) AccessChain 22 23
|
60: 26(ivec4) ImageFetch 56 58 Offset Sample 59 33
|
||||||
60: 17(ivec2) Load 59
|
61: 43 Load 45(g_tTex2dmsu4)
|
||||||
61: 24(ptr) AccessChain 22 48
|
62: 30(ptr) AccessChain 29 17
|
||||||
62: 17(ivec2) Load 61
|
63: 7(ivec2) Load 62
|
||||||
63: 43(ivec4) ImageFetch 58 60 Offset Sample 62 27
|
64: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
67: 64 Load 66(g_tTex2dmsf4a)
|
65: 49(ivec4) ImageFetch 61 63 Offset Sample 64 33
|
||||||
70: 69(ptr) AccessChain 22 68
|
69: 66 Load 68(g_tTex2dmsf4a)
|
||||||
71: 18(ivec3) Load 70
|
72: 71(ptr) AccessChain 29 70
|
||||||
72: 7(fvec4) ImageFetch 67 71 Sample 27
|
73: 25(ivec3) Load 72
|
||||||
76: 73 Load 75(g_tTex2dmsi4a)
|
74: 12(fvec4) ImageFetch 69 73 Sample 33
|
||||||
77: 69(ptr) AccessChain 22 68
|
78: 75 Load 77(g_tTex2dmsi4a)
|
||||||
78: 18(ivec3) Load 77
|
79: 71(ptr) AccessChain 29 70
|
||||||
79: 19(ivec4) ImageFetch 76 78 Sample 27
|
80: 25(ivec3) Load 79
|
||||||
83: 80 Load 82(g_tTex2dmsu4a)
|
81: 26(ivec4) ImageFetch 78 80 Sample 33
|
||||||
84: 69(ptr) AccessChain 22 68
|
85: 82 Load 84(g_tTex2dmsu4a)
|
||||||
85: 18(ivec3) Load 84
|
86: 71(ptr) AccessChain 29 70
|
||||||
86: 43(ivec4) ImageFetch 83 85 Sample 27
|
87: 25(ivec3) Load 86
|
||||||
87: 64 Load 66(g_tTex2dmsf4a)
|
88: 49(ivec4) ImageFetch 85 87 Sample 33
|
||||||
88: 69(ptr) AccessChain 22 68
|
89: 66 Load 68(g_tTex2dmsf4a)
|
||||||
89: 18(ivec3) Load 88
|
90: 71(ptr) AccessChain 29 70
|
||||||
90: 24(ptr) AccessChain 22 48
|
91: 25(ivec3) Load 90
|
||||||
91: 17(ivec2) Load 90
|
92: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
92: 7(fvec4) ImageFetch 87 89 Offset Sample 91 27
|
93: 12(fvec4) ImageFetch 89 91 Offset Sample 92 33
|
||||||
93: 73 Load 75(g_tTex2dmsi4a)
|
94: 75 Load 77(g_tTex2dmsi4a)
|
||||||
94: 69(ptr) AccessChain 22 68
|
95: 71(ptr) AccessChain 29 70
|
||||||
95: 18(ivec3) Load 94
|
96: 25(ivec3) Load 95
|
||||||
96: 24(ptr) AccessChain 22 48
|
97: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
97: 17(ivec2) Load 96
|
98: 26(ivec4) ImageFetch 94 96 Offset Sample 97 33
|
||||||
98: 19(ivec4) ImageFetch 93 95 Offset Sample 97 27
|
99: 82 Load 84(g_tTex2dmsu4a)
|
||||||
99: 80 Load 82(g_tTex2dmsu4a)
|
100: 71(ptr) AccessChain 29 70
|
||||||
100: 69(ptr) AccessChain 22 68
|
101: 25(ivec3) Load 100
|
||||||
101: 18(ivec3) Load 100
|
102: 7(ivec2) FunctionCall 9(getOffset()
|
||||||
102: 24(ptr) AccessChain 22 48
|
103: 49(ivec4) ImageFetch 99 101 Offset Sample 102 33
|
||||||
103: 17(ivec2) Load 102
|
110: 109(ptr) AccessChain 105(psout) 106
|
||||||
104: 43(ivec4) ImageFetch 99 101 Offset Sample 103 27
|
Store 110 108
|
||||||
111: 110(ptr) AccessChain 106(psout) 107
|
112: 111(ptr) AccessChain 105(psout) 17
|
||||||
Store 111 109
|
Store 112 107
|
||||||
113: 112(ptr) AccessChain 106(psout) 23
|
113:13(PS_OUTPUT) Load 105(psout)
|
||||||
Store 113 108
|
ReturnValue 113
|
||||||
114:8(PS_OUTPUT) Load 106(psout)
|
|
||||||
ReturnValue 114
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:49 0 (const uint)
|
0:49 0 (const uint)
|
||||||
0:51 move second child to first child ( temp 4-component vector of float)
|
0:51 move second child to first child ( temp 4-component vector of float)
|
||||||
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:51 Constant:
|
0:51 Constant:
|
||||||
0:51 0 (const uint)
|
0:51 0 (const uint)
|
||||||
0:51 matrix-times-vector ( temp 4-component vector of float)
|
0:51 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -44,7 +44,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||||
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:49 0 (const uint)
|
0:49 0 (const uint)
|
||||||
0:51 move second child to first child ( temp 4-component vector of float)
|
0:51 move second child to first child ( temp 4-component vector of float)
|
||||||
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:51 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:51 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:51 Constant:
|
0:51 Constant:
|
||||||
0:51 0 (const uint)
|
0:51 0 (const uint)
|
||||||
0:51 matrix-times-vector ( temp 4-component vector of float)
|
0:51 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -169,7 +169,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
0:? 'anon@2' ( out block{ out 4-component vector of float v1})
|
||||||
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
0:? 'myName' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4X4 matrix of float m})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@4' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
0:? 'anon@0' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color2})
|
||||||
|
@ -23,7 +23,7 @@ Shader version: 430
|
|||||||
0:35 0 (const uint)
|
0:35 0 (const uint)
|
||||||
0:37 move second child to first child ( temp 4-component vector of float)
|
0:37 move second child to first child ( temp 4-component vector of float)
|
||||||
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 0 (const uint)
|
0:37 0 (const uint)
|
||||||
0:37 matrix-times-vector ( temp 4-component vector of float)
|
0:37 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -37,7 +37,7 @@ Shader version: 430
|
|||||||
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||||
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ Shader version: 430
|
|||||||
0:35 0 (const uint)
|
0:35 0 (const uint)
|
||||||
0:37 move second child to first child ( temp 4-component vector of float)
|
0:37 move second child to first child ( temp 4-component vector of float)
|
||||||
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:37 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:37 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:37 Constant:
|
0:37 Constant:
|
||||||
0:37 0 (const uint)
|
0:37 0 (const uint)
|
||||||
0:37 matrix-times-vector ( temp 4-component vector of float)
|
0:37 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -150,7 +150,7 @@ Shader version: 430
|
|||||||
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
0:? 'anon@1' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||||
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
0:? 'anon@2' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@3' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
0:? 'P' ( in 4-component vector of float)
|
0:? 'P' ( in 4-component vector of float)
|
||||||
|
@ -28,7 +28,7 @@ Shader version: 430
|
|||||||
0:37 0 (const int)
|
0:37 0 (const int)
|
||||||
0:39 move second child to first child ( temp 4-component vector of float)
|
0:39 move second child to first child ( temp 4-component vector of float)
|
||||||
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 0 (const uint)
|
0:39 0 (const uint)
|
||||||
0:39 matrix-times-vector ( temp 4-component vector of float)
|
0:39 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -43,7 +43,7 @@ Shader version: 430
|
|||||||
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||||
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ Shader version: 430
|
|||||||
0:37 0 (const int)
|
0:37 0 (const int)
|
||||||
0:39 move second child to first child ( temp 4-component vector of float)
|
0:39 move second child to first child ( temp 4-component vector of float)
|
||||||
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:39 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:39 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:39 Constant:
|
0:39 Constant:
|
||||||
0:39 0 (const uint)
|
0:39 0 (const uint)
|
||||||
0:39 matrix-times-vector ( temp 4-component vector of float)
|
0:39 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -175,7 +175,7 @@ Shader version: 430
|
|||||||
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
0:? 'uC' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1})
|
||||||
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
0:? 'uBufC' (layout( column_major std430) buffer block{layout( column_major std430 offset=0) buffer 4-component vector of float color1})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
0:? 'P' ( in 4-component vector of float)
|
0:? 'P' ( in 4-component vector of float)
|
||||||
|
@ -23,7 +23,7 @@ Shader version: 430
|
|||||||
0:29 0 (const int)
|
0:29 0 (const int)
|
||||||
0:31 move second child to first child ( temp 4-component vector of float)
|
0:31 move second child to first child ( temp 4-component vector of float)
|
||||||
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -37,7 +37,7 @@ Shader version: 430
|
|||||||
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||||
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ Shader version: 430
|
|||||||
0:29 0 (const int)
|
0:29 0 (const int)
|
||||||
0:31 move second child to first child ( temp 4-component vector of float)
|
0:31 move second child to first child ( temp 4-component vector of float)
|
||||||
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:31 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:31 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:31 Constant:
|
0:31 Constant:
|
||||||
0:31 0 (const uint)
|
0:31 0 (const uint)
|
||||||
0:31 matrix-times-vector ( temp 4-component vector of float)
|
0:31 matrix-times-vector ( temp 4-component vector of float)
|
||||||
@ -156,7 +156,7 @@ Shader version: 430
|
|||||||
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
0:? 'b' ( out block{ out 4-component vector of float v1, out 4-component vector of float v2})
|
||||||
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
0:? 'c' (layout( column_major std140) uniform block{layout( column_major std140 offset=0) uniform 4-component vector of float color1, layout( column_major std140 offset=16) uniform 4-component vector of float color2})
|
||||||
0:? 'oColor' ( smooth out 4-component vector of float)
|
0:? 'oColor' ( smooth out 4-component vector of float)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
0:? 'P' ( in 4-component vector of float)
|
0:? 'P' ( in 4-component vector of float)
|
||||||
|
@ -242,6 +242,36 @@ Shader version: 130
|
|||||||
0:54 'un34' ( uniform 4X4 matrix of float)
|
0:54 'un34' ( uniform 4X4 matrix of float)
|
||||||
0:54 'um43' ( uniform 4X4 matrix of float)
|
0:54 'um43' ( uniform 4X4 matrix of float)
|
||||||
0:54 'v' ( smooth in 4-component vector of float)
|
0:54 'v' ( smooth in 4-component vector of float)
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 move second child to first child ( temp 4X2 matrix of float)
|
||||||
|
0:56 'm42' ( temp 4X2 matrix of float)
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 42.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 42.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:57 Test condition and select ( temp void)
|
||||||
|
0:57 Condition
|
||||||
|
0:57 Compare Equal ( temp bool)
|
||||||
|
0:57 'm42' ( temp 4X2 matrix of float)
|
||||||
|
0:57 Constant:
|
||||||
|
0:57 42.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 42.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 true case
|
||||||
|
0:58 Sequence
|
||||||
|
0:58 add second child into first child ( temp 4-component vector of float)
|
||||||
|
0:58 'gl_FragColor' ( fragColor 4-component vector of float FragColor)
|
||||||
|
0:58 'v' ( smooth in 4-component vector of float)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'colorTransform' ( uniform 3X3 matrix of float)
|
0:? 'colorTransform' ( uniform 3X3 matrix of float)
|
||||||
0:? 'Color' ( smooth in 3-component vector of float)
|
0:? 'Color' ( smooth in 3-component vector of float)
|
||||||
@ -495,6 +525,36 @@ Shader version: 130
|
|||||||
0:54 'un34' ( uniform 4X4 matrix of float)
|
0:54 'un34' ( uniform 4X4 matrix of float)
|
||||||
0:54 'um43' ( uniform 4X4 matrix of float)
|
0:54 'um43' ( uniform 4X4 matrix of float)
|
||||||
0:54 'v' ( smooth in 4-component vector of float)
|
0:54 'v' ( smooth in 4-component vector of float)
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 move second child to first child ( temp 4X2 matrix of float)
|
||||||
|
0:56 'm42' ( temp 4X2 matrix of float)
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 42.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 42.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:56 0.000000
|
||||||
|
0:57 Test condition and select ( temp void)
|
||||||
|
0:57 Condition
|
||||||
|
0:57 Compare Equal ( temp bool)
|
||||||
|
0:57 'm42' ( temp 4X2 matrix of float)
|
||||||
|
0:57 Constant:
|
||||||
|
0:57 42.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 42.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 0.000000
|
||||||
|
0:57 true case
|
||||||
|
0:58 Sequence
|
||||||
|
0:58 add second child into first child ( temp 4-component vector of float)
|
||||||
|
0:58 'gl_FragColor' ( fragColor 4-component vector of float FragColor)
|
||||||
|
0:58 'v' ( smooth in 4-component vector of float)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'colorTransform' ( uniform 3X3 matrix of float)
|
0:? 'colorTransform' ( uniform 3X3 matrix of float)
|
||||||
0:? 'Color' ( smooth in 3-component vector of float)
|
0:? 'Color' ( smooth in 3-component vector of float)
|
||||||
|
@ -16,6 +16,7 @@ ERROR: 0:102: 'color' : redefinition
|
|||||||
ERROR: 0:112: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
ERROR: 0:112: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
||||||
ERROR: 0:118: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
ERROR: 0:118: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
||||||
ERROR: 0:121: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
ERROR: 0:121: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
||||||
|
ERROR: 0:123: 'gl_Color' : identifiers starting with "gl_" are reserved
|
||||||
ERROR: 0:172: 'x' : undeclared identifier
|
ERROR: 0:172: 'x' : undeclared identifier
|
||||||
ERROR: 0:172: '[]' : scalar integer expression required
|
ERROR: 0:172: '[]' : scalar integer expression required
|
||||||
ERROR: 0:175: 'x' : undeclared identifier
|
ERROR: 0:175: 'x' : undeclared identifier
|
||||||
@ -37,7 +38,7 @@ ERROR: 0:226: 'in' : not allowed in nested scope
|
|||||||
ERROR: 0:227: 'in' : not allowed in nested scope
|
ERROR: 0:227: 'in' : not allowed in nested scope
|
||||||
ERROR: 0:228: 'in' : not allowed in nested scope
|
ERROR: 0:228: 'in' : not allowed in nested scope
|
||||||
ERROR: 0:232: 'out' : not allowed in nested scope
|
ERROR: 0:232: 'out' : not allowed in nested scope
|
||||||
ERROR: 38 compilation errors. No code generated.
|
ERROR: 39 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
@ -320,7 +321,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'factor' (layout( location=3 index=1) out 4-component vector of float)
|
0:? 'factor' (layout( location=3 index=1) out 4-component vector of float)
|
||||||
0:? 'colors' (layout( location=2) out 3-element array of 4-component vector of float)
|
0:? 'colors' (layout( location=2) out 3-element array of 4-component vector of float)
|
||||||
0:? 'gl_FragDepth' ( gl_FragDepth float FragDepth)
|
0:? 'gl_FragDepth' ( gl_FragDepth float FragDepth)
|
||||||
0:? 'anon@2' ( in block{ in float FogFragCoord gl_FogFragCoord, in unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
|
0:? 'gl_Color' ( flat in 4-component vector of float)
|
||||||
|
|
||||||
|
|
||||||
Linked fragment stage:
|
Linked fragment stage:
|
||||||
@ -595,5 +596,5 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'factor' (layout( location=3 index=1) out 4-component vector of float)
|
0:? 'factor' (layout( location=3 index=1) out 4-component vector of float)
|
||||||
0:? 'colors' (layout( location=2) out 3-element array of 4-component vector of float)
|
0:? 'colors' (layout( location=2) out 3-element array of 4-component vector of float)
|
||||||
0:? 'gl_FragDepth' ( gl_FragDepth float FragDepth)
|
0:? 'gl_FragDepth' ( gl_FragDepth float FragDepth)
|
||||||
0:? 'anon@2' ( in block{ in float FogFragCoord gl_FogFragCoord, in 1-element array of 4-component vector of float TexCoord gl_TexCoord, flat in 4-component vector of float Color gl_Color, in 4-component vector of float SecondaryColor gl_SecondaryColor})
|
0:? 'gl_Color' ( flat in 4-component vector of float)
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCount
|
|||||||
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:106: '' : vertex input cannot be further qualified
|
ERROR: 0:106: '' : vertex input cannot be further qualified
|
||||||
ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
ERROR: 0:106: 'gl_FrontColor' : identifiers starting with "gl_" are reserved
|
||||||
|
ERROR: 0:107: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
||||||
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
||||||
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
||||||
ERROR: 0:134: '' : function does not return a value: funcA
|
ERROR: 0:134: '' : function does not return a value: funcA
|
||||||
@ -33,7 +34,7 @@ ERROR: 0:153: '' : function does not return a value: func3
|
|||||||
ERROR: 0:169: 'format' : image formats must match
|
ERROR: 0:169: 'format' : image formats must match
|
||||||
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
||||||
ERROR: 0:170: 'format' : image formats must match
|
ERROR: 0:170: 'format' : image formats must match
|
||||||
ERROR: 34 compilation errors. No code generated.
|
ERROR: 35 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
@ -297,7 +298,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
||||||
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'anon@5' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'gl_FrontColor' ( flat in 4-component vector of float)
|
||||||
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
||||||
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
||||||
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
||||||
@ -580,7 +581,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
||||||
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'anon@5' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'gl_FrontColor' ( flat in 4-component vector of float)
|
||||||
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
||||||
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
||||||
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
||||||
|
@ -25,7 +25,8 @@ ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCount
|
|||||||
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:97: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:106: '' : vertex input cannot be further qualified
|
ERROR: 0:106: '' : vertex input cannot be further qualified
|
||||||
ERROR: 0:106: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
ERROR: 0:106: 'gl_FrontColor' : identifiers starting with "gl_" are reserved
|
||||||
|
ERROR: 0:107: 'redeclaration' : cannot change storage, memory, or auxiliary qualification of gl_FrontColor
|
||||||
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
ERROR: 0:112: 'ColorIvn' : identifier not previously declared
|
||||||
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
ERROR: 0:132: 'shared' : not supported in this stage: vertex
|
||||||
ERROR: 0:134: '' : function does not return a value: funcA
|
ERROR: 0:134: '' : function does not return a value: funcA
|
||||||
@ -34,7 +35,7 @@ ERROR: 0:153: '' : function does not return a value: func3
|
|||||||
ERROR: 0:169: 'format' : image formats must match
|
ERROR: 0:169: 'format' : image formats must match
|
||||||
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
||||||
ERROR: 0:170: 'format' : image formats must match
|
ERROR: 0:170: 'format' : image formats must match
|
||||||
ERROR: 35 compilation errors. No code generated.
|
ERROR: 36 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
@ -298,7 +299,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
||||||
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'anon@5' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'gl_FrontColor' ( flat in 4-component vector of float)
|
||||||
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
||||||
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
||||||
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
||||||
@ -581,7 +582,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
0:? 'b2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
0:? 'c2' (layout( binding=3) uniform atomic_uint)
|
||||||
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
0:? 'd2' (layout( binding=2) uniform atomic_uint)
|
||||||
0:? 'anon@5' ( out block{ invariant gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, flat out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'gl_FrontColor' ( flat in 4-component vector of float)
|
||||||
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
0:? 'ColorInv' ( smooth out 3-component vector of float)
|
||||||
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
0:? 'Color4' ( invariant centroid smooth out 3-component vector of float)
|
||||||
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
0:? 'position' ( noContraction smooth out 4-component vector of float)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
spv.1.4.OpCopyLogical.funcall.frag
|
spv.1.4.OpCopyLogical.funcall.frag
|
||||||
// Module Version 10400
|
// Module Version 10400
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 60
|
// Id's are bound by 59
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 25 37
|
EntryPoint Fragment 4 "main" 25 36
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
Source GLSL 450
|
Source GLSL 450
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
@ -23,14 +23,12 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||||||
Name 23 "blockName"
|
Name 23 "blockName"
|
||||||
MemberName 23(blockName) 0 "s1"
|
MemberName 23(blockName) 0 "s1"
|
||||||
Name 25 ""
|
Name 25 ""
|
||||||
Name 31 "S"
|
Name 31 "arg"
|
||||||
MemberName 31(S) 0 "m"
|
Name 36 "s2"
|
||||||
Name 32 "arg"
|
Name 39 "param"
|
||||||
Name 37 "s2"
|
Name 44 "param"
|
||||||
Name 40 "param"
|
Name 47 "param"
|
||||||
Name 45 "param"
|
Name 55 "param"
|
||||||
Name 48 "param"
|
|
||||||
Name 56 "param"
|
|
||||||
MemberDecorate 22(S) 0 ColMajor
|
MemberDecorate 22(S) 0 ColMajor
|
||||||
MemberDecorate 22(S) 0 Offset 0
|
MemberDecorate 22(S) 0 Offset 0
|
||||||
MemberDecorate 22(S) 0 MatrixStride 16
|
MemberDecorate 22(S) 0 MatrixStride 16
|
||||||
@ -38,7 +36,6 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||||||
Decorate 23(blockName) Block
|
Decorate 23(blockName) Block
|
||||||
Decorate 25 DescriptorSet 0
|
Decorate 25 DescriptorSet 0
|
||||||
Decorate 25 Binding 0
|
Decorate 25 Binding 0
|
||||||
MemberDecorate 31(S) 0 ColMajor
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -55,46 +52,45 @@ spv.1.4.OpCopyLogical.funcall.frag
|
|||||||
26: TypeInt 32 1
|
26: TypeInt 32 1
|
||||||
27: 26(int) Constant 0
|
27: 26(int) Constant 0
|
||||||
28: TypePointer StorageBuffer 22(S)
|
28: TypePointer StorageBuffer 22(S)
|
||||||
31(S): TypeStruct 8
|
35: TypePointer Private 9(S)
|
||||||
36: TypePointer Private 9(S)
|
36(s2): 35(ptr) Variable Private
|
||||||
37(s2): 36(ptr) Variable Private
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
32(arg): 14(ptr) Variable Function
|
31(arg): 14(ptr) Variable Function
|
||||||
40(param): 14(ptr) Variable Function
|
39(param): 14(ptr) Variable Function
|
||||||
45(param): 14(ptr) Variable Function
|
44(param): 14(ptr) Variable Function
|
||||||
48(param): 14(ptr) Variable Function
|
47(param): 14(ptr) Variable Function
|
||||||
56(param): 14(ptr) Variable Function
|
55(param): 14(ptr) Variable Function
|
||||||
29: 28(ptr) AccessChain 25 27
|
29: 28(ptr) AccessChain 25 27
|
||||||
30: 22(S) Load 29
|
30: 22(S) Load 29
|
||||||
33: 9(S) CopyLogical 30
|
32: 9(S) CopyLogical 30
|
||||||
Store 32(arg) 33
|
Store 31(arg) 32
|
||||||
34: 9(S) Load 32(arg)
|
33: 9(S) Load 31(arg)
|
||||||
35: 2 FunctionCall 12(fooConst(struct-S-mf441;) 34
|
34: 2 FunctionCall 12(fooConst(struct-S-mf441;) 33
|
||||||
38: 9(S) Load 37(s2)
|
37: 9(S) Load 36(s2)
|
||||||
39: 2 FunctionCall 12(fooConst(struct-S-mf441;) 38
|
38: 2 FunctionCall 12(fooConst(struct-S-mf441;) 37
|
||||||
41: 28(ptr) AccessChain 25 27
|
40: 28(ptr) AccessChain 25 27
|
||||||
42: 22(S) Load 41
|
41: 22(S) Load 40
|
||||||
43: 9(S) CopyLogical 42
|
42: 9(S) CopyLogical 41
|
||||||
Store 40(param) 43
|
Store 39(param) 42
|
||||||
44: 2 FunctionCall 17(foo(struct-S-mf441;) 40(param)
|
43: 2 FunctionCall 17(foo(struct-S-mf441;) 39(param)
|
||||||
46: 9(S) Load 37(s2)
|
45: 9(S) Load 36(s2)
|
||||||
Store 45(param) 46
|
Store 44(param) 45
|
||||||
47: 2 FunctionCall 17(foo(struct-S-mf441;) 45(param)
|
46: 2 FunctionCall 17(foo(struct-S-mf441;) 44(param)
|
||||||
49: 28(ptr) AccessChain 25 27
|
48: 28(ptr) AccessChain 25 27
|
||||||
50: 22(S) Load 49
|
49: 22(S) Load 48
|
||||||
51: 9(S) CopyLogical 50
|
50: 9(S) CopyLogical 49
|
||||||
Store 48(param) 51
|
Store 47(param) 50
|
||||||
52: 2 FunctionCall 20(fooOut(struct-S-mf441;) 48(param)
|
51: 2 FunctionCall 20(fooOut(struct-S-mf441;) 47(param)
|
||||||
53: 9(S) Load 48(param)
|
52: 9(S) Load 47(param)
|
||||||
54: 28(ptr) AccessChain 25 27
|
53: 28(ptr) AccessChain 25 27
|
||||||
55: 22(S) CopyLogical 53
|
54: 22(S) CopyLogical 52
|
||||||
Store 54 55
|
Store 53 54
|
||||||
57: 9(S) Load 37(s2)
|
56: 9(S) Load 36(s2)
|
||||||
Store 56(param) 57
|
Store 55(param) 56
|
||||||
58: 2 FunctionCall 20(fooOut(struct-S-mf441;) 56(param)
|
57: 2 FunctionCall 20(fooOut(struct-S-mf441;) 55(param)
|
||||||
59: 9(S) Load 56(param)
|
58: 9(S) Load 55(param)
|
||||||
Store 37(s2) 59
|
Store 36(s2) 58
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
12(fooConst(struct-S-mf441;): 2 Function None 10
|
12(fooConst(struct-S-mf441;): 2 Function None 10
|
||||||
|
74
Test/baseResults/spv.1.4.funcall.array.frag.out
Normal file
74
Test/baseResults/spv.1.4.funcall.array.frag.out
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
spv.1.4.funcall.array.frag
|
||||||
|
// Module Version 10400
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 42
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 27 31
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 450
|
||||||
|
Name 4 "main"
|
||||||
|
Name 16 "f(vf4[9];i1;"
|
||||||
|
Name 14 "a"
|
||||||
|
Name 15 "ix"
|
||||||
|
Name 20 "indexable"
|
||||||
|
Name 27 "color"
|
||||||
|
Name 29 "ub"
|
||||||
|
MemberName 29(ub) 0 "u"
|
||||||
|
Name 31 ""
|
||||||
|
Name 37 "arg"
|
||||||
|
Name 40 "param"
|
||||||
|
Decorate 27(color) Location 0
|
||||||
|
Decorate 28 ArrayStride 16
|
||||||
|
MemberDecorate 29(ub) 0 Offset 0
|
||||||
|
Decorate 29(ub) Block
|
||||||
|
Decorate 31 DescriptorSet 0
|
||||||
|
Decorate 31 Binding 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypeInt 32 0
|
||||||
|
9: 8(int) Constant 9
|
||||||
|
10: TypeArray 7(fvec4) 9
|
||||||
|
11: TypeInt 32 1
|
||||||
|
12: TypePointer Function 11(int)
|
||||||
|
13: TypeFunction 7(fvec4) 10 12(ptr)
|
||||||
|
19: TypePointer Function 10
|
||||||
|
21: TypePointer Function 7(fvec4)
|
||||||
|
26: TypePointer Output 7(fvec4)
|
||||||
|
27(color): 26(ptr) Variable Output
|
||||||
|
28: TypeArray 7(fvec4) 9
|
||||||
|
29(ub): TypeStruct 28
|
||||||
|
30: TypePointer Uniform 29(ub)
|
||||||
|
31: 30(ptr) Variable Uniform
|
||||||
|
32: 11(int) Constant 0
|
||||||
|
33: TypePointer Uniform 28
|
||||||
|
36: 11(int) Constant 2
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
37(arg): 19(ptr) Variable Function
|
||||||
|
40(param): 12(ptr) Variable Function
|
||||||
|
34: 33(ptr) AccessChain 31 32
|
||||||
|
35: 28 Load 34
|
||||||
|
38: 10 CopyLogical 35
|
||||||
|
Store 37(arg) 38
|
||||||
|
39: 10 Load 37(arg)
|
||||||
|
Store 40(param) 36
|
||||||
|
41: 7(fvec4) FunctionCall 16(f(vf4[9];i1;) 39 40(param)
|
||||||
|
Store 27(color) 41
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
16(f(vf4[9];i1;): 7(fvec4) Function None 13
|
||||||
|
14(a): 10 FunctionParameter
|
||||||
|
15(ix): 12(ptr) FunctionParameter
|
||||||
|
17: Label
|
||||||
|
20(indexable): 19(ptr) Variable Function
|
||||||
|
18: 11(int) Load 15(ix)
|
||||||
|
Store 20(indexable) 14(a)
|
||||||
|
22: 21(ptr) AccessChain 20(indexable) 18
|
||||||
|
23: 7(fvec4) Load 22
|
||||||
|
ReturnValue 23
|
||||||
|
FunctionEnd
|
106
Test/baseResults/spv.funcall.array.frag.out
Normal file
106
Test/baseResults/spv.funcall.array.frag.out
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
spv.funcall.array.frag
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 66
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 27
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 450
|
||||||
|
Name 4 "main"
|
||||||
|
Name 16 "f(vf4[9];i1;"
|
||||||
|
Name 14 "a"
|
||||||
|
Name 15 "ix"
|
||||||
|
Name 20 "indexable"
|
||||||
|
Name 27 "color"
|
||||||
|
Name 29 "ub"
|
||||||
|
MemberName 29(ub) 0 "u"
|
||||||
|
Name 31 ""
|
||||||
|
Name 37 "arg"
|
||||||
|
Name 64 "param"
|
||||||
|
Decorate 27(color) Location 0
|
||||||
|
Decorate 28 ArrayStride 16
|
||||||
|
MemberDecorate 29(ub) 0 Offset 0
|
||||||
|
Decorate 29(ub) Block
|
||||||
|
Decorate 31 DescriptorSet 0
|
||||||
|
Decorate 31 Binding 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypeInt 32 0
|
||||||
|
9: 8(int) Constant 9
|
||||||
|
10: TypeArray 7(fvec4) 9
|
||||||
|
11: TypeInt 32 1
|
||||||
|
12: TypePointer Function 11(int)
|
||||||
|
13: TypeFunction 7(fvec4) 10 12(ptr)
|
||||||
|
19: TypePointer Function 10
|
||||||
|
21: TypePointer Function 7(fvec4)
|
||||||
|
26: TypePointer Output 7(fvec4)
|
||||||
|
27(color): 26(ptr) Variable Output
|
||||||
|
28: TypeArray 7(fvec4) 9
|
||||||
|
29(ub): TypeStruct 28
|
||||||
|
30: TypePointer Uniform 29(ub)
|
||||||
|
31: 30(ptr) Variable Uniform
|
||||||
|
32: 11(int) Constant 0
|
||||||
|
33: TypePointer Uniform 28
|
||||||
|
36: 11(int) Constant 2
|
||||||
|
41: 11(int) Constant 1
|
||||||
|
46: 11(int) Constant 3
|
||||||
|
49: 11(int) Constant 4
|
||||||
|
52: 11(int) Constant 5
|
||||||
|
55: 11(int) Constant 6
|
||||||
|
58: 11(int) Constant 7
|
||||||
|
61: 11(int) Constant 8
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
37(arg): 19(ptr) Variable Function
|
||||||
|
64(param): 12(ptr) Variable Function
|
||||||
|
34: 33(ptr) AccessChain 31 32
|
||||||
|
35: 28 Load 34
|
||||||
|
38: 7(fvec4) CompositeExtract 35 0
|
||||||
|
39: 21(ptr) AccessChain 37(arg) 32
|
||||||
|
Store 39 38
|
||||||
|
40: 7(fvec4) CompositeExtract 35 1
|
||||||
|
42: 21(ptr) AccessChain 37(arg) 41
|
||||||
|
Store 42 40
|
||||||
|
43: 7(fvec4) CompositeExtract 35 2
|
||||||
|
44: 21(ptr) AccessChain 37(arg) 36
|
||||||
|
Store 44 43
|
||||||
|
45: 7(fvec4) CompositeExtract 35 3
|
||||||
|
47: 21(ptr) AccessChain 37(arg) 46
|
||||||
|
Store 47 45
|
||||||
|
48: 7(fvec4) CompositeExtract 35 4
|
||||||
|
50: 21(ptr) AccessChain 37(arg) 49
|
||||||
|
Store 50 48
|
||||||
|
51: 7(fvec4) CompositeExtract 35 5
|
||||||
|
53: 21(ptr) AccessChain 37(arg) 52
|
||||||
|
Store 53 51
|
||||||
|
54: 7(fvec4) CompositeExtract 35 6
|
||||||
|
56: 21(ptr) AccessChain 37(arg) 55
|
||||||
|
Store 56 54
|
||||||
|
57: 7(fvec4) CompositeExtract 35 7
|
||||||
|
59: 21(ptr) AccessChain 37(arg) 58
|
||||||
|
Store 59 57
|
||||||
|
60: 7(fvec4) CompositeExtract 35 8
|
||||||
|
62: 21(ptr) AccessChain 37(arg) 61
|
||||||
|
Store 62 60
|
||||||
|
63: 10 Load 37(arg)
|
||||||
|
Store 64(param) 36
|
||||||
|
65: 7(fvec4) FunctionCall 16(f(vf4[9];i1;) 63 64(param)
|
||||||
|
Store 27(color) 65
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
16(f(vf4[9];i1;): 7(fvec4) Function None 13
|
||||||
|
14(a): 10 FunctionParameter
|
||||||
|
15(ix): 12(ptr) FunctionParameter
|
||||||
|
17: Label
|
||||||
|
20(indexable): 19(ptr) Variable Function
|
||||||
|
18: 11(int) Load 15(ix)
|
||||||
|
Store 20(indexable) 14(a)
|
||||||
|
22: 21(ptr) AccessChain 20(indexable) 18
|
||||||
|
23: 7(fvec4) Load 22
|
||||||
|
ReturnValue 23
|
||||||
|
FunctionEnd
|
56
Test/baseResults/spv.intrinsicsSpirvByReference.vert.out
Normal file
56
Test/baseResults/spv.intrinsicsSpirvByReference.vert.out
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
spv.intrinsicsSpirvByReference.vert
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 30
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 15 17 26
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 10 "func(f1;"
|
||||||
|
Name 9 "f"
|
||||||
|
Name 15 "vec2Out"
|
||||||
|
Name 17 "floatIn"
|
||||||
|
Name 26 "floatOut"
|
||||||
|
Name 27 "param"
|
||||||
|
Decorate 15(vec2Out) Location 0
|
||||||
|
Decorate 17(floatIn) Location 0
|
||||||
|
Decorate 26(floatOut) Location 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypePointer Function 6(float)
|
||||||
|
8: TypeFunction 2 7(ptr)
|
||||||
|
12: 6(float) Constant 1056964608
|
||||||
|
13: TypeVector 6(float) 2
|
||||||
|
14: TypePointer Output 13(fvec2)
|
||||||
|
15(vec2Out): 14(ptr) Variable Output
|
||||||
|
16: TypePointer Input 6(float)
|
||||||
|
17(floatIn): 16(ptr) Variable Input
|
||||||
|
19: TypeInt 32 0
|
||||||
|
20: 19(int) Constant 1
|
||||||
|
21: TypePointer Output 6(float)
|
||||||
|
24: 19(int) Constant 0
|
||||||
|
26(floatOut): 21(ptr) Variable Output
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
27(param): 7(ptr) Variable Function
|
||||||
|
18: 6(float) Load 17(floatIn)
|
||||||
|
22: 21(ptr) AccessChain 15(vec2Out) 20
|
||||||
|
23: 6(float) ExtInst 1(GLSL.std.450) 35(Modf) 18 22
|
||||||
|
25: 21(ptr) AccessChain 15(vec2Out) 24
|
||||||
|
Store 25 23
|
||||||
|
28: 6(float) Load 26(floatOut)
|
||||||
|
Store 27(param) 28
|
||||||
|
29: 2 FunctionCall 10(func(f1;) 27(param)
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
10(func(f1;): 2 Function None 8
|
||||||
|
9(f): 7(ptr) FunctionParameter
|
||||||
|
11: Label
|
||||||
|
Store 9(f) 12
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
88
Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out
Normal file
88
Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
spv.intrinsicsSpirvDecorate.frag
|
||||||
|
Validation failed
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 43
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Extension "SPV_AMD_shader_explicit_vertex_parameter"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
14: ExtInstImport "SPV_AMD_shader_explicit_vertex_parameter"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 8 10 18 20 22 25 28 31 34 39
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "floatOut"
|
||||||
|
Name 10 "floatIn"
|
||||||
|
Name 18 "vec2Out"
|
||||||
|
Name 20 "gl_BaryCoordNoPerspAMD"
|
||||||
|
Name 22 "gl_BaryCoordNoPerspCentroidAMD"
|
||||||
|
Name 25 "gl_BaryCoordNoPerspSampleAMD"
|
||||||
|
Name 28 "gl_BaryCoordSmoothAMD"
|
||||||
|
Name 31 "gl_BaryCoordSmoothCentroidAMD"
|
||||||
|
Name 34 "gl_BaryCoordSmoothSampleAMD"
|
||||||
|
Name 39 "gl_BaryCoordPullModelAMD"
|
||||||
|
Decorate 8(floatOut) Location 0
|
||||||
|
Decorate 10(floatIn) Location 0
|
||||||
|
Decorate 10(floatIn) ExplicitInterpAMD
|
||||||
|
Decorate 18(vec2Out) Location 1
|
||||||
|
Decorate 20(gl_BaryCoordNoPerspAMD) Location 0
|
||||||
|
Decorate 20(gl_BaryCoordNoPerspAMD) BuiltIn BaryCoordNoPerspAMD
|
||||||
|
Decorate 22(gl_BaryCoordNoPerspCentroidAMD) Location 1
|
||||||
|
Decorate 22(gl_BaryCoordNoPerspCentroidAMD) BuiltIn BaryCoordNoPerspCentroidAMD
|
||||||
|
Decorate 25(gl_BaryCoordNoPerspSampleAMD) Location 2
|
||||||
|
Decorate 25(gl_BaryCoordNoPerspSampleAMD) BuiltIn BaryCoordNoPerspSampleAMD
|
||||||
|
Decorate 28(gl_BaryCoordSmoothAMD) Location 3
|
||||||
|
Decorate 28(gl_BaryCoordSmoothAMD) BuiltIn BaryCoordSmoothAMD
|
||||||
|
Decorate 31(gl_BaryCoordSmoothCentroidAMD) Location 4
|
||||||
|
Decorate 31(gl_BaryCoordSmoothCentroidAMD) BuiltIn BaryCoordSmoothCentroidAMD
|
||||||
|
Decorate 34(gl_BaryCoordSmoothSampleAMD) Location 5
|
||||||
|
Decorate 34(gl_BaryCoordSmoothSampleAMD) BuiltIn BaryCoordSmoothSampleAMD
|
||||||
|
Decorate 39(gl_BaryCoordPullModelAMD) Location 6
|
||||||
|
Decorate 39(gl_BaryCoordPullModelAMD) BuiltIn BaryCoordPullModelAMD
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypePointer Output 6(float)
|
||||||
|
8(floatOut): 7(ptr) Variable Output
|
||||||
|
9: TypePointer Input 6(float)
|
||||||
|
10(floatIn): 9(ptr) Variable Input
|
||||||
|
12: TypeInt 32 0
|
||||||
|
13: 12(int) Constant 1
|
||||||
|
16: TypeVector 6(float) 2
|
||||||
|
17: TypePointer Output 16(fvec2)
|
||||||
|
18(vec2Out): 17(ptr) Variable Output
|
||||||
|
19: TypePointer Input 16(fvec2)
|
||||||
|
20(gl_BaryCoordNoPerspAMD): 19(ptr) Variable Input
|
||||||
|
22(gl_BaryCoordNoPerspCentroidAMD): 19(ptr) Variable Input
|
||||||
|
25(gl_BaryCoordNoPerspSampleAMD): 19(ptr) Variable Input
|
||||||
|
28(gl_BaryCoordSmoothAMD): 19(ptr) Variable Input
|
||||||
|
31(gl_BaryCoordSmoothCentroidAMD): 19(ptr) Variable Input
|
||||||
|
34(gl_BaryCoordSmoothSampleAMD): 19(ptr) Variable Input
|
||||||
|
37: TypeVector 6(float) 3
|
||||||
|
38: TypePointer Input 37(fvec3)
|
||||||
|
39(gl_BaryCoordPullModelAMD): 38(ptr) Variable Input
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
11: 6(float) Load 10(floatIn)
|
||||||
|
15: 6(float) ExtInst 14(SPV_AMD_shader_explicit_vertex_parameter) 1(InterpolateAtVertexAMD) 11 13
|
||||||
|
Store 8(floatOut) 15
|
||||||
|
21: 16(fvec2) Load 20(gl_BaryCoordNoPerspAMD)
|
||||||
|
23: 16(fvec2) Load 22(gl_BaryCoordNoPerspCentroidAMD)
|
||||||
|
24: 16(fvec2) FAdd 21 23
|
||||||
|
26: 16(fvec2) Load 25(gl_BaryCoordNoPerspSampleAMD)
|
||||||
|
27: 16(fvec2) FAdd 24 26
|
||||||
|
29: 16(fvec2) Load 28(gl_BaryCoordSmoothAMD)
|
||||||
|
30: 16(fvec2) FAdd 27 29
|
||||||
|
32: 16(fvec2) Load 31(gl_BaryCoordSmoothCentroidAMD)
|
||||||
|
33: 16(fvec2) FAdd 30 32
|
||||||
|
35: 16(fvec2) Load 34(gl_BaryCoordSmoothSampleAMD)
|
||||||
|
36: 16(fvec2) FAdd 33 35
|
||||||
|
40: 37(fvec3) Load 39(gl_BaryCoordPullModelAMD)
|
||||||
|
41: 16(fvec2) VectorShuffle 40 40 0 1
|
||||||
|
42: 16(fvec2) FAdd 36 41
|
||||||
|
Store 18(vec2Out) 42
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
36
Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out
Normal file
36
Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
spv.intrinsicsSpirvExecutionMode.frag
|
||||||
|
Validation failed
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 12
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability StencilExportEXT
|
||||||
|
Extension "SPV_EXT_shader_stencil_export"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 8 10
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
ExecutionMode 4 StencilRefReplacingEXT
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "gl_FragStencilRef"
|
||||||
|
Name 10 "color"
|
||||||
|
Decorate 8(gl_FragStencilRef) Location 0
|
||||||
|
Decorate 8(gl_FragStencilRef) BuiltIn FragStencilRefEXT
|
||||||
|
Decorate 10(color) Flat
|
||||||
|
Decorate 10(color) Location 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 32 1
|
||||||
|
7: TypePointer Output 6(int)
|
||||||
|
8(gl_FragStencilRef): 7(ptr) Variable Output
|
||||||
|
9: TypePointer Input 6(int)
|
||||||
|
10(color): 9(ptr) Variable Input
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
11: 6(int) Load 10(color)
|
||||||
|
Store 8(gl_FragStencilRef) 11
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
59
Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out
Normal file
59
Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
spv.intrinsicsSpirvInstruction.vert
|
||||||
|
Validation failed
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 30
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Int64
|
||||||
|
Capability ShaderClockKHR
|
||||||
|
Extension "SPV_AMD_shader_trinary_minmax"
|
||||||
|
Extension "SPV_KHR_shader_clock"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
28: ExtInstImport "SPV_AMD_shader_trinary_minmax"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 9 13 18 21
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_ARB_gpu_shader_int64"
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "uvec2Out"
|
||||||
|
Name 13 "i64Out"
|
||||||
|
Name 18 "vec2Out"
|
||||||
|
Name 21 "vec3In"
|
||||||
|
Decorate 9(uvec2Out) Location 0
|
||||||
|
Decorate 13(i64Out) Location 1
|
||||||
|
Decorate 18(vec2Out) Location 2
|
||||||
|
Decorate 21(vec3In) Location 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeInt 32 0
|
||||||
|
7: TypeVector 6(int) 2
|
||||||
|
8: TypePointer Output 7(ivec2)
|
||||||
|
9(uvec2Out): 8(ptr) Variable Output
|
||||||
|
11: TypeInt 64 1
|
||||||
|
12: TypePointer Output 11(int64_t)
|
||||||
|
13(i64Out): 12(ptr) Variable Output
|
||||||
|
15: TypeFloat 32
|
||||||
|
16: TypeVector 15(float) 2
|
||||||
|
17: TypePointer Output 16(fvec2)
|
||||||
|
18(vec2Out): 17(ptr) Variable Output
|
||||||
|
19: TypeVector 15(float) 3
|
||||||
|
20: TypePointer Input 19(fvec3)
|
||||||
|
21(vec3In): 20(ptr) Variable Input
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
10: 7(ivec2) ReadClockKHR
|
||||||
|
Store 9(uvec2Out) 10
|
||||||
|
14: 11(int64_t) ReadClockKHR
|
||||||
|
Store 13(i64Out) 14
|
||||||
|
22: 19(fvec3) Load 21(vec3In)
|
||||||
|
23: 16(fvec2) VectorShuffle 22 22 0 1
|
||||||
|
24: 19(fvec3) Load 21(vec3In)
|
||||||
|
25: 16(fvec2) VectorShuffle 24 24 1 2
|
||||||
|
26: 19(fvec3) Load 21(vec3In)
|
||||||
|
27: 16(fvec2) VectorShuffle 26 26 2 0
|
||||||
|
29: 16(fvec2) ExtInst 28(SPV_AMD_shader_trinary_minmax) 1(FMin3AMD) 23 25 27
|
||||||
|
Store 18(vec2Out) 29
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
29
Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out
Normal file
29
Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
spv.intrinsicsSpirvLiteral.vert
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 12
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main"
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "vec4Out"
|
||||||
|
Name 10 "vec4In"
|
||||||
|
Decorate 9(vec4Out) Location 1
|
||||||
|
Decorate 10(vec4In) Location 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypePointer Function 7(fvec4)
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
9(vec4Out): 8(ptr) Variable Function
|
||||||
|
10(vec4In): 8(ptr) Variable Function
|
||||||
|
11: 7(fvec4) Load 10(vec4In) None
|
||||||
|
Store 9(vec4Out) 11 Volatile
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
30
Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out
Normal file
30
Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
spv.intrinsicsSpirvStorageClass.rchit
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 13
|
||||||
|
|
||||||
|
Capability RayTracingKHR
|
||||||
|
Capability RayTracingProvisionalKHR
|
||||||
|
Extension "SPV_KHR_ray_tracing"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint ClosestHitKHR 4 "main"
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "payload"
|
||||||
|
Decorate 9(payload) Location 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypePointer RayPayloadKHR 7(fvec4)
|
||||||
|
9(payload): 8(ptr) Variable RayPayloadKHR
|
||||||
|
10: 6(float) Constant 0
|
||||||
|
11: 6(float) Constant 1065353216
|
||||||
|
12: 7(fvec4) ConstantComposite 10 11 10 11
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
Store 9(payload) 12
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
45
Test/baseResults/spv.intrinsicsSpirvType.rgen.out
Normal file
45
Test/baseResults/spv.intrinsicsSpirvType.rgen.out
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
spv.intrinsicsSpirvType.rgen
|
||||||
|
Validation failed
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 21
|
||||||
|
|
||||||
|
Capability RayQueryKHR
|
||||||
|
Capability RayTraversalPrimitiveCullingKHR
|
||||||
|
Capability RayTracingKHR
|
||||||
|
Extension "SPV_KHR_ray_query"
|
||||||
|
Extension "SPV_KHR_ray_tracing"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint RayGenerationKHR 4 "main"
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "rq"
|
||||||
|
Name 11 "as"
|
||||||
|
Decorate 11(as) Location 0
|
||||||
|
Decorate 11(as) DescriptorSet 0
|
||||||
|
Decorate 11(as) Binding 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
7: TypePointer Function 6
|
||||||
|
10: TypePointer UniformConstant 9
|
||||||
|
11(as): 10(ptr) Variable UniformConstant
|
||||||
|
13: TypeInt 32 0
|
||||||
|
14: 13(int) Constant 0
|
||||||
|
15: TypeFloat 32
|
||||||
|
16: TypeVector 15(float) 3
|
||||||
|
17: 15(float) Constant 0
|
||||||
|
18: 16(fvec3) ConstantComposite 17 17 17
|
||||||
|
19: 15(float) Constant 1065353216
|
||||||
|
20: 16(fvec3) ConstantComposite 19 19 19
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
8(rq): 7(ptr) Variable Function
|
||||||
|
6: TypeRayQueryKHR
|
||||||
|
9: TypeAccelerationStructureKHR
|
||||||
|
12: 9 Load 11(as)
|
||||||
|
RayQueryInitializeKHR 8(rq) 12 14 14 18 17 20 19
|
||||||
|
RayQueryTerminateKHR 8(rq)
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -1,7 +1,7 @@
|
|||||||
spv.multiStructFuncall.frag
|
spv.multiStructFuncall.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 66
|
// Id's are bound by 65
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
@ -23,14 +23,12 @@ spv.multiStructFuncall.frag
|
|||||||
Name 23 "blockName"
|
Name 23 "blockName"
|
||||||
MemberName 23(blockName) 0 "s1"
|
MemberName 23(blockName) 0 "s1"
|
||||||
Name 25 ""
|
Name 25 ""
|
||||||
Name 31 "S"
|
Name 31 "arg"
|
||||||
MemberName 31(S) 0 "m"
|
Name 38 "s2"
|
||||||
Name 32 "arg"
|
Name 41 "param"
|
||||||
Name 39 "s2"
|
Name 47 "param"
|
||||||
Name 42 "param"
|
Name 50 "param"
|
||||||
Name 48 "param"
|
Name 61 "param"
|
||||||
Name 51 "param"
|
|
||||||
Name 62 "param"
|
|
||||||
MemberDecorate 22(S) 0 ColMajor
|
MemberDecorate 22(S) 0 ColMajor
|
||||||
MemberDecorate 22(S) 0 Offset 0
|
MemberDecorate 22(S) 0 Offset 0
|
||||||
MemberDecorate 22(S) 0 MatrixStride 16
|
MemberDecorate 22(S) 0 MatrixStride 16
|
||||||
@ -38,7 +36,6 @@ spv.multiStructFuncall.frag
|
|||||||
Decorate 23(blockName) BufferBlock
|
Decorate 23(blockName) BufferBlock
|
||||||
Decorate 25 DescriptorSet 0
|
Decorate 25 DescriptorSet 0
|
||||||
Decorate 25 Binding 0
|
Decorate 25 Binding 0
|
||||||
MemberDecorate 31(S) 0 ColMajor
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -55,52 +52,51 @@ spv.multiStructFuncall.frag
|
|||||||
26: TypeInt 32 1
|
26: TypeInt 32 1
|
||||||
27: 26(int) Constant 0
|
27: 26(int) Constant 0
|
||||||
28: TypePointer Uniform 22(S)
|
28: TypePointer Uniform 22(S)
|
||||||
31(S): TypeStruct 8
|
33: TypePointer Function 8
|
||||||
34: TypePointer Function 8
|
37: TypePointer Private 9(S)
|
||||||
38: TypePointer Private 9(S)
|
38(s2): 37(ptr) Variable Private
|
||||||
39(s2): 38(ptr) Variable Private
|
59: TypePointer Uniform 8
|
||||||
60: TypePointer Uniform 8
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
32(arg): 14(ptr) Variable Function
|
31(arg): 14(ptr) Variable Function
|
||||||
42(param): 14(ptr) Variable Function
|
41(param): 14(ptr) Variable Function
|
||||||
48(param): 14(ptr) Variable Function
|
47(param): 14(ptr) Variable Function
|
||||||
51(param): 14(ptr) Variable Function
|
50(param): 14(ptr) Variable Function
|
||||||
62(param): 14(ptr) Variable Function
|
61(param): 14(ptr) Variable Function
|
||||||
29: 28(ptr) AccessChain 25 27
|
29: 28(ptr) AccessChain 25 27
|
||||||
30: 22(S) Load 29
|
30: 22(S) Load 29
|
||||||
33: 8 CompositeExtract 30 0
|
32: 8 CompositeExtract 30 0
|
||||||
35: 34(ptr) AccessChain 32(arg) 27
|
34: 33(ptr) AccessChain 31(arg) 27
|
||||||
Store 35 33
|
Store 34 32
|
||||||
36: 9(S) Load 32(arg)
|
35: 9(S) Load 31(arg)
|
||||||
37: 2 FunctionCall 12(fooConst(struct-S-mf441;) 36
|
36: 2 FunctionCall 12(fooConst(struct-S-mf441;) 35
|
||||||
40: 9(S) Load 39(s2)
|
39: 9(S) Load 38(s2)
|
||||||
41: 2 FunctionCall 12(fooConst(struct-S-mf441;) 40
|
40: 2 FunctionCall 12(fooConst(struct-S-mf441;) 39
|
||||||
43: 28(ptr) AccessChain 25 27
|
42: 28(ptr) AccessChain 25 27
|
||||||
44: 22(S) Load 43
|
43: 22(S) Load 42
|
||||||
45: 8 CompositeExtract 44 0
|
44: 8 CompositeExtract 43 0
|
||||||
46: 34(ptr) AccessChain 42(param) 27
|
45: 33(ptr) AccessChain 41(param) 27
|
||||||
Store 46 45
|
Store 45 44
|
||||||
47: 2 FunctionCall 17(foo(struct-S-mf441;) 42(param)
|
46: 2 FunctionCall 17(foo(struct-S-mf441;) 41(param)
|
||||||
49: 9(S) Load 39(s2)
|
48: 9(S) Load 38(s2)
|
||||||
Store 48(param) 49
|
Store 47(param) 48
|
||||||
50: 2 FunctionCall 17(foo(struct-S-mf441;) 48(param)
|
49: 2 FunctionCall 17(foo(struct-S-mf441;) 47(param)
|
||||||
52: 28(ptr) AccessChain 25 27
|
51: 28(ptr) AccessChain 25 27
|
||||||
53: 22(S) Load 52
|
52: 22(S) Load 51
|
||||||
54: 8 CompositeExtract 53 0
|
53: 8 CompositeExtract 52 0
|
||||||
55: 34(ptr) AccessChain 51(param) 27
|
54: 33(ptr) AccessChain 50(param) 27
|
||||||
Store 55 54
|
Store 54 53
|
||||||
56: 2 FunctionCall 20(fooOut(struct-S-mf441;) 51(param)
|
55: 2 FunctionCall 20(fooOut(struct-S-mf441;) 50(param)
|
||||||
57: 9(S) Load 51(param)
|
56: 9(S) Load 50(param)
|
||||||
58: 28(ptr) AccessChain 25 27
|
57: 28(ptr) AccessChain 25 27
|
||||||
59: 8 CompositeExtract 57 0
|
58: 8 CompositeExtract 56 0
|
||||||
61: 60(ptr) AccessChain 58 27
|
60: 59(ptr) AccessChain 57 27
|
||||||
Store 61 59
|
Store 60 58
|
||||||
63: 9(S) Load 39(s2)
|
62: 9(S) Load 38(s2)
|
||||||
Store 62(param) 63
|
Store 61(param) 62
|
||||||
64: 2 FunctionCall 20(fooOut(struct-S-mf441;) 62(param)
|
63: 2 FunctionCall 20(fooOut(struct-S-mf441;) 61(param)
|
||||||
65: 9(S) Load 62(param)
|
64: 9(S) Load 61(param)
|
||||||
Store 39(s2) 65
|
Store 38(s2) 64
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
12(fooConst(struct-S-mf441;): 2 Function None 10
|
12(fooConst(struct-S-mf441;): 2 Function None 10
|
||||||
|
22
Test/baseResults/spv.subgroupUniformControlFlow.vert.out
Normal file
22
Test/baseResults/spv.subgroupUniformControlFlow.vert.out
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
spv.subgroupUniformControlFlow.vert
|
||||||
|
WARNING: 0:7: '' : attribute with arguments not recognized, skipping
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000a
|
||||||
|
// Id's are bound by 6
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Extension "SPV_KHR_subgroup_uniform_control_flow"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main"
|
||||||
|
ExecutionMode 4 SubgroupUniformControlFlow
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_subgroup_uniform_control_flow"
|
||||||
|
Name 4 "main"
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -13,7 +13,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:44 Sequence
|
0:44 Sequence
|
||||||
0:44 move second child to first child ( temp 4-component vector of float)
|
0:44 move second child to first child ( temp 4-component vector of float)
|
||||||
0:44 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:44 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:44 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:44 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
0:44 0 (const uint)
|
0:44 0 (const uint)
|
||||||
0:44 Construct vec4 ( temp 4-component vector of float)
|
0:44 Construct vec4 ( temp 4-component vector of float)
|
||||||
@ -24,7 +24,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'color' ( in 3-component vector of float)
|
0:? 'color' ( in 3-component vector of float)
|
||||||
0:? 'foo' ( uniform sampler2DRect)
|
0:? 'foo' ( uniform sampler2DRect)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out unsized 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:44 Sequence
|
0:44 Sequence
|
||||||
0:44 move second child to first child ( temp 4-component vector of float)
|
0:44 move second child to first child ( temp 4-component vector of float)
|
||||||
0:44 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
0:44 gl_Position: direct index for structure ( gl_Position 4-component vector of float Position)
|
||||||
0:44 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:44 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:44 Constant:
|
0:44 Constant:
|
||||||
0:44 0 (const uint)
|
0:44 0 (const uint)
|
||||||
0:44 Construct vec4 ( temp 4-component vector of float)
|
0:44 Construct vec4 ( temp 4-component vector of float)
|
||||||
@ -51,7 +51,7 @@ ERROR: node is still EOpNull!
|
|||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'color' ( in 3-component vector of float)
|
0:? 'color' ( in 3-component vector of float)
|
||||||
0:? 'foo' ( uniform sampler2DRect)
|
0:? 'foo' ( uniform sampler2DRect)
|
||||||
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance, gl_ClipVertex 4-component vector of float ClipVertex gl_ClipVertex, out 4-component vector of float FrontColor gl_FrontColor, out 4-component vector of float BackColor gl_BackColor, out 4-component vector of float FrontSecondaryColor gl_FrontSecondaryColor, out 4-component vector of float BackSecondaryColor gl_BackSecondaryColor, out 1-element array of 4-component vector of float TexCoord gl_TexCoord, out float FogFragCoord gl_FogFragCoord})
|
0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 1-element array of float ClipDistance gl_ClipDistance})
|
||||||
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
|
||||||
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
|
||||||
|
|
||||||
|
@ -102,18 +102,18 @@ Shader version: 450
|
|||||||
0:38 2 (const int)
|
0:38 2 (const int)
|
||||||
0:38 'sci2' ( specialization-constant const highp int)
|
0:38 'sci2' ( specialization-constant const highp int)
|
||||||
0:38 2 (const int)
|
0:38 2 (const int)
|
||||||
0:40 Construct vec2 ( temp 2-component vector of float)
|
0:40 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:40 'scf1' ( specialization-constant const highp float)
|
0:40 'scf1' ( specialization-constant const highp float)
|
||||||
0:40 1.000000
|
0:40 1.000000
|
||||||
0:40 'scf1' ( specialization-constant const highp float)
|
0:40 'scf1' ( specialization-constant const highp float)
|
||||||
0:40 1.000000
|
0:40 1.000000
|
||||||
0:41 Construct vec2 ( temp 2-element array of 2-component vector of float)
|
0:41 Construct vec2 ( temp 2-element array of 2-component vector of float)
|
||||||
0:41 Construct vec2 ( temp 2-component vector of float)
|
0:41 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 Construct vec2 ( temp 2-component vector of float)
|
0:41 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
@ -233,18 +233,18 @@ Shader version: 450
|
|||||||
0:38 2 (const int)
|
0:38 2 (const int)
|
||||||
0:38 'sci2' ( specialization-constant const highp int)
|
0:38 'sci2' ( specialization-constant const highp int)
|
||||||
0:38 2 (const int)
|
0:38 2 (const int)
|
||||||
0:40 Construct vec2 ( temp 2-component vector of float)
|
0:40 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:40 'scf1' ( specialization-constant const highp float)
|
0:40 'scf1' ( specialization-constant const highp float)
|
||||||
0:40 1.000000
|
0:40 1.000000
|
||||||
0:40 'scf1' ( specialization-constant const highp float)
|
0:40 'scf1' ( specialization-constant const highp float)
|
||||||
0:40 1.000000
|
0:40 1.000000
|
||||||
0:41 Construct vec2 ( temp 2-element array of 2-component vector of float)
|
0:41 Construct vec2 ( temp 2-element array of 2-component vector of float)
|
||||||
0:41 Construct vec2 ( temp 2-component vector of float)
|
0:41 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 Construct vec2 ( temp 2-component vector of float)
|
0:41 Construct vec2 ( specialization-constant const 2-component vector of float)
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
0:41 1.000000
|
0:41 1.000000
|
||||||
0:41 'scf1' ( specialization-constant const highp float)
|
0:41 'scf1' ( specialization-constant const highp float)
|
||||||
@ -303,6 +303,9 @@ Shader version: 450
|
|||||||
41: 14(int) Constant 2
|
41: 14(int) Constant 2
|
||||||
42: TypeArray 37(ivec2) 41
|
42: TypeArray 37(ivec2) 41
|
||||||
44: TypeVector 6(float) 2
|
44: TypeVector 6(float) 2
|
||||||
|
45: 44(fvec2) SpecConstantComposite 7(scf1) 7(scf1)
|
||||||
|
46: 44(fvec2) SpecConstantComposite 7(scf1) 7(scf1)
|
||||||
|
47: 44(fvec2) SpecConstantComposite 7(scf1) 7(scf1)
|
||||||
48: TypeArray 44(fvec2) 41
|
48: TypeArray 44(fvec2) 41
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
@ -317,9 +320,6 @@ Shader version: 450
|
|||||||
32: 8(bool) FOrdGreaterThan 7(scf1) 7(scf1)
|
32: 8(bool) FOrdGreaterThan 7(scf1) 7(scf1)
|
||||||
34: 8(bool) FUnordNotEqual 7(scf1) 7(scf1)
|
34: 8(bool) FUnordNotEqual 7(scf1) 7(scf1)
|
||||||
43: 42 CompositeConstruct 39 40
|
43: 42 CompositeConstruct 39 40
|
||||||
45: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
|
|
||||||
46: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
|
|
||||||
47: 44(fvec2) CompositeConstruct 7(scf1) 7(scf1)
|
|
||||||
49: 48 CompositeConstruct 46 47
|
49: 48 CompositeConstruct 46 47
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -5,11 +5,9 @@ uniform int bound;
|
|||||||
#define BAR 2
|
#define BAR 2
|
||||||
|
|
||||||
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
|
[numthreads(2+2, 2*3, (1+FOO)*BAR)]
|
||||||
float4 main() : SV_TARGET
|
void main()
|
||||||
{
|
{
|
||||||
[unroll(5*2 + 1) ]
|
[unroll(5*2 + 1) ]
|
||||||
for (int x=0; x<bound; ++x)
|
for (int x=0; x<bound; ++x)
|
||||||
;
|
;
|
||||||
|
|
||||||
return float4(0,0,0,0);
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
float ComputeShaderFunction()
|
void ComputeShaderFunction()
|
||||||
{
|
{
|
||||||
AllMemoryBarrier();
|
AllMemoryBarrier();
|
||||||
AllMemoryBarrierWithGroupSync();
|
AllMemoryBarrierWithGroupSync();
|
||||||
@ -7,7 +7,5 @@ float ComputeShaderFunction()
|
|||||||
DeviceMemoryBarrierWithGroupSync();
|
DeviceMemoryBarrierWithGroupSync();
|
||||||
GroupMemoryBarrier();
|
GroupMemoryBarrier();
|
||||||
GroupMemoryBarrierWithGroupSync();
|
GroupMemoryBarrierWithGroupSync();
|
||||||
|
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
|
void ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
|
||||||
{
|
{
|
||||||
uint out_u1;
|
uint out_u1;
|
||||||
|
|
||||||
@ -49,20 +49,16 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
|
|||||||
// transpose(inF0); // expect error: only valid on mats
|
// transpose(inF0); // expect error: only valid on mats
|
||||||
|
|
||||||
// TODO: texture intrinsics, when we can declare samplers.
|
// TODO: texture intrinsics, when we can declare samplers.
|
||||||
|
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float1 ComputeShaderFunction1(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
|
void ComputeShaderFunction1(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
|
||||||
{
|
{
|
||||||
// TODO: ... add when float1 prototypes are generated
|
// TODO: ... add when float1 prototypes are generated
|
||||||
|
|
||||||
// GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
|
// GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
|
||||||
|
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
|
void ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
|
||||||
{
|
{
|
||||||
uint2 out_u2;
|
uint2 out_u2;
|
||||||
|
|
||||||
@ -105,11 +101,9 @@ float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
|
|||||||
// transpose(inF0); // expect error: only valid on mats
|
// transpose(inF0); // expect error: only valid on mats
|
||||||
|
|
||||||
// TODO: texture intrinsics, when we can declare samplers.
|
// TODO: texture intrinsics, when we can declare samplers.
|
||||||
|
|
||||||
return float2(1,2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
|
void ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
|
||||||
{
|
{
|
||||||
uint3 out_u3;
|
uint3 out_u3;
|
||||||
|
|
||||||
@ -150,11 +144,9 @@ float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
|
|||||||
// transpose(inF0); // expect error: only valid on mats
|
// transpose(inF0); // expect error: only valid on mats
|
||||||
|
|
||||||
// TODO: texture intrinsics, when we can declare samplers.
|
// TODO: texture intrinsics, when we can declare samplers.
|
||||||
|
|
||||||
return float3(1,2,3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
|
void ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
|
||||||
{
|
{
|
||||||
uint4 out_u4;
|
uint4 out_u4;
|
||||||
|
|
||||||
@ -195,7 +187,5 @@ float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
|
|||||||
// transpose(inF0); // expect error: only valid on mats
|
// transpose(inF0); // expect error: only valid on mats
|
||||||
|
|
||||||
// TODO: texture intrinsics, when we can declare samplers.
|
// TODO: texture intrinsics, when we can declare samplers.
|
||||||
|
|
||||||
return float4(1,2,3,4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ uniform int2 c2;
|
|||||||
uniform int3 c3;
|
uniform int3 c3;
|
||||||
uniform int4 c4;
|
uniform int4 c4;
|
||||||
|
|
||||||
uniform int o1;
|
int2 getOffset()
|
||||||
uniform int2 o2;
|
{
|
||||||
uniform int3 o3;
|
return int2(1, 1);
|
||||||
uniform int4 o4;
|
}
|
||||||
|
|
||||||
PS_OUTPUT main()
|
PS_OUTPUT main()
|
||||||
{
|
{
|
||||||
@ -34,9 +34,9 @@ PS_OUTPUT main()
|
|||||||
g_tTex2dmsu4.Load(c2, 3);
|
g_tTex2dmsu4.Load(c2, 3);
|
||||||
|
|
||||||
// 2DMS, offset
|
// 2DMS, offset
|
||||||
g_tTex2dmsf4.Load(c2, 3, o2);
|
g_tTex2dmsf4.Load(c2, 3, getOffset());
|
||||||
g_tTex2dmsi4.Load(c2, 3, o2);
|
g_tTex2dmsi4.Load(c2, 3, getOffset());
|
||||||
g_tTex2dmsu4.Load(c2, 3, o2);
|
g_tTex2dmsu4.Load(c2, 3, getOffset());
|
||||||
|
|
||||||
// 2DMSArray, no offset
|
// 2DMSArray, no offset
|
||||||
g_tTex2dmsf4a.Load(c3, 3);
|
g_tTex2dmsf4a.Load(c3, 3);
|
||||||
@ -44,9 +44,9 @@ PS_OUTPUT main()
|
|||||||
g_tTex2dmsu4a.Load(c3, 3);
|
g_tTex2dmsu4a.Load(c3, 3);
|
||||||
|
|
||||||
// 2DMSArray, offset
|
// 2DMSArray, offset
|
||||||
g_tTex2dmsf4a.Load(c3, 3, o2);
|
g_tTex2dmsf4a.Load(c3, 3, getOffset());
|
||||||
g_tTex2dmsi4a.Load(c3, 3, o2);
|
g_tTex2dmsi4a.Load(c3, 3, getOffset());
|
||||||
g_tTex2dmsu4a.Load(c3, 3, o2);
|
g_tTex2dmsu4a.Load(c3, 3, getOffset());
|
||||||
|
|
||||||
psout.Color = 1.0;
|
psout.Color = 1.0;
|
||||||
psout.Depth = 1.0;
|
psout.Depth = 1.0;
|
||||||
|
@ -39,29 +39,39 @@ uniform int2 c2;
|
|||||||
uniform int3 c3;
|
uniform int3 c3;
|
||||||
uniform int4 c4;
|
uniform int4 c4;
|
||||||
|
|
||||||
uniform int o1;
|
int getOffset1()
|
||||||
uniform int2 o2;
|
{
|
||||||
uniform int3 o3;
|
return 1;
|
||||||
uniform int4 o4;
|
}
|
||||||
|
|
||||||
|
int2 getOffset2()
|
||||||
|
{
|
||||||
|
return int2(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int3 getOffset3()
|
||||||
|
{
|
||||||
|
return int3(1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
PS_OUTPUT main()
|
PS_OUTPUT main()
|
||||||
{
|
{
|
||||||
PS_OUTPUT psout;
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
// 1D
|
// 1D
|
||||||
g_tTex1df4.Load(c2, o1);
|
g_tTex1df4.Load(c2, getOffset1());
|
||||||
g_tTex1di4.Load(c2, o1);
|
g_tTex1di4.Load(c2, getOffset1());
|
||||||
g_tTex1du4.Load(c2, o1);
|
g_tTex1du4.Load(c2, getOffset1());
|
||||||
|
|
||||||
// 2D
|
// 2D
|
||||||
g_tTex2df4.Load(c3, o2);
|
g_tTex2df4.Load(c3, getOffset2());
|
||||||
g_tTex2di4.Load(c3, o2);
|
g_tTex2di4.Load(c3, getOffset2());
|
||||||
g_tTex2du4.Load(c3, o2);
|
g_tTex2du4.Load(c3, getOffset2());
|
||||||
|
|
||||||
// 3D
|
// 3D
|
||||||
g_tTex3df4.Load(c4, o3);
|
g_tTex3df4.Load(c4, getOffset3());
|
||||||
g_tTex3di4.Load(c4, o3);
|
g_tTex3di4.Load(c4, getOffset3());
|
||||||
g_tTex3du4.Load(c4, o3);
|
g_tTex3du4.Load(c4, getOffset3());
|
||||||
|
|
||||||
// Offset has no Cube or CubeArray forms
|
// Offset has no Cube or CubeArray forms
|
||||||
|
|
||||||
|
@ -39,24 +39,29 @@ uniform int2 c2;
|
|||||||
uniform int3 c3;
|
uniform int3 c3;
|
||||||
uniform int4 c4;
|
uniform int4 c4;
|
||||||
|
|
||||||
uniform int o1;
|
int getOffset1()
|
||||||
uniform int2 o2;
|
{
|
||||||
uniform int3 o3;
|
return 1;
|
||||||
uniform int4 o4;
|
}
|
||||||
|
|
||||||
|
int2 getOffset2()
|
||||||
|
{
|
||||||
|
return int2(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
PS_OUTPUT main()
|
PS_OUTPUT main()
|
||||||
{
|
{
|
||||||
PS_OUTPUT psout;
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
// 1DArray
|
// 1DArray
|
||||||
g_tTex1df4a.Load(c3, o1);
|
g_tTex1df4a.Load(c3, getOffset1());
|
||||||
g_tTex1di4a.Load(c3, o1);
|
g_tTex1di4a.Load(c3, getOffset1());
|
||||||
g_tTex1du4a.Load(c3, o1);
|
g_tTex1du4a.Load(c3, getOffset1());
|
||||||
|
|
||||||
// 2DArray
|
// 2DArray
|
||||||
g_tTex2df4a.Load(c4, o2);
|
g_tTex2df4a.Load(c4, getOffset2());
|
||||||
g_tTex2di4a.Load(c4, o2);
|
g_tTex2di4a.Load(c4, getOffset2());
|
||||||
g_tTex2du4a.Load(c4, o2);
|
g_tTex2du4a.Load(c4, getOffset2());
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// Load, SampleIndex
|
// Load, SampleIndex
|
||||||
|
@ -52,4 +52,9 @@ void main()
|
|||||||
gl_FragColor += m34 * u;
|
gl_FragColor += m34 * u;
|
||||||
else
|
else
|
||||||
gl_FragColor += (un34 * um43) * v;
|
gl_FragColor += (un34 * um43) * v;
|
||||||
|
|
||||||
|
mat4x2 m42 = mat4x2(42);
|
||||||
|
if (m42 == mat4x2(42, 0, 0, 42, 0, 0, 0, 0)) {
|
||||||
|
gl_FragColor += v;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
17
Test/spv.1.4.funcall.array.frag
Normal file
17
Test/spv.1.4.funcall.array.frag
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
uniform ub {
|
||||||
|
vec4 u[9];
|
||||||
|
};
|
||||||
|
|
||||||
|
vec4 f(const vec4 a[9], int ix) {
|
||||||
|
return a[ix];
|
||||||
|
}
|
||||||
|
|
||||||
|
out vec4 color;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
color = f(u, 2);
|
||||||
|
}
|
||||||
|
|
179
Test/spv.atomicFloat2.comp
Normal file
179
Test/spv.atomicFloat2.comp
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable
|
||||||
|
#extension GL_EXT_shader_atomic_float2: enable
|
||||||
|
#pragma use_vulkan_memory_model
|
||||||
|
|
||||||
|
layout(local_size_x = 16, local_size_y = 16) in;
|
||||||
|
|
||||||
|
layout(binding = 0) buffer Buffer
|
||||||
|
{
|
||||||
|
float16_t datah;
|
||||||
|
float dataf;
|
||||||
|
double datad;
|
||||||
|
} buf;
|
||||||
|
|
||||||
|
shared float16_t atomh;
|
||||||
|
shared float atomf;
|
||||||
|
shared double atomd;
|
||||||
|
|
||||||
|
layout(binding = 0, r32f) volatile coherent uniform image1D fimage1D;
|
||||||
|
layout(binding = 1, r32f) volatile coherent uniform image1DArray fimage1DArray;
|
||||||
|
layout(binding = 2, r32f) volatile coherent uniform image2D fimage2D;
|
||||||
|
layout(binding = 3, r32f) volatile coherent uniform image2DArray fimage2DArray;
|
||||||
|
layout(binding = 4, r32f) volatile coherent uniform image2DRect fimage2DRect;
|
||||||
|
layout(binding = 5, r32f) volatile coherent uniform imageCube fimageCube;
|
||||||
|
layout(binding = 6, r32f) volatile coherent uniform imageCubeArray fimageCubeArray;
|
||||||
|
layout(binding = 9, r32f) volatile coherent uniform image3D fimage3D;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
//atomicAdd
|
||||||
|
float16_t resulth = float16_t(0.0);
|
||||||
|
resulth = atomicAdd(atomh, float16_t(3.0));
|
||||||
|
resulth = atomicAdd(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resulth = atomicAdd(buf.datah, float16_t(3.0));
|
||||||
|
resulth = atomicAdd(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
//atomicMin
|
||||||
|
resulth = atomicMin(atomh, float16_t(3.0));
|
||||||
|
resulth = atomicMin(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resulth = atomicMin(buf.datah, float16_t(3.0));
|
||||||
|
resulth = atomicMin(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
float resultf = 0.0;
|
||||||
|
resultf = atomicMin(atomf, 3.0);
|
||||||
|
resultf = atomicMin(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resultf = atomicMin(buf.dataf, 3.0);
|
||||||
|
resultf = atomicMin(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
double resultd = 0.0;
|
||||||
|
resultd = atomicMin(atomd, 3.0);
|
||||||
|
resultd = atomicMin(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resultd = atomicMin(buf.datad, 3.0);
|
||||||
|
resultd = atomicMin(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
//atomicMax
|
||||||
|
resulth = atomicMax(atomh, float16_t(3.0));
|
||||||
|
resulth = atomicMax(atomh, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resulth = atomicMax(buf.datah, float16_t(3.0));
|
||||||
|
resulth = atomicMax(buf.datah, float16_t(4.5), gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
resultf = atomicMax(atomf, 3.0);
|
||||||
|
resultf = atomicMax(atomf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resultf = atomicMax(buf.dataf, 3.0);
|
||||||
|
resultf = atomicMax(buf.dataf, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
resultd = atomicMax(atomd, 3.0);
|
||||||
|
resultd = atomicMax(atomd, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
resultd = atomicMax(buf.datad, 3.0);
|
||||||
|
resultd = atomicMax(buf.datad, 4.5, gl_ScopeDevice, gl_StorageSemanticsBuffer, gl_SemanticsRelaxed);
|
||||||
|
|
||||||
|
//atomicExchange
|
||||||
|
resulth = atomicExchange(buf.datah, resulth);
|
||||||
|
buf.datah += resulth;
|
||||||
|
resulth = atomicExchange(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
buf.datah += resulth;
|
||||||
|
resulth = atomicExchange(atomh, resulth);
|
||||||
|
buf.datah += resulth;
|
||||||
|
resulth = atomicExchange(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
buf.datah += resulth;
|
||||||
|
|
||||||
|
//atomic load/store
|
||||||
|
resulth = atomicLoad(buf.datah, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
atomicStore(buf.datah, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
buf.datah += resulth;
|
||||||
|
|
||||||
|
resulth = atomicLoad(atomh, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
atomicStore(atomh, resulth, gl_ScopeDevice, gl_StorageSemanticsShared, gl_SemanticsRelaxed);
|
||||||
|
buf.datah += resulth;
|
||||||
|
|
||||||
|
// image atomics on 1D:
|
||||||
|
atomf = imageAtomicMin(fimage1D, int(0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage1D, int(0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage1D, int(1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on 1D Array:
|
||||||
|
atomf = imageAtomicMin(fimage1DArray, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage1DArray, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage1DArray, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on 2D:
|
||||||
|
atomf = imageAtomicMin(fimage2D, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage2D, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage2D, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on 2D Rect:
|
||||||
|
atomf = imageAtomicMin(fimage2DRect, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage2DRect, ivec2(0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage2DRect, ivec2(1,1), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on 2D Array:
|
||||||
|
atomf = imageAtomicMin(fimage2DArray, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage2DArray, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage2DArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on Cube:
|
||||||
|
atomf = imageAtomicMin(fimageCube, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimageCube, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimageCube, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on Cube Array:
|
||||||
|
atomf = imageAtomicMin(fimageCubeArray, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimageCubeArray, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimageCubeArray, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
// image atomics on 3D:
|
||||||
|
atomf = imageAtomicMin(fimage3D, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMin(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
|
||||||
|
atomf = imageAtomicMax(fimage3D, ivec3(0,0,0), 2.0);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
atomf = imageAtomicMax(fimage3D, ivec3(1,1,0), 3.0, gl_ScopeDevice, gl_StorageSemanticsImage , gl_SemanticsRelaxed);
|
||||||
|
buf.dataf += atomf;
|
||||||
|
}
|
17
Test/spv.funcall.array.frag
Normal file
17
Test/spv.funcall.array.frag
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
uniform ub {
|
||||||
|
vec4 u[9];
|
||||||
|
};
|
||||||
|
|
||||||
|
vec4 f(const vec4 a[9], int ix) {
|
||||||
|
return a[ix];
|
||||||
|
}
|
||||||
|
|
||||||
|
out vec4 color;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
color = f(u, 2);
|
||||||
|
}
|
||||||
|
|
21
Test/spv.intrinsicsSpirvByReference.vert
Normal file
21
Test/spv.intrinsicsSpirvByReference.vert
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
spirv_instruction (set = "GLSL.std.450", id = 35) // modf
|
||||||
|
float modf(float x, spirv_by_reference float i);
|
||||||
|
|
||||||
|
layout(location = 0) in float floatIn;
|
||||||
|
layout(location = 0) out vec2 vec2Out;
|
||||||
|
layout(location = 1) out float floatOut;
|
||||||
|
|
||||||
|
void func(spirv_by_reference float f)
|
||||||
|
{
|
||||||
|
f = 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec2Out.x = modf(floatIn, vec2Out.y);
|
||||||
|
func(floatOut);
|
||||||
|
}
|
37
Test/spv.intrinsicsSpirvDecorate.frag
Normal file
37
Test/spv.intrinsicsSpirvDecorate.frag
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
#define GL_AMD_shader_explicit_vertex_parameter 1
|
||||||
|
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4992)
|
||||||
|
in vec2 gl_BaryCoordNoPerspAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4993)
|
||||||
|
in vec2 gl_BaryCoordNoPerspCentroidAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4994)
|
||||||
|
in vec2 gl_BaryCoordNoPerspSampleAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4995)
|
||||||
|
in vec2 gl_BaryCoordSmoothAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4996)
|
||||||
|
in vec2 gl_BaryCoordSmoothCentroidAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4997)
|
||||||
|
in vec2 gl_BaryCoordSmoothSampleAMD;
|
||||||
|
spirv_decorate (extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 11, 4998)
|
||||||
|
in vec3 gl_BaryCoordPullModelAMD;
|
||||||
|
|
||||||
|
#define __explicitInterpAMD spirv_decorate(extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], 4999)
|
||||||
|
|
||||||
|
spirv_instruction(extensions = ["SPV_AMD_shader_explicit_vertex_parameter"], set = "SPV_AMD_shader_explicit_vertex_parameter", id = 1)
|
||||||
|
float interpolateAtVertexAMD(float interpolant, uint vertexIdx);
|
||||||
|
|
||||||
|
layout(location = 0) in __explicitInterpAMD float floatIn;
|
||||||
|
layout(location = 0) out float floatOut;
|
||||||
|
layout(location = 1) out vec2 vec2Out;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
floatOut = interpolateAtVertexAMD(floatIn, 1);
|
||||||
|
vec2Out = gl_BaryCoordNoPerspAMD + gl_BaryCoordNoPerspCentroidAMD + gl_BaryCoordNoPerspSampleAMD +
|
||||||
|
gl_BaryCoordSmoothAMD + gl_BaryCoordSmoothCentroidAMD + gl_BaryCoordSmoothSampleAMD +
|
||||||
|
gl_BaryCoordPullModelAMD.xy;
|
||||||
|
}
|
17
Test/spv.intrinsicsSpirvExecutionMode.frag
Normal file
17
Test/spv.intrinsicsSpirvExecutionMode.frag
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
#define GL_ARB_shader_stencil_export 1
|
||||||
|
|
||||||
|
spirv_execution_mode(5027); // StencilRefReplacingEXT
|
||||||
|
|
||||||
|
spirv_decorate(extensions = ["SPV_EXT_shader_stencil_export"], capabilities = [5013], 11, 5014)
|
||||||
|
out int gl_FragStencilRef;
|
||||||
|
|
||||||
|
layout(location = 0) in flat int color;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_FragStencilRef = color;
|
||||||
|
}
|
26
Test/spv.intrinsicsSpirvInstruction.vert
Normal file
26
Test/spv.intrinsicsSpirvInstruction.vert
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
#extension GL_ARB_gpu_shader_int64: enable
|
||||||
|
|
||||||
|
spirv_instruction (extensions = ["SPV_KHR_shader_clock"], capabilities = [5055], id = 5056)
|
||||||
|
uvec2 clockRealtime2x32EXT(void);
|
||||||
|
|
||||||
|
spirv_instruction (extensions = ["SPV_KHR_shader_clock"], capabilities = [5055], id = 5056)
|
||||||
|
int64_t clockRealtimeEXT(void);
|
||||||
|
|
||||||
|
spirv_instruction (extensions = ["SPV_AMD_shader_trinary_minmax"], set = "SPV_AMD_shader_trinary_minmax", id = 1)
|
||||||
|
vec2 min3(vec2 x, vec2 y, vec2 z);
|
||||||
|
|
||||||
|
layout(location = 0) in vec3 vec3In;
|
||||||
|
|
||||||
|
layout(location = 0) out uvec2 uvec2Out;
|
||||||
|
layout(location = 1) out int64_t i64Out;
|
||||||
|
layout(location = 2) out vec2 vec2Out;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
uvec2Out = clockRealtime2x32EXT();
|
||||||
|
i64Out = clockRealtimeEXT();
|
||||||
|
vec2Out = min3(vec3In.xy, vec3In.yz, vec3In.zx);
|
||||||
|
}
|
17
Test/spv.intrinsicsSpirvLiteral.vert
Normal file
17
Test/spv.intrinsicsSpirvLiteral.vert
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#version 450 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
spirv_instruction(id = 61)
|
||||||
|
vec4 load(spirv_by_reference vec4 pointer, spirv_literal int memoryOperands);
|
||||||
|
|
||||||
|
spirv_instruction(id = 62)
|
||||||
|
void store(spirv_by_reference vec4 pointer, vec4 object, spirv_literal int memoryOperands);
|
||||||
|
|
||||||
|
layout(location = 0) in vec4 vec4In;
|
||||||
|
layout(location = 1) out vec4 vec4Out;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
store(vec4Out, load(vec4In, /*None=*/0x0), /*Volatile=*/0x1);
|
||||||
|
}
|
12
Test/spv.intrinsicsSpirvStorageClass.rchit
Normal file
12
Test/spv.intrinsicsSpirvStorageClass.rchit
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#version 460
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
#define rayPayloadEXT spirv_storage_class(extensions = ["SPV_KHR_ray_tracing"], capabilities = [5353], 5338)
|
||||||
|
|
||||||
|
layout(location = 1) rayPayloadEXT vec4 payload;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
payload = vec4(0.0, 1.0, 0.0, 1.0);
|
||||||
|
}
|
22
Test/spv.intrinsicsSpirvType.rgen
Normal file
22
Test/spv.intrinsicsSpirvType.rgen
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#version 460 core
|
||||||
|
|
||||||
|
#extension GL_EXT_spirv_intrinsics: enable
|
||||||
|
|
||||||
|
#define rayQueryEXT spirv_type (extensions = ["SPV_KHR_ray_query"], capabilities = [4472], id = 4472)
|
||||||
|
#define accelerationStructureEXT spirv_type (extensions = ["SPV_KHR_ray_query"], capabilities = [4472], id = 5341)
|
||||||
|
|
||||||
|
spirv_instruction (extensions = ["SPV_KHR_ray_query"], capabilities = [4472, 4478], id = 4473)
|
||||||
|
void rayQueryInitializeEXT(spirv_by_reference rayQueryEXT rayQuery, accelerationStructureEXT topLevel, uint rayFlags, uint cullMask, vec3 origin, float tMin, vec3 direction, float tMax);
|
||||||
|
|
||||||
|
spirv_instruction (extensions = ["SPV_KHR_ray_query"], capabilities = [4478], id = 4474)
|
||||||
|
void rayQueryTerminateEXT(spirv_by_reference rayQueryEXT rayQuery);
|
||||||
|
|
||||||
|
layout(binding = 0) uniform accelerationStructureEXT as;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
rayQueryEXT rq;
|
||||||
|
|
||||||
|
rayQueryInitializeEXT(rq, as, 0, 0, vec3(0.0), 0.0, vec3(1.0), 1.0);
|
||||||
|
rayQueryTerminateEXT(rq);
|
||||||
|
}
|
11
Test/spv.subgroupUniformControlFlow.vert
Normal file
11
Test/spv.subgroupUniformControlFlow.vert
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#version 460
|
||||||
|
|
||||||
|
#ifdef GL_EXT_subgroup_uniform_control_flow
|
||||||
|
|
||||||
|
#extension GL_EXT_subgroup_uniform_control_flow : enable
|
||||||
|
|
||||||
|
[[random(4)]] void main() [[subgroup_uniform_control_flow]]
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -37,6 +37,6 @@ void main()
|
|||||||
ivec2(sci2, sci2); // spec-const
|
ivec2(sci2, sci2); // spec-const
|
||||||
ivec2[2](ivec2(sci2, sci2), ivec2(sci2, sci2)); // not a spec-const
|
ivec2[2](ivec2(sci2, sci2), ivec2(sci2, sci2)); // not a spec-const
|
||||||
|
|
||||||
vec2(scf1, scf1); // not spec-const
|
vec2(scf1, scf1); // spec-const
|
||||||
vec2[2](vec2(scf1, scf1), vec2(scf1, scf1)); // not a spec-const
|
vec2[2](vec2(scf1, scf1), vec2(scf1, scf1)); // not a spec-const
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,7 @@ set(MACHINEINDEPENDENT_SOURCES
|
|||||||
MachineIndependent/RemoveTree.cpp
|
MachineIndependent/RemoveTree.cpp
|
||||||
MachineIndependent/Scan.cpp
|
MachineIndependent/Scan.cpp
|
||||||
MachineIndependent/ShaderLang.cpp
|
MachineIndependent/ShaderLang.cpp
|
||||||
|
MachineIndependent/SpirvIntrinsics.cpp
|
||||||
MachineIndependent/SymbolTable.cpp
|
MachineIndependent/SymbolTable.cpp
|
||||||
MachineIndependent/Versions.cpp
|
MachineIndependent/Versions.cpp
|
||||||
MachineIndependent/intermOut.cpp
|
MachineIndependent/intermOut.cpp
|
||||||
@ -160,6 +161,7 @@ set(GLSLANG_HEADERS
|
|||||||
Include/PoolAlloc.h
|
Include/PoolAlloc.h
|
||||||
Include/ResourceLimits.h
|
Include/ResourceLimits.h
|
||||||
Include/ShHandle.h
|
Include/ShHandle.h
|
||||||
|
Include/SpirvIntrinsics.h
|
||||||
Include/Types.h)
|
Include/Types.h)
|
||||||
|
|
||||||
add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
|
add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${GLSLANG_SOURCES} ${GLSLANG_HEADERS})
|
||||||
|
@ -65,6 +65,10 @@ enum TBasicType {
|
|||||||
EbtAccStruct,
|
EbtAccStruct,
|
||||||
EbtReference,
|
EbtReference,
|
||||||
EbtRayQuery,
|
EbtRayQuery,
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// SPIR-V type defined by spirv_type
|
||||||
|
EbtSpirvType,
|
||||||
|
#endif
|
||||||
|
|
||||||
// HLSL types that live only temporarily.
|
// HLSL types that live only temporarily.
|
||||||
EbtString,
|
EbtString,
|
||||||
@ -91,6 +95,9 @@ enum TStorageQualifier {
|
|||||||
EvqUniform, // read only, shared with app
|
EvqUniform, // read only, shared with app
|
||||||
EvqBuffer, // read/write, shared with app
|
EvqBuffer, // read/write, shared with app
|
||||||
EvqShared, // compute shader's read/write 'shared' qualifier
|
EvqShared, // compute shader's read/write 'shared' qualifier
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
EvqSpirvStorageClass, // spirv_storage_class
|
||||||
|
#endif
|
||||||
|
|
||||||
EvqPayload,
|
EvqPayload,
|
||||||
EvqPayloadIn,
|
EvqPayloadIn,
|
||||||
@ -321,6 +328,9 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
|
|||||||
case EvqGlobal: return "global"; break;
|
case EvqGlobal: return "global"; break;
|
||||||
case EvqConst: return "const"; break;
|
case EvqConst: return "const"; break;
|
||||||
case EvqConstReadOnly: return "const (read only)"; break;
|
case EvqConstReadOnly: return "const (read only)"; break;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case EvqSpirvStorageClass: return "spirv_storage_class"; break;
|
||||||
|
#endif
|
||||||
case EvqVaryingIn: return "in"; break;
|
case EvqVaryingIn: return "in"; break;
|
||||||
case EvqVaryingOut: return "out"; break;
|
case EvqVaryingOut: return "out"; break;
|
||||||
case EvqUniform: return "uniform"; break;
|
case EvqUniform: return "uniform"; break;
|
||||||
|
@ -194,6 +194,10 @@ template <class K, class D, class HASH = std::hash<K>, class PRED = std::equal_t
|
|||||||
class TUnorderedMap : public std::unordered_map<K, D, HASH, PRED, pool_allocator<std::pair<K const, D> > > {
|
class TUnorderedMap : public std::unordered_map<K, D, HASH, PRED, pool_allocator<std::pair<K const, D> > > {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <class K, class CMP = std::less<K> >
|
||||||
|
class TSet : public std::set<K, CMP, pool_allocator<K> > {
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Persistent string memory. Should only be used for strings that survive
|
// Persistent string memory. Should only be used for strings that survive
|
||||||
// across compiles/links.
|
// across compiles/links.
|
||||||
|
136
glslang/Include/SpirvIntrinsics.h
Normal file
136
glslang/Include/SpirvIntrinsics.h
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
//
|
||||||
|
// Copyright(C) 2021 Advanced Micro Devices, Inc.
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions
|
||||||
|
// are met:
|
||||||
|
//
|
||||||
|
// Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following
|
||||||
|
// disclaimer in the documentation and/or other materials provided
|
||||||
|
// with the distribution.
|
||||||
|
//
|
||||||
|
// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived
|
||||||
|
// from this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
// POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
|
||||||
|
//
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
//
|
||||||
|
#include "Common.h"
|
||||||
|
|
||||||
|
namespace glslang {
|
||||||
|
|
||||||
|
class TIntermTyped;
|
||||||
|
class TIntermConstantUnion;
|
||||||
|
class TType;
|
||||||
|
|
||||||
|
// SPIR-V requirements
|
||||||
|
struct TSpirvRequirement {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
// capability = [..]
|
||||||
|
TSet<TString> extensions;
|
||||||
|
// extension = [..]
|
||||||
|
TSet<int> capabilities;
|
||||||
|
};
|
||||||
|
|
||||||
|
// SPIR-V execution modes
|
||||||
|
struct TSpirvExecutionMode {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
// spirv_execution_mode
|
||||||
|
TMap<int, TVector<const TIntermConstantUnion*>> modes;
|
||||||
|
// spirv_execution_mode_id
|
||||||
|
TMap<int, TVector<const TIntermConstantUnion*> > modeIds;
|
||||||
|
};
|
||||||
|
|
||||||
|
// SPIR-V decorations
|
||||||
|
struct TSpirvDecorate {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
// spirv_decorate
|
||||||
|
TMap<int, TVector<const TIntermConstantUnion*> > decorates;
|
||||||
|
// spirv_decorate_id
|
||||||
|
TMap<int, TVector<const TIntermConstantUnion*> > decorateIds;
|
||||||
|
// spirv_decorate_string
|
||||||
|
TMap<int, TVector<const TIntermConstantUnion*> > decorateStrings;
|
||||||
|
};
|
||||||
|
|
||||||
|
// SPIR-V instruction
|
||||||
|
struct TSpirvInstruction {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
TSpirvInstruction() { set = ""; id = -1; }
|
||||||
|
|
||||||
|
bool operator==(const TSpirvInstruction& rhs) const { return set == rhs.set && id == rhs.id; }
|
||||||
|
bool operator!=(const TSpirvInstruction& rhs) const { return !operator==(rhs); }
|
||||||
|
|
||||||
|
// spirv_instruction
|
||||||
|
TString set;
|
||||||
|
int id;
|
||||||
|
};
|
||||||
|
|
||||||
|
// SPIR-V type parameter
|
||||||
|
struct TSpirvTypeParameter {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
TSpirvTypeParameter(const TIntermConstantUnion* arg) { isConstant = true; constant = arg; }
|
||||||
|
TSpirvTypeParameter(const TType* arg) { isConstant = false; type = arg; }
|
||||||
|
|
||||||
|
bool operator==(const TSpirvTypeParameter& rhs) const
|
||||||
|
{
|
||||||
|
return isConstant == rhs.isConstant && ((isConstant && constant == rhs.constant) || (!isConstant && type == rhs.type));
|
||||||
|
}
|
||||||
|
bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); }
|
||||||
|
|
||||||
|
bool isConstant;
|
||||||
|
union {
|
||||||
|
const TIntermConstantUnion* constant;
|
||||||
|
const TType* type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef TVector<TSpirvTypeParameter> TSpirvTypeParameters;
|
||||||
|
|
||||||
|
// SPIR-V type
|
||||||
|
struct TSpirvType {
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
bool operator==(const TSpirvType& rhs) const
|
||||||
|
{
|
||||||
|
return spirvInst == rhs.spirvInst && typeParams == rhs.typeParams;
|
||||||
|
}
|
||||||
|
bool operator!=(const TSpirvType& rhs) const { return !operator==(rhs); }
|
||||||
|
|
||||||
|
// spirv_type
|
||||||
|
TSpirvInstruction spirvInst;
|
||||||
|
TSpirvTypeParameters typeParams;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // end namespace glslang
|
||||||
|
|
||||||
|
#endif // GLSLANG_WEB
|
@ -44,11 +44,14 @@
|
|||||||
#include "../Include/BaseTypes.h"
|
#include "../Include/BaseTypes.h"
|
||||||
#include "../Public/ShaderLang.h"
|
#include "../Public/ShaderLang.h"
|
||||||
#include "arrays.h"
|
#include "arrays.h"
|
||||||
|
#include "SpirvIntrinsics.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
|
|
||||||
|
class TIntermAggregate;
|
||||||
|
|
||||||
const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded
|
const int GlslangMaxTypeLength = 200; // TODO: need to print block/struct one member per line, so this can stay bounded
|
||||||
|
|
||||||
const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed
|
const char* const AnonymousPrefix = "anon@"; // for something like a block whose members can be directly accessed
|
||||||
@ -487,7 +490,6 @@ enum TShaderInterface
|
|||||||
EsiCount
|
EsiCount
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class TQualifier {
|
class TQualifier {
|
||||||
public:
|
public:
|
||||||
static const int layoutNotSet = -1;
|
static const int layoutNotSet = -1;
|
||||||
@ -501,6 +503,8 @@ public:
|
|||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
noContraction = false;
|
noContraction = false;
|
||||||
nullInit = false;
|
nullInit = false;
|
||||||
|
spirvByReference = false;
|
||||||
|
spirvLiteral = false;
|
||||||
#endif
|
#endif
|
||||||
defaultBlock = false;
|
defaultBlock = false;
|
||||||
}
|
}
|
||||||
@ -518,6 +522,12 @@ public:
|
|||||||
nullInit = false;
|
nullInit = false;
|
||||||
defaultBlock = false;
|
defaultBlock = false;
|
||||||
clearLayout();
|
clearLayout();
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
spirvStorageClass = -1;
|
||||||
|
spirvDecorate = nullptr;
|
||||||
|
spirvByReference = false;
|
||||||
|
spirvLiteral = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearInterstage()
|
void clearInterstage()
|
||||||
@ -596,6 +606,10 @@ public:
|
|||||||
bool isPervertexNV() const { return false; }
|
bool isPervertexNV() const { return false; }
|
||||||
void setNullInit() { }
|
void setNullInit() { }
|
||||||
bool isNullInit() const { return false; }
|
bool isNullInit() const { return false; }
|
||||||
|
void setSpirvByReference() { }
|
||||||
|
bool isSpirvByReference() { return false; }
|
||||||
|
void setSpirvLiteral() { }
|
||||||
|
bool isSpirvLiteral() { return false; }
|
||||||
#else
|
#else
|
||||||
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
|
bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects
|
||||||
bool nopersp : 1;
|
bool nopersp : 1;
|
||||||
@ -618,6 +632,8 @@ public:
|
|||||||
bool shadercallcoherent : 1;
|
bool shadercallcoherent : 1;
|
||||||
bool nonprivate : 1;
|
bool nonprivate : 1;
|
||||||
bool nullInit : 1;
|
bool nullInit : 1;
|
||||||
|
bool spirvByReference : 1;
|
||||||
|
bool spirvLiteral : 1;
|
||||||
bool isWriteOnly() const { return writeonly; }
|
bool isWriteOnly() const { return writeonly; }
|
||||||
bool isReadOnly() const { return readonly; }
|
bool isReadOnly() const { return readonly; }
|
||||||
bool isRestrict() const { return restrict; }
|
bool isRestrict() const { return restrict; }
|
||||||
@ -655,6 +671,10 @@ public:
|
|||||||
bool isPervertexNV() const { return pervertexNV; }
|
bool isPervertexNV() const { return pervertexNV; }
|
||||||
void setNullInit() { nullInit = true; }
|
void setNullInit() { nullInit = true; }
|
||||||
bool isNullInit() const { return nullInit; }
|
bool isNullInit() const { return nullInit; }
|
||||||
|
void setSpirvByReference() { spirvByReference = true; }
|
||||||
|
bool isSpirvByReference() const { return spirvByReference; }
|
||||||
|
void setSpirvLiteral() { spirvLiteral = true; }
|
||||||
|
bool isSpirvLiteral() const { return spirvLiteral; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool isPipeInput() const
|
bool isPipeInput() const
|
||||||
@ -948,6 +968,10 @@ public:
|
|||||||
bool layoutViewportRelative;
|
bool layoutViewportRelative;
|
||||||
int layoutSecondaryViewportRelativeOffset;
|
int layoutSecondaryViewportRelativeOffset;
|
||||||
bool layoutShaderRecord;
|
bool layoutShaderRecord;
|
||||||
|
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
int spirvStorageClass;
|
||||||
|
TSpirvDecorate* spirvDecorate;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool hasUniformLayout() const
|
bool hasUniformLayout() const
|
||||||
@ -1079,6 +1103,15 @@ public:
|
|||||||
{
|
{
|
||||||
return nonUniform;
|
return nonUniform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
bool hasSprivDecorate() const { return spirvDecorate != nullptr; }
|
||||||
|
void setSpirvDecorate(int decoration, const TIntermAggregate* args = nullptr);
|
||||||
|
void setSpirvDecorateId(int decoration, const TIntermAggregate* args);
|
||||||
|
void setSpirvDecorateString(int decoration, const TIntermAggregate* args);
|
||||||
|
const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; }
|
||||||
|
TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; }
|
||||||
|
TString getSpirvDecorateQualifierString() const;
|
||||||
#endif
|
#endif
|
||||||
bool hasSpecConstantId() const
|
bool hasSpecConstantId() const
|
||||||
{
|
{
|
||||||
@ -1423,6 +1456,10 @@ public:
|
|||||||
const TType* userDef;
|
const TType* userDef;
|
||||||
TSourceLoc loc;
|
TSourceLoc loc;
|
||||||
TArraySizes* typeParameters;
|
TArraySizes* typeParameters;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// SPIR-V type defined by spirv_type directive
|
||||||
|
TSpirvType* spirvType;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GLSLANG_WEB
|
#ifdef GLSLANG_WEB
|
||||||
bool isCoopmat() const { return false; }
|
bool isCoopmat() const { return false; }
|
||||||
@ -1441,6 +1478,9 @@ public:
|
|||||||
loc = l;
|
loc = l;
|
||||||
typeParameters = nullptr;
|
typeParameters = nullptr;
|
||||||
coopmat = false;
|
coopmat = false;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
spirvType = nullptr;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void initQualifiers(bool global = false)
|
void initQualifiers(bool global = false)
|
||||||
@ -1477,6 +1517,11 @@ public:
|
|||||||
return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr;
|
return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
// "Image" is a superset of "Subpass"
|
// "Image" is a superset of "Subpass"
|
||||||
bool isImage() const { return basicType == EbtSampler && sampler.isImage(); }
|
bool isImage() const { return basicType == EbtSampler && sampler.isImage(); }
|
||||||
bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); }
|
bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); }
|
||||||
@ -1494,6 +1539,9 @@ public:
|
|||||||
bool isVector = false) :
|
bool isVector = false) :
|
||||||
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
sampler.clear();
|
sampler.clear();
|
||||||
qualifier.clear();
|
qualifier.clear();
|
||||||
@ -1505,6 +1553,9 @@ public:
|
|||||||
bool isVector = false) :
|
bool isVector = false) :
|
||||||
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
sampler.clear();
|
sampler.clear();
|
||||||
qualifier.clear();
|
qualifier.clear();
|
||||||
@ -1518,6 +1569,9 @@ public:
|
|||||||
basicType(p.basicType),
|
basicType(p.basicType),
|
||||||
vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat),
|
vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat),
|
||||||
arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters)
|
arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(p.spirvType)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (basicType == EbtSampler)
|
if (basicType == EbtSampler)
|
||||||
sampler = p.sampler;
|
sampler = p.sampler;
|
||||||
@ -1552,6 +1606,9 @@ public:
|
|||||||
basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
||||||
arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr),
|
arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr),
|
||||||
sampler(sampler), typeParameters(nullptr)
|
sampler(sampler), typeParameters(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
qualifier.clear();
|
qualifier.clear();
|
||||||
qualifier.storage = q;
|
qualifier.storage = q;
|
||||||
@ -1602,6 +1659,9 @@ public:
|
|||||||
TType(TTypeList* userDef, const TString& n) :
|
TType(TTypeList* userDef, const TString& n) :
|
||||||
basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
||||||
arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
sampler.clear();
|
sampler.clear();
|
||||||
qualifier.clear();
|
qualifier.clear();
|
||||||
@ -1611,6 +1671,9 @@ public:
|
|||||||
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
|
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
|
||||||
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
||||||
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
sampler.clear();
|
sampler.clear();
|
||||||
typeName = NewPoolTString(n.c_str());
|
typeName = NewPoolTString(n.c_str());
|
||||||
@ -1619,6 +1682,9 @@ public:
|
|||||||
explicit TType(TBasicType t, const TType &p, const TString& n) :
|
explicit TType(TBasicType t, const TType &p, const TString& n) :
|
||||||
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
|
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr)
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
, spirvType(nullptr)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
assert(t == EbtReference);
|
assert(t == EbtReference);
|
||||||
typeName = NewPoolTString(n.c_str());
|
typeName = NewPoolTString(n.c_str());
|
||||||
@ -1649,6 +1715,9 @@ public:
|
|||||||
referentType = copyOf.referentType;
|
referentType = copyOf.referentType;
|
||||||
}
|
}
|
||||||
typeParameters = copyOf.typeParameters;
|
typeParameters = copyOf.typeParameters;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
spirvType = copyOf.spirvType;
|
||||||
|
#endif
|
||||||
coopmat = copyOf.isCoopMat();
|
coopmat = copyOf.isCoopMat();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2018,8 +2087,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const char* getBasicString() const
|
const char* getBasicString() const
|
||||||
{
|
{
|
||||||
return TType::getBasicString(basicType);
|
return TType::getBasicString(basicType);
|
||||||
@ -2050,6 +2117,7 @@ public:
|
|||||||
case EbtRayQuery: return "rayQueryEXT";
|
case EbtRayQuery: return "rayQueryEXT";
|
||||||
case EbtReference: return "reference";
|
case EbtReference: return "reference";
|
||||||
case EbtString: return "string";
|
case EbtString: return "string";
|
||||||
|
case EbtSpirvType: return "spirv_type";
|
||||||
#endif
|
#endif
|
||||||
default: return "unknown type";
|
default: return "unknown type";
|
||||||
}
|
}
|
||||||
@ -2070,6 +2138,9 @@ public:
|
|||||||
const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); };
|
const auto appendUint = [&](unsigned int u) { typeString.append(std::to_string(u).c_str()); };
|
||||||
const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); };
|
const auto appendInt = [&](int i) { typeString.append(std::to_string(i).c_str()); };
|
||||||
|
|
||||||
|
if (qualifier.hasSprivDecorate())
|
||||||
|
appendStr(qualifier.getSpirvDecorateQualifierString().c_str());
|
||||||
|
|
||||||
if (qualifier.hasLayout()) {
|
if (qualifier.hasLayout()) {
|
||||||
// To reduce noise, skip this if the only layout is an xfb_buffer
|
// To reduce noise, skip this if the only layout is an xfb_buffer
|
||||||
// with no triggering xfb_offset.
|
// with no triggering xfb_offset.
|
||||||
@ -2219,6 +2290,10 @@ public:
|
|||||||
appendStr(" nonuniform");
|
appendStr(" nonuniform");
|
||||||
if (qualifier.isNullInit())
|
if (qualifier.isNullInit())
|
||||||
appendStr(" null-init");
|
appendStr(" null-init");
|
||||||
|
if (qualifier.isSpirvByReference())
|
||||||
|
appendStr(" spirv_by_reference");
|
||||||
|
if (qualifier.isSpirvLiteral())
|
||||||
|
appendStr(" spirv_literal");
|
||||||
appendStr(" ");
|
appendStr(" ");
|
||||||
appendStr(getStorageQualifierString());
|
appendStr(getStorageQualifierString());
|
||||||
if (isArray()) {
|
if (isArray()) {
|
||||||
@ -2455,6 +2530,15 @@ public:
|
|||||||
(typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters));
|
(typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// See if two type's SPIR-V type contents match
|
||||||
|
bool sameSpirvType(const TType& right) const
|
||||||
|
{
|
||||||
|
return ((spirvType == nullptr && right.spirvType == nullptr) ||
|
||||||
|
(spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// See if two type's elements match in all ways except basic type
|
// See if two type's elements match in all ways except basic type
|
||||||
bool sameElementShape(const TType& right) const
|
bool sameElementShape(const TType& right) const
|
||||||
{
|
{
|
||||||
@ -2493,7 +2577,11 @@ public:
|
|||||||
// See if two types match in all ways (just the actual type, not qualification)
|
// See if two types match in all ways (just the actual type, not qualification)
|
||||||
bool operator==(const TType& right) const
|
bool operator==(const TType& right) const
|
||||||
{
|
{
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right);
|
||||||
|
#else
|
||||||
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right);
|
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const TType& right) const
|
bool operator!=(const TType& right) const
|
||||||
@ -2512,6 +2600,10 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; }
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Require consumer to pick between deep copy and shallow copy.
|
// Require consumer to pick between deep copy and shallow copy.
|
||||||
TType(const TType& type);
|
TType(const TType& type);
|
||||||
@ -2524,6 +2616,19 @@ protected:
|
|||||||
{
|
{
|
||||||
shallowCopy(copyOf);
|
shallowCopy(copyOf);
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
if (copyOf.qualifier.spirvDecorate) {
|
||||||
|
qualifier.spirvDecorate = new TSpirvDecorate;
|
||||||
|
*qualifier.spirvDecorate = *copyOf.qualifier.spirvDecorate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (copyOf.spirvType) {
|
||||||
|
spirvType = new TSpirvType;
|
||||||
|
*spirvType = *copyOf.spirvType;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (copyOf.arraySizes) {
|
if (copyOf.arraySizes) {
|
||||||
arraySizes = new TArraySizes;
|
arraySizes = new TArraySizes;
|
||||||
*arraySizes = *copyOf.arraySizes;
|
*arraySizes = *copyOf.arraySizes;
|
||||||
@ -2583,6 +2688,9 @@ protected:
|
|||||||
TString *typeName; // for structure type name
|
TString *typeName; // for structure type name
|
||||||
TSampler sampler;
|
TSampler sampler;
|
||||||
TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types
|
TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
@ -71,6 +71,9 @@ enum TOperator {
|
|||||||
EOpFunctionCall,
|
EOpFunctionCall,
|
||||||
EOpFunction, // For function definition
|
EOpFunction, // For function definition
|
||||||
EOpParameters, // an aggregate listing the parameters to a function
|
EOpParameters, // an aggregate listing the parameters to a function
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
EOpSpirvInst,
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Unary operators
|
// Unary operators
|
||||||
@ -1616,8 +1619,15 @@ public:
|
|||||||
virtual TIntermUnary* getAsUnaryNode() { return this; }
|
virtual TIntermUnary* getAsUnaryNode() { return this; }
|
||||||
virtual const TIntermUnary* getAsUnaryNode() const { return this; }
|
virtual const TIntermUnary* getAsUnaryNode() const { return this; }
|
||||||
virtual void updatePrecision();
|
virtual void updatePrecision();
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
|
||||||
|
const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
|
||||||
|
#endif
|
||||||
protected:
|
protected:
|
||||||
TIntermTyped* operand;
|
TIntermTyped* operand;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
TSpirvInstruction spirvInst;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TVector<TIntermNode*> TIntermSequence;
|
typedef TVector<TIntermNode*> TIntermSequence;
|
||||||
@ -1648,6 +1658,10 @@ public:
|
|||||||
bool getDebug() const { return debug; }
|
bool getDebug() const { return debug; }
|
||||||
void setPragmaTable(const TPragmaTable& pTable);
|
void setPragmaTable(const TPragmaTable& pTable);
|
||||||
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
|
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
|
||||||
|
const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
|
||||||
|
#endif
|
||||||
protected:
|
protected:
|
||||||
TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
|
TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
|
||||||
TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
|
TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
|
||||||
@ -1658,6 +1672,9 @@ protected:
|
|||||||
bool optimize;
|
bool optimize;
|
||||||
bool debug;
|
bool debug;
|
||||||
TPragmaTable* pragmaTable;
|
TPragmaTable* pragmaTable;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
TSpirvInstruction spirvInst;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1677,7 +1694,9 @@ public:
|
|||||||
virtual TIntermTyped* getCondition() const { return condition; }
|
virtual TIntermTyped* getCondition() const { return condition; }
|
||||||
virtual void setCondition(TIntermTyped* c) { condition = c; }
|
virtual void setCondition(TIntermTyped* c) { condition = c; }
|
||||||
virtual TIntermNode* getTrueBlock() const { return trueBlock; }
|
virtual TIntermNode* getTrueBlock() const { return trueBlock; }
|
||||||
|
virtual void setTrueBlock(TIntermTyped* tb) { trueBlock = tb; }
|
||||||
virtual TIntermNode* getFalseBlock() const { return falseBlock; }
|
virtual TIntermNode* getFalseBlock() const { return falseBlock; }
|
||||||
|
virtual void setFalseBlock(TIntermTyped* fb) { falseBlock = fb; }
|
||||||
virtual TIntermSelection* getAsSelectionNode() { return this; }
|
virtual TIntermSelection* getAsSelectionNode() { return this; }
|
||||||
virtual const TIntermSelection* getAsSelectionNode() const { return this; }
|
virtual const TIntermSelection* getAsSelectionNode() const { return this; }
|
||||||
|
|
||||||
|
@ -529,7 +529,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType)
|
|||||||
case EbtDouble:
|
case EbtDouble:
|
||||||
case EbtFloat16:
|
case EbtFloat16:
|
||||||
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
|
case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break;
|
||||||
case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break;
|
// Note: avoid UBSAN error regarding negating 0x80000000
|
||||||
|
case EbtInt: newConstArray[i].setIConst(
|
||||||
|
unionArray[i].getIConst() == 0x80000000
|
||||||
|
? -0x7FFFFFFF - 1
|
||||||
|
: -unionArray[i].getIConst());
|
||||||
|
break;
|
||||||
case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
|
case EbtUint: newConstArray[i].setUConst(static_cast<unsigned int>(-static_cast<int>(unionArray[i].getUConst()))); break;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
|
case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break;
|
||||||
|
@ -483,7 +483,8 @@ void TBuiltIns::relateTabledBuiltins(int /* version */, EProfile /* profile */,
|
|||||||
|
|
||||||
inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion)
|
inline bool IncludeLegacy(int version, EProfile profile, const SpvVersion& spvVersion)
|
||||||
{
|
{
|
||||||
return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && ARBCompatibility) || profile == ECompatibilityProfile);
|
return profile != EEsProfile && (version <= 130 || (spvVersion.spv == 0 && version == 140 && ARBCompatibility) ||
|
||||||
|
profile == ECompatibilityProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct TBuiltInParseables base class. This can be used for language-common constructs.
|
// Construct TBuiltInParseables base class. This can be used for language-common constructs.
|
||||||
@ -1436,11 +1437,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
" int64_t atomicMin(coherent volatile inout int64_t, int64_t);"
|
" int64_t atomicMin(coherent volatile inout int64_t, int64_t);"
|
||||||
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
"uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||||
" int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);"
|
" int64_t atomicMin(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||||
|
"float16_t atomicMin(coherent volatile inout float16_t, float16_t);"
|
||||||
|
"float16_t atomicMin(coherent volatile inout float16_t, float16_t, int, int, int);"
|
||||||
|
" float atomicMin(coherent volatile inout float, float);"
|
||||||
|
" float atomicMin(coherent volatile inout float, float, int, int, int);"
|
||||||
|
" double atomicMin(coherent volatile inout double, double);"
|
||||||
|
" double atomicMin(coherent volatile inout double, double, int, int, int);"
|
||||||
|
|
||||||
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);"
|
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);"
|
||||||
" int64_t atomicMax(coherent volatile inout int64_t, int64_t);"
|
" int64_t atomicMax(coherent volatile inout int64_t, int64_t);"
|
||||||
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
"uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||||
" int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);"
|
" int64_t atomicMax(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||||
|
"float16_t atomicMax(coherent volatile inout float16_t, float16_t);"
|
||||||
|
"float16_t atomicMax(coherent volatile inout float16_t, float16_t, int, int, int);"
|
||||||
|
" float atomicMax(coherent volatile inout float, float);"
|
||||||
|
" float atomicMax(coherent volatile inout float, float, int, int, int);"
|
||||||
|
" double atomicMax(coherent volatile inout double, double);"
|
||||||
|
" double atomicMax(coherent volatile inout double, double, int, int, int);"
|
||||||
|
|
||||||
"uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);"
|
"uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);"
|
||||||
" int64_t atomicAnd(coherent volatile inout int64_t, int64_t);"
|
" int64_t atomicAnd(coherent volatile inout int64_t, int64_t);"
|
||||||
@ -1461,6 +1474,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
|
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t);"
|
||||||
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
"uint64_t atomicAdd(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||||
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
|
" int64_t atomicAdd(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||||
|
"float16_t atomicAdd(coherent volatile inout float16_t, float16_t);"
|
||||||
|
"float16_t atomicAdd(coherent volatile inout float16_t, float16_t, int, int, int);"
|
||||||
" float atomicAdd(coherent volatile inout float, float);"
|
" float atomicAdd(coherent volatile inout float, float);"
|
||||||
" float atomicAdd(coherent volatile inout float, float, int, int, int);"
|
" float atomicAdd(coherent volatile inout float, float, int, int, int);"
|
||||||
" double atomicAdd(coherent volatile inout double, double);"
|
" double atomicAdd(coherent volatile inout double, double);"
|
||||||
@ -1470,6 +1485,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
|
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t);"
|
||||||
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
"uint64_t atomicExchange(coherent volatile inout uint64_t, uint64_t, int, int, int);"
|
||||||
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
|
" int64_t atomicExchange(coherent volatile inout int64_t, int64_t, int, int, int);"
|
||||||
|
"float16_t atomicExchange(coherent volatile inout float16_t, float16_t);"
|
||||||
|
"float16_t atomicExchange(coherent volatile inout float16_t, float16_t, int, int, int);"
|
||||||
" float atomicExchange(coherent volatile inout float, float);"
|
" float atomicExchange(coherent volatile inout float, float);"
|
||||||
" float atomicExchange(coherent volatile inout float, float, int, int, int);"
|
" float atomicExchange(coherent volatile inout float, float, int, int, int);"
|
||||||
" double atomicExchange(coherent volatile inout double, double);"
|
" double atomicExchange(coherent volatile inout double, double);"
|
||||||
@ -1482,11 +1499,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
|
|
||||||
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
|
"uint64_t atomicLoad(coherent volatile in uint64_t, int, int, int);"
|
||||||
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
|
" int64_t atomicLoad(coherent volatile in int64_t, int, int, int);"
|
||||||
|
"float16_t atomicLoad(coherent volatile in float16_t, int, int, int);"
|
||||||
" float atomicLoad(coherent volatile in float, int, int, int);"
|
" float atomicLoad(coherent volatile in float, int, int, int);"
|
||||||
" double atomicLoad(coherent volatile in double, int, int, int);"
|
" double atomicLoad(coherent volatile in double, int, int, int);"
|
||||||
|
|
||||||
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
|
"void atomicStore(coherent volatile out uint64_t, uint64_t, int, int, int);"
|
||||||
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
|
"void atomicStore(coherent volatile out int64_t, int64_t, int, int, int);"
|
||||||
|
"void atomicStore(coherent volatile out float16_t, float16_t, int, int, int);"
|
||||||
"void atomicStore(coherent volatile out float, float, int, int, int);"
|
"void atomicStore(coherent volatile out float, float, int, int, int);"
|
||||||
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
"void atomicStore(coherent volatile out double, double, int, int, int);"
|
||||||
"\n");
|
"\n");
|
||||||
@ -6478,6 +6497,24 @@ void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int
|
|||||||
commonBuiltins.append(imageParams);
|
commonBuiltins.append(imageParams);
|
||||||
commonBuiltins.append(", float");
|
commonBuiltins.append(", float");
|
||||||
commonBuiltins.append(", int, int, int);\n");
|
commonBuiltins.append(", int, int, int);\n");
|
||||||
|
|
||||||
|
commonBuiltins.append("float imageAtomicMin(volatile coherent ");
|
||||||
|
commonBuiltins.append(imageParams);
|
||||||
|
commonBuiltins.append(", float);\n");
|
||||||
|
|
||||||
|
commonBuiltins.append("float imageAtomicMin(volatile coherent ");
|
||||||
|
commonBuiltins.append(imageParams);
|
||||||
|
commonBuiltins.append(", float");
|
||||||
|
commonBuiltins.append(", int, int, int);\n");
|
||||||
|
|
||||||
|
commonBuiltins.append("float imageAtomicMax(volatile coherent ");
|
||||||
|
commonBuiltins.append(imageParams);
|
||||||
|
commonBuiltins.append(", float);\n");
|
||||||
|
|
||||||
|
commonBuiltins.append("float imageAtomicMax(volatile coherent ");
|
||||||
|
commonBuiltins.append(imageParams);
|
||||||
|
commonBuiltins.append(", float");
|
||||||
|
commonBuiltins.append(", int, int, int);\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7278,7 +7315,8 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||||||
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
|
||||||
s.append(builtInConstant);
|
s.append(builtInConstant);
|
||||||
|
|
||||||
if (version < 150 || ARBCompatibility) {
|
// Moved from just being deprecated into compatibility profile only as of 4.20
|
||||||
|
if (version < 420 || profile == ECompatibilityProfile) {
|
||||||
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
|
||||||
s.append(builtInConstant);
|
s.append(builtInConstant);
|
||||||
}
|
}
|
||||||
|
@ -1092,12 +1092,31 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct
|
|||||||
TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn);
|
TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn);
|
||||||
if (symbol && symbol->getAsFunction() && builtIn)
|
if (symbol && symbol->getAsFunction() && builtIn)
|
||||||
requireProfile(loc, ~EEsProfile, "redefinition of built-in function");
|
requireProfile(loc, ~EEsProfile, "redefinition of built-in function");
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// Check the validity of using spirv_literal qualifier
|
||||||
|
for (int i = 0; i < function.getParamCount(); ++i) {
|
||||||
|
if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst)
|
||||||
|
error(loc, "'spirv_literal' can only be used on functions defined with 'spirv_instruction' for argument",
|
||||||
|
function.getName().c_str(), "%d", i + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For function declaration with SPIR-V instruction qualifier, always ignore the built-in function and
|
||||||
|
// respect this redeclared one.
|
||||||
|
if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst)
|
||||||
|
symbol = nullptr;
|
||||||
|
#endif
|
||||||
const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
|
const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0;
|
||||||
if (prevDec) {
|
if (prevDec) {
|
||||||
if (prevDec->isPrototyped() && prototype)
|
if (prevDec->isPrototyped() && prototype)
|
||||||
profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function");
|
profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function");
|
||||||
if (prevDec->getType() != function.getType())
|
if (prevDec->getType() != function.getType())
|
||||||
error(loc, "overloaded functions must have the same return type", function.getName().c_str(), "");
|
error(loc, "overloaded functions must have the same return type", function.getName().c_str(), "");
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) {
|
||||||
|
error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(),
|
||||||
|
"spirv_instruction");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
for (int i = 0; i < prevDec->getParamCount(); ++i) {
|
for (int i = 0; i < prevDec->getParamCount(); ++i) {
|
||||||
if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage)
|
if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage)
|
||||||
error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1);
|
error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1);
|
||||||
@ -1299,6 +1318,15 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||||||
if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped()))
|
if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped()))
|
||||||
error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
|
error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", "");
|
||||||
}
|
}
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (formalQualifier.isSpirvLiteral()) {
|
||||||
|
if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) {
|
||||||
|
error(arguments->getLoc(),
|
||||||
|
"Non front-end constant expressions cannot be passed for 'spirv_literal' parameters.",
|
||||||
|
"spirv_literal", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
const TType& argType = arg->getAsTyped()->getType();
|
const TType& argType = arg->getAsTyped()->getType();
|
||||||
const TQualifier& argQualifier = argType.getQualifier();
|
const TQualifier& argQualifier = argType.getQualifier();
|
||||||
if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) {
|
if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) {
|
||||||
@ -1353,6 +1381,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||||||
if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) {
|
if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) {
|
||||||
// A function call mapped to a built-in operation.
|
// A function call mapped to a built-in operation.
|
||||||
result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate);
|
result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate);
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
} else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) {
|
||||||
|
// When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation.
|
||||||
|
result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// This is a function call not mapped to built-in operator.
|
// This is a function call not mapped to built-in operator.
|
||||||
// It could still be a built-in function, but only if PureOperatorBuiltins == false.
|
// It could still be a built-in function, but only if PureOperatorBuiltins == false.
|
||||||
@ -1430,6 +1463,35 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo
|
|||||||
} else if (result->getAsOperator())
|
} else if (result->getAsOperator())
|
||||||
builtInOpCheck(loc, function, *result->getAsOperator());
|
builtInOpCheck(loc, function, *result->getAsOperator());
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// Special handling for function call with SPIR-V instruction qualifier specified
|
||||||
|
if (function.getBuiltInOp() == EOpSpirvInst) {
|
||||||
|
if (auto agg = result->getAsAggregate()) {
|
||||||
|
// Propogate spirv_by_reference/spirv_literal from parameters to arguments
|
||||||
|
auto& sequence = agg->getSequence();
|
||||||
|
for (unsigned i = 0; i < sequence.size(); ++i) {
|
||||||
|
if (function[i].type->getQualifier().isSpirvByReference())
|
||||||
|
sequence[i]->getAsTyped()->getQualifier().setSpirvByReference();
|
||||||
|
if (function[i].type->getQualifier().isSpirvLiteral())
|
||||||
|
sequence[i]->getAsTyped()->getQualifier().setSpirvLiteral();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach the function call to SPIR-V intruction
|
||||||
|
agg->setSpirvInstruction(function.getSpirvInstruction());
|
||||||
|
} else if (auto unaryNode = result->getAsUnaryNode()) {
|
||||||
|
// Propogate spirv_by_reference/spirv_literal from parameters to arguments
|
||||||
|
if (function[0].type->getQualifier().isSpirvByReference())
|
||||||
|
unaryNode->getOperand()->getQualifier().setSpirvByReference();
|
||||||
|
if (function[0].type->getQualifier().isSpirvLiteral())
|
||||||
|
unaryNode->getOperand()->getQualifier().setSpirvLiteral();
|
||||||
|
|
||||||
|
// Attach the function call to SPIR-V intruction
|
||||||
|
unaryNode->setSpirvInstruction(function.getSpirvInstruction());
|
||||||
|
} else
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2279,18 +2341,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||||||
error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), "");
|
error(loc, "only supported on image with format r64i", fnCandidate.getName().c_str(), "");
|
||||||
else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui)
|
else if (callNode.getType().getBasicType() == EbtUint64 && imageType.getQualifier().getFormat() != ElfR64ui)
|
||||||
error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), "");
|
error(loc, "only supported on image with format r64ui", fnCandidate.getName().c_str(), "");
|
||||||
} else {
|
} else if (imageType.getSampler().type == EbtFloat) {
|
||||||
bool isImageAtomicOnFloatAllowed = ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
|
if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0) {
|
||||||
|
// imageAtomicExchange doesn't require an extension
|
||||||
|
} else if ((fnCandidate.getName().compare(0, 14, "imageAtomicAdd") == 0) ||
|
||||||
(fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
|
(fnCandidate.getName().compare(0, 15, "imageAtomicLoad") == 0) ||
|
||||||
(fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0) ||
|
(fnCandidate.getName().compare(0, 16, "imageAtomicStore") == 0)) {
|
||||||
(fnCandidate.getName().compare(0, 19, "imageAtomicExchange") == 0));
|
|
||||||
if (imageType.getSampler().type == EbtFloat && isImageAtomicOnFloatAllowed &&
|
|
||||||
(fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0)) // imageAtomicExchange doesn't require GL_EXT_shader_atomic_float
|
|
||||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||||
if (!isImageAtomicOnFloatAllowed)
|
} else if ((fnCandidate.getName().compare(0, 14, "imageAtomicMin") == 0) ||
|
||||||
|
(fnCandidate.getName().compare(0, 14, "imageAtomicMax") == 0)) {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
|
||||||
|
} else {
|
||||||
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
|
error(loc, "only supported on integer images", fnCandidate.getName().c_str(), "");
|
||||||
else if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
|
}
|
||||||
|
if (imageType.getQualifier().getFormat() != ElfR32f && isEsProfile())
|
||||||
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
|
error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), "");
|
||||||
|
} else {
|
||||||
|
error(loc, "not supported on this image type", fnCandidate.getName().c_str(), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
const size_t maxArgs = imageType.getSampler().isMultiSample() ? 5 : 4;
|
const size_t maxArgs = imageType.getSampler().isMultiSample() ? 5 : 4;
|
||||||
@ -2319,16 +2386,28 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||||||
memorySemanticsCheck(loc, fnCandidate, callNode);
|
memorySemanticsCheck(loc, fnCandidate, callNode);
|
||||||
if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
|
if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
|
||||||
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) &&
|
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore) &&
|
||||||
(arg0->getType().isFloatingDomain())) {
|
(arg0->getType().getBasicType() == EbtFloat ||
|
||||||
|
arg0->getType().getBasicType() == EbtDouble)) {
|
||||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||||
|
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
|
||||||
|
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore ||
|
||||||
|
callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) &&
|
||||||
|
arg0->getType().isFloatingDomain()) {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
|
||||||
}
|
}
|
||||||
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
|
} else if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) {
|
||||||
const char* const extensions[2] = { E_GL_NV_shader_atomic_int64,
|
const char* const extensions[2] = { E_GL_NV_shader_atomic_int64,
|
||||||
E_GL_EXT_shader_atomic_int64 };
|
E_GL_EXT_shader_atomic_int64 };
|
||||||
requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str());
|
requireExtensions(loc, 2, extensions, fnCandidate.getName().c_str());
|
||||||
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) &&
|
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange) &&
|
||||||
(arg0->getType().isFloatingDomain())) {
|
(arg0->getType().getBasicType() == EbtFloat ||
|
||||||
|
arg0->getType().getBasicType() == EbtDouble)) {
|
||||||
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float, fnCandidate.getName().c_str());
|
||||||
|
} else if ((callNode.getOp() == EOpAtomicAdd || callNode.getOp() == EOpAtomicExchange ||
|
||||||
|
callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpAtomicStore ||
|
||||||
|
callNode.getOp() == EOpAtomicMin || callNode.getOp() == EOpAtomicMax) &&
|
||||||
|
arg0->getType().isFloatingDomain()) {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_atomic_float2, fnCandidate.getName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true);
|
const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true);
|
||||||
@ -2937,7 +3016,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
|
|||||||
// "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be
|
// "Identifiers starting with "gl_" are reserved for use by OpenGL, and may not be
|
||||||
// declared in a shader; this results in a compile-time error."
|
// declared in a shader; this results in a compile-time error."
|
||||||
if (! symbolTable.atBuiltInLevel()) {
|
if (! symbolTable.atBuiltInLevel()) {
|
||||||
if (builtInName(identifier))
|
if (builtInName(identifier) && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||||
|
// The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "gl_".
|
||||||
error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
|
error(loc, "identifiers starting with \"gl_\" are reserved", identifier.c_str(), "");
|
||||||
|
|
||||||
// "__" are not supposed to be an error. ES 300 (and desktop) added the clarification:
|
// "__" are not supposed to be an error. ES 300 (and desktop) added the clarification:
|
||||||
@ -2945,7 +3025,8 @@ void TParseContext::reservedErrorCheck(const TSourceLoc& loc, const TString& ide
|
|||||||
// reserved; using such a name does not itself result in an error, but may result
|
// reserved; using such a name does not itself result in an error, but may result
|
||||||
// in undefined behavior."
|
// in undefined behavior."
|
||||||
// however, before that, ES tests required an error.
|
// however, before that, ES tests required an error.
|
||||||
if (identifier.find("__") != TString::npos) {
|
if (identifier.find("__") != TString::npos && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
|
||||||
|
// The extension GL_EXT_spirv_intrinsics allows us to declare identifiers starting with "__".
|
||||||
if (isEsProfile() && version < 300)
|
if (isEsProfile() && version < 300)
|
||||||
error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), "");
|
error(loc, "identifiers containing consecutive underscores (\"__\") are reserved, and an error if version < 300", identifier.c_str(), "");
|
||||||
else
|
else
|
||||||
@ -2966,14 +3047,16 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden
|
|||||||
// single underscore) are also reserved, and defining such a name results in a
|
// single underscore) are also reserved, and defining such a name results in a
|
||||||
// compile-time error."
|
// compile-time error."
|
||||||
// however, before that, ES tests required an error.
|
// however, before that, ES tests required an error.
|
||||||
if (strncmp(identifier, "GL_", 3) == 0)
|
if (strncmp(identifier, "GL_", 3) == 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||||
|
// The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "GL_".
|
||||||
ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier);
|
ppError(loc, "names beginning with \"GL_\" can't be (un)defined:", op, identifier);
|
||||||
else if (strncmp(identifier, "defined", 8) == 0)
|
else if (strncmp(identifier, "defined", 8) == 0)
|
||||||
if (relaxedErrors())
|
if (relaxedErrors())
|
||||||
ppWarn(loc, "\"defined\" is (un)defined:", op, identifier);
|
ppWarn(loc, "\"defined\" is (un)defined:", op, identifier);
|
||||||
else
|
else
|
||||||
ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
|
ppError(loc, "\"defined\" can't be (un)defined:", op, identifier);
|
||||||
else if (strstr(identifier, "__") != 0) {
|
else if (strstr(identifier, "__") != 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) {
|
||||||
|
// The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__".
|
||||||
if (isEsProfile() && version >= 300 &&
|
if (isEsProfile() && version >= 300 &&
|
||||||
(strcmp(identifier, "__LINE__") == 0 ||
|
(strcmp(identifier, "__LINE__") == 0 ||
|
||||||
strcmp(identifier, "__FILE__") == 0 ||
|
strcmp(identifier, "__FILE__") == 0 ||
|
||||||
@ -3121,6 +3204,7 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
|
|||||||
bool matrixInMatrix = false;
|
bool matrixInMatrix = false;
|
||||||
bool arrayArg = false;
|
bool arrayArg = false;
|
||||||
bool floatArgument = false;
|
bool floatArgument = false;
|
||||||
|
bool intArgument = false;
|
||||||
for (int arg = 0; arg < function.getParamCount(); ++arg) {
|
for (int arg = 0; arg < function.getParamCount(); ++arg) {
|
||||||
if (function[arg].type->isArray()) {
|
if (function[arg].type->isArray()) {
|
||||||
if (function[arg].type->isUnsizedArray()) {
|
if (function[arg].type->isUnsizedArray()) {
|
||||||
@ -3151,6 +3235,8 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
|
|||||||
specConstType = true;
|
specConstType = true;
|
||||||
if (function[arg].type->isFloatingDomain())
|
if (function[arg].type->isFloatingDomain())
|
||||||
floatArgument = true;
|
floatArgument = true;
|
||||||
|
if (function[arg].type->isIntegerDomain())
|
||||||
|
intArgument = true;
|
||||||
if (type.isStruct()) {
|
if (type.isStruct()) {
|
||||||
if (function[arg].type->contains16BitFloat()) {
|
if (function[arg].type->contains16BitFloat()) {
|
||||||
requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type");
|
requireFloat16Arithmetic(loc, "constructor", "can't construct structure containing 16-bit type");
|
||||||
@ -3256,6 +3342,15 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
|
|||||||
// and aren't making an array.
|
// and aren't making an array.
|
||||||
makeSpecConst = ! floatArgument && ! type.isArray();
|
makeSpecConst = ! floatArgument && ! type.isArray();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EOpConstructVec2:
|
||||||
|
case EOpConstructVec3:
|
||||||
|
case EOpConstructVec4:
|
||||||
|
// This was the list of valid ones, if they aren't converting from int
|
||||||
|
// and aren't making an array.
|
||||||
|
makeSpecConst = ! intArgument && !type.isArray();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// anything else wasn't white-listed in the spec as a conversion
|
// anything else wasn't white-listed in the spec as a conversion
|
||||||
makeSpecConst = false;
|
makeSpecConst = false;
|
||||||
@ -3588,6 +3683,14 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
|
|||||||
if (!nonuniformOkay && qualifier.isNonUniform())
|
if (!nonuniformOkay && qualifier.isNonUniform())
|
||||||
error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
|
error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", "");
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (qualifier.isSpirvByReference())
|
||||||
|
error(loc, "can only apply to parameter", "spirv_by_reference", "");
|
||||||
|
|
||||||
|
if (qualifier.isSpirvLiteral())
|
||||||
|
error(loc, "can only apply to parameter", "spirv_literal", "");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it.
|
// Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it.
|
||||||
if (!isMemberCheck || structNestingLevel > 0)
|
if (!isMemberCheck || structNestingLevel > 0)
|
||||||
invariantCheck(loc, qualifier);
|
invariantCheck(loc, qualifier);
|
||||||
@ -3849,6 +3952,41 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons
|
|||||||
MERGE_SINGLETON(nonUniform);
|
MERGE_SINGLETON(nonUniform);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics)
|
||||||
|
dst.spirvStorageClass = src.spirvStorageClass;
|
||||||
|
|
||||||
|
// SPIR-V decorate qualifiers (GL_EXT_spirv_intrinsics)
|
||||||
|
if (src.hasSprivDecorate()) {
|
||||||
|
if (dst.hasSprivDecorate()) {
|
||||||
|
const TSpirvDecorate& srcSpirvDecorate = src.getSpirvDecorate();
|
||||||
|
TSpirvDecorate& dstSpirvDecorate = dst.getSpirvDecorate();
|
||||||
|
for (auto& decorate : srcSpirvDecorate.decorates) {
|
||||||
|
if (dstSpirvDecorate.decorates.find(decorate.first) != dstSpirvDecorate.decorates.end())
|
||||||
|
error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate", "(decoration=%u)", decorate.first);
|
||||||
|
else
|
||||||
|
dstSpirvDecorate.decorates.insert(decorate);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& decorateId : srcSpirvDecorate.decorateIds) {
|
||||||
|
if (dstSpirvDecorate.decorateIds.find(decorateId.first) != dstSpirvDecorate.decorateIds.end())
|
||||||
|
error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_id", "(decoration=%u)", decorateId.first);
|
||||||
|
else
|
||||||
|
dstSpirvDecorate.decorateIds.insert(decorateId);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& decorateString : srcSpirvDecorate.decorateStrings) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dst.spirvDecorate = src.spirvDecorate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (repeated)
|
if (repeated)
|
||||||
error(loc, "replicated qualifiers", "", "");
|
error(loc, "replicated qualifiers", "", "");
|
||||||
}
|
}
|
||||||
@ -4812,6 +4950,17 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali
|
|||||||
}
|
}
|
||||||
if (qualifier.isNonUniform())
|
if (qualifier.isNonUniform())
|
||||||
type.getQualifier().nonUniform = qualifier.nonUniform;
|
type.getQualifier().nonUniform = qualifier.nonUniform;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (qualifier.isSpirvByReference())
|
||||||
|
type.getQualifier().setSpirvByReference();
|
||||||
|
if (qualifier.isSpirvLiteral()) {
|
||||||
|
if (type.getBasicType() == EbtFloat || type.getBasicType() == EbtInt || type.getBasicType() == EbtUint ||
|
||||||
|
type.getBasicType() == EbtBool)
|
||||||
|
type.getQualifier().setSpirvLiteral();
|
||||||
|
else
|
||||||
|
error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), "");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
paramCheckFixStorage(loc, qualifier.storage, type);
|
paramCheckFixStorage(loc, qualifier.storage, type);
|
||||||
}
|
}
|
||||||
@ -5879,6 +6028,9 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
|
|||||||
case EvqVaryingIn:
|
case EvqVaryingIn:
|
||||||
case EvqVaryingOut:
|
case EvqVaryingOut:
|
||||||
if (!type.getQualifier().isTaskMemory() &&
|
if (!type.getQualifier().isTaskMemory() &&
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
!type.getQualifier().hasSprivDecorate() &&
|
||||||
|
#endif
|
||||||
(type.getBasicType() != EbtBlock ||
|
(type.getBasicType() != EbtBlock ||
|
||||||
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
|
(!(*type.getStruct())[0].type->getQualifier().hasLocation() &&
|
||||||
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)))
|
(*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)))
|
||||||
@ -5940,6 +6092,11 @@ void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool m
|
|||||||
// Do layout error checking with respect to a type.
|
// Do layout error checking with respect to a type.
|
||||||
void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||||
{
|
{
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||||
|
return; // Skip any check if GL_EXT_spirv_intrinsics is turned on
|
||||||
|
#endif
|
||||||
|
|
||||||
const TQualifier& qualifier = type.getQualifier();
|
const TQualifier& qualifier = type.getQualifier();
|
||||||
|
|
||||||
// first, intra-layout qualifier-only error checking
|
// first, intra-layout qualifier-only error checking
|
||||||
@ -7946,6 +8103,10 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con
|
|||||||
memberQualifier.perViewNV = currentBlockQualifier.perViewNV;
|
memberQualifier.perViewNV = currentBlockQualifier.perViewNV;
|
||||||
if (currentBlockQualifier.perTaskNV)
|
if (currentBlockQualifier.perTaskNV)
|
||||||
memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV;
|
memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV;
|
||||||
|
if (memberQualifier.storage == EvqSpirvStorageClass)
|
||||||
|
error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), "");
|
||||||
|
if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty())
|
||||||
|
error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), "");
|
||||||
#endif
|
#endif
|
||||||
if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
|
if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary()))
|
||||||
error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
|
error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), "");
|
||||||
|
@ -470,6 +470,22 @@ public:
|
|||||||
void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*);
|
void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*);
|
||||||
// Determine loop control from attributes
|
// Determine loop control from attributes
|
||||||
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
|
void handleLoopAttributes(const TAttributes& attributes, TIntermNode*);
|
||||||
|
// Function attributes
|
||||||
|
void handleFunctionAttributes(const TSourceLoc&, const TAttributes&, TFunction*);
|
||||||
|
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
TSpirvRequirement* makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
|
||||||
|
const TIntermAggregate* extensions, const TIntermAggregate* capabilities);
|
||||||
|
TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
|
||||||
|
TSpirvRequirement* spirvReq2);
|
||||||
|
TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant);
|
||||||
|
TSpirvTypeParameters* makeSpirvTypeParameters(const TPublicType& type);
|
||||||
|
TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1,
|
||||||
|
TSpirvTypeParameters* spirvTypeParams2);
|
||||||
|
TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value);
|
||||||
|
TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value);
|
||||||
|
TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1,
|
||||||
|
TSpirvInstruction* spirvInst2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
|
void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember);
|
||||||
|
@ -586,6 +586,18 @@ void TScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["f64mat4x2"] = F64MAT4X2;
|
(*KeywordMap)["f64mat4x2"] = F64MAT4X2;
|
||||||
(*KeywordMap)["f64mat4x3"] = F64MAT4X3;
|
(*KeywordMap)["f64mat4x3"] = F64MAT4X3;
|
||||||
(*KeywordMap)["f64mat4x4"] = F64MAT4X4;
|
(*KeywordMap)["f64mat4x4"] = F64MAT4X4;
|
||||||
|
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
(*KeywordMap)["spirv_instruction"] = SPIRV_INSTRUCTION;
|
||||||
|
(*KeywordMap)["spirv_execution_mode"] = SPIRV_EXECUTION_MODE;
|
||||||
|
(*KeywordMap)["spirv_execution_mode_id"] = SPIRV_EXECUTION_MODE_ID;
|
||||||
|
(*KeywordMap)["spirv_decorate"] = SPIRV_DECORATE;
|
||||||
|
(*KeywordMap)["spirv_decorate_id"] = SPIRV_DECORATE_ID;
|
||||||
|
(*KeywordMap)["spirv_decorate_string"] = SPIRV_DECORATE_STRING;
|
||||||
|
(*KeywordMap)["spirv_type"] = SPIRV_TYPE;
|
||||||
|
(*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS;
|
||||||
|
(*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE;
|
||||||
|
(*KeywordMap)["spirv_literal"] = SPIRV_LITERAL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
(*KeywordMap)["sampler2D"] = SAMPLER2D;
|
(*KeywordMap)["sampler2D"] = SAMPLER2D;
|
||||||
@ -1747,6 +1759,21 @@ int TScanContext::tokenizeIdentifier()
|
|||||||
return keyword;
|
return keyword;
|
||||||
else
|
else
|
||||||
return identifierOrType();
|
return identifierOrType();
|
||||||
|
|
||||||
|
case SPIRV_INSTRUCTION:
|
||||||
|
case SPIRV_EXECUTION_MODE:
|
||||||
|
case SPIRV_EXECUTION_MODE_ID:
|
||||||
|
case SPIRV_DECORATE:
|
||||||
|
case SPIRV_DECORATE_ID:
|
||||||
|
case SPIRV_DECORATE_STRING:
|
||||||
|
case SPIRV_TYPE:
|
||||||
|
case SPIRV_STORAGE_CLASS:
|
||||||
|
case SPIRV_BY_REFERENCE:
|
||||||
|
case SPIRV_LITERAL:
|
||||||
|
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||||
|
parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||||
|
return keyword;
|
||||||
|
return identifierOrType();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
355
glslang/MachineIndependent/SpirvIntrinsics.cpp
Normal file
355
glslang/MachineIndependent/SpirvIntrinsics.cpp
Normal file
@ -0,0 +1,355 @@
|
|||||||
|
//
|
||||||
|
// Copyright(C) 2021 Advanced Micro Devices, Inc.
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions
|
||||||
|
// are met:
|
||||||
|
//
|
||||||
|
// Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following
|
||||||
|
// disclaimer in the documentation and/or other materials provided
|
||||||
|
// with the distribution.
|
||||||
|
//
|
||||||
|
// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived
|
||||||
|
// from this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
// POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
|
||||||
|
//
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
//
|
||||||
|
#include "../Include/intermediate.h"
|
||||||
|
#include "../Include/SpirvIntrinsics.h"
|
||||||
|
#include "../Include/Types.h"
|
||||||
|
#include "ParseHelper.h"
|
||||||
|
|
||||||
|
namespace glslang {
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle SPIR-V requirements
|
||||||
|
//
|
||||||
|
TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, const TString& name,
|
||||||
|
const TIntermAggregate* extensions,
|
||||||
|
const TIntermAggregate* capabilities)
|
||||||
|
{
|
||||||
|
TSpirvRequirement* spirvReq = new TSpirvRequirement;
|
||||||
|
|
||||||
|
if (name == "extensions") {
|
||||||
|
assert(extensions);
|
||||||
|
for (auto extension : extensions->getSequence()) {
|
||||||
|
assert(extension->getAsConstantUnion());
|
||||||
|
spirvReq->extensions.insert(*extension->getAsConstantUnion()->getConstArray()[0].getSConst());
|
||||||
|
}
|
||||||
|
} else if (name == "capabilities") {
|
||||||
|
assert(capabilities);
|
||||||
|
for (auto capability : capabilities->getSequence()) {
|
||||||
|
assert(capability->getAsConstantUnion());
|
||||||
|
spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst());
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
error(loc, "unknow SPIR-V requirement", name.c_str(), "");
|
||||||
|
|
||||||
|
return spirvReq;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvRequirement* TParseContext::mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1,
|
||||||
|
TSpirvRequirement* spirvReq2)
|
||||||
|
{
|
||||||
|
// Merge the second SPIR-V requirement to the first one
|
||||||
|
if (!spirvReq2->extensions.empty()) {
|
||||||
|
if (spirvReq1->extensions.empty())
|
||||||
|
spirvReq1->extensions = spirvReq2->extensions;
|
||||||
|
else
|
||||||
|
error(loc, "too many SPIR-V requirements", "extensions", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!spirvReq2->capabilities.empty()) {
|
||||||
|
if (spirvReq1->capabilities.empty())
|
||||||
|
spirvReq1->capabilities = spirvReq2->capabilities;
|
||||||
|
else
|
||||||
|
error(loc, "too many SPIR-V requirements", "capabilities", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
return spirvReq1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TIntermediate::insertSpirvRequirement(const TSpirvRequirement* spirvReq)
|
||||||
|
{
|
||||||
|
if (!spirvRequirement)
|
||||||
|
spirvRequirement = new TSpirvRequirement;
|
||||||
|
|
||||||
|
for (auto extension : spirvReq->extensions)
|
||||||
|
spirvRequirement->extensions.insert(extension);
|
||||||
|
|
||||||
|
for (auto capability : spirvReq->capabilities)
|
||||||
|
spirvRequirement->capabilities.insert(capability);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle SPIR-V execution modes
|
||||||
|
//
|
||||||
|
void TIntermediate::insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args)
|
||||||
|
{
|
||||||
|
if (!spirvExecutionMode)
|
||||||
|
spirvExecutionMode = new TSpirvExecutionMode;
|
||||||
|
|
||||||
|
TVector<const TIntermConstantUnion*> extraOperands;
|
||||||
|
if (args) {
|
||||||
|
for (auto arg : args->getSequence()) {
|
||||||
|
auto extraOperand = arg->getAsConstantUnion();
|
||||||
|
assert(extraOperand != nullptr);
|
||||||
|
extraOperands.push_back(extraOperand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spirvExecutionMode->modes[executionMode] = extraOperands;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TIntermediate::insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args)
|
||||||
|
{
|
||||||
|
if (!spirvExecutionMode)
|
||||||
|
spirvExecutionMode = new TSpirvExecutionMode;
|
||||||
|
|
||||||
|
assert(args);
|
||||||
|
TVector<const TIntermConstantUnion*> extraOperands;
|
||||||
|
|
||||||
|
for (auto arg : args->getSequence()) {
|
||||||
|
auto extraOperand = arg->getAsConstantUnion();
|
||||||
|
assert(extraOperand != nullptr);
|
||||||
|
extraOperands.push_back(extraOperand);
|
||||||
|
}
|
||||||
|
spirvExecutionMode->modeIds[executionMode] = extraOperands;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle SPIR-V decorate qualifiers
|
||||||
|
//
|
||||||
|
void TQualifier::setSpirvDecorate(int decoration, const TIntermAggregate* args)
|
||||||
|
{
|
||||||
|
if (!spirvDecorate)
|
||||||
|
spirvDecorate = new TSpirvDecorate;
|
||||||
|
|
||||||
|
TVector<const TIntermConstantUnion*> extraOperands;
|
||||||
|
if (args) {
|
||||||
|
for (auto arg : args->getSequence()) {
|
||||||
|
auto extraOperand = arg->getAsConstantUnion();
|
||||||
|
assert(extraOperand != nullptr);
|
||||||
|
extraOperands.push_back(extraOperand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spirvDecorate->decorates[decoration] = extraOperands;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args)
|
||||||
|
{
|
||||||
|
if (!spirvDecorate)
|
||||||
|
spirvDecorate = new TSpirvDecorate;
|
||||||
|
|
||||||
|
assert(args);
|
||||||
|
TVector<const TIntermConstantUnion*> extraOperands;
|
||||||
|
for (auto arg : args->getSequence()) {
|
||||||
|
auto extraOperand = arg->getAsConstantUnion();
|
||||||
|
assert(extraOperand != nullptr);
|
||||||
|
extraOperands.push_back(extraOperand);
|
||||||
|
}
|
||||||
|
spirvDecorate->decorateIds[decoration] = extraOperands;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TQualifier::setSpirvDecorateString(int decoration, const TIntermAggregate* args)
|
||||||
|
{
|
||||||
|
if (!spirvDecorate)
|
||||||
|
spirvDecorate = new TSpirvDecorate;
|
||||||
|
|
||||||
|
assert(args);
|
||||||
|
TVector<const TIntermConstantUnion*> extraOperands;
|
||||||
|
for (auto arg : args->getSequence()) {
|
||||||
|
auto extraOperand = arg->getAsConstantUnion();
|
||||||
|
assert(extraOperand != nullptr);
|
||||||
|
extraOperands.push_back(extraOperand);
|
||||||
|
}
|
||||||
|
spirvDecorate->decorateStrings[decoration] = extraOperands;
|
||||||
|
}
|
||||||
|
|
||||||
|
TString TQualifier::getSpirvDecorateQualifierString() const
|
||||||
|
{
|
||||||
|
assert(spirvDecorate);
|
||||||
|
|
||||||
|
TString qualifierString;
|
||||||
|
|
||||||
|
const auto appendFloat = [&](float f) { qualifierString.append(std::to_string(f).c_str()); };
|
||||||
|
const auto appendInt = [&](int i) { qualifierString.append(std::to_string(i).c_str()); };
|
||||||
|
const auto appendUint = [&](unsigned int u) { qualifierString.append(std::to_string(u).c_str()); };
|
||||||
|
const auto appendBool = [&](bool b) { qualifierString.append(std::to_string(b).c_str()); };
|
||||||
|
const auto appendStr = [&](const char* s) { qualifierString.append(s); };
|
||||||
|
|
||||||
|
const auto appendDecorate = [&](const TIntermConstantUnion* constant) {
|
||||||
|
if (constant->getBasicType() == EbtFloat) {
|
||||||
|
float value = static_cast<float>(constant->getConstArray()[0].getDConst());
|
||||||
|
appendFloat(value);
|
||||||
|
}
|
||||||
|
else if (constant->getBasicType() == EbtInt) {
|
||||||
|
int value = constant->getConstArray()[0].getIConst();
|
||||||
|
appendInt(value);
|
||||||
|
}
|
||||||
|
else if (constant->getBasicType() == EbtUint) {
|
||||||
|
unsigned value = constant->getConstArray()[0].getUConst();
|
||||||
|
appendUint(value);
|
||||||
|
}
|
||||||
|
else if (constant->getBasicType() == EbtBool) {
|
||||||
|
bool value = constant->getConstArray()[0].getBConst();
|
||||||
|
appendBool(value);
|
||||||
|
}
|
||||||
|
else if (constant->getBasicType() == EbtString) {
|
||||||
|
const TString* value = constant->getConstArray()[0].getSConst();
|
||||||
|
appendStr(value->c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
assert(0);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (auto& decorate : spirvDecorate->decorates) {
|
||||||
|
appendStr("spirv_decorate(");
|
||||||
|
appendInt(decorate.first);
|
||||||
|
for (auto extraOperand : decorate.second) {
|
||||||
|
appendStr(", ");
|
||||||
|
appendDecorate(extraOperand);
|
||||||
|
}
|
||||||
|
appendStr(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& decorateId : spirvDecorate->decorateIds) {
|
||||||
|
appendStr("spirv_decorate_id(");
|
||||||
|
appendInt(decorateId.first);
|
||||||
|
for (auto extraOperand : decorateId.second) {
|
||||||
|
appendStr(", ");
|
||||||
|
appendDecorate(extraOperand);
|
||||||
|
}
|
||||||
|
appendStr(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& decorateString : spirvDecorate->decorateStrings) {
|
||||||
|
appendStr("spirv_decorate_string(");
|
||||||
|
appendInt(decorateString.first);
|
||||||
|
for (auto extraOperand : decorateString.second) {
|
||||||
|
appendStr(", ");
|
||||||
|
appendDecorate(extraOperand);
|
||||||
|
}
|
||||||
|
appendStr(") ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return qualifierString;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle SPIR-V type specifiers
|
||||||
|
//
|
||||||
|
void TPublicType::setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams)
|
||||||
|
{
|
||||||
|
if (!spirvType)
|
||||||
|
spirvType = new TSpirvType;
|
||||||
|
|
||||||
|
basicType = EbtSpirvType;
|
||||||
|
spirvType->spirvInst = spirvInst;
|
||||||
|
if (typeParams)
|
||||||
|
spirvType->typeParams = *typeParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant)
|
||||||
|
{
|
||||||
|
TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
|
||||||
|
if (constant->getBasicType() != EbtFloat &&
|
||||||
|
constant->getBasicType() != EbtInt &&
|
||||||
|
constant->getBasicType() != EbtUint &&
|
||||||
|
constant->getBasicType() != EbtBool &&
|
||||||
|
constant->getBasicType() != EbtString)
|
||||||
|
error(loc, "this type not allowed", constant->getType().getBasicString(), "");
|
||||||
|
else {
|
||||||
|
assert(constant);
|
||||||
|
spirvTypeParams->push_back(TSpirvTypeParameter(constant));
|
||||||
|
}
|
||||||
|
|
||||||
|
return spirvTypeParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TPublicType& type)
|
||||||
|
{
|
||||||
|
TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters;
|
||||||
|
spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type)));
|
||||||
|
return spirvTypeParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2)
|
||||||
|
{
|
||||||
|
// Merge SPIR-V type parameters of the second one to the first one
|
||||||
|
for (const auto& spirvTypeParam : *spirvTypeParams2)
|
||||||
|
spirvTypeParams1->push_back(spirvTypeParam);
|
||||||
|
return spirvTypeParams1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Handle SPIR-V instruction qualifiers
|
||||||
|
//
|
||||||
|
TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value)
|
||||||
|
{
|
||||||
|
TSpirvInstruction* spirvInst = new TSpirvInstruction;
|
||||||
|
if (name == "set")
|
||||||
|
spirvInst->set = value;
|
||||||
|
else
|
||||||
|
error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), "");
|
||||||
|
|
||||||
|
return spirvInst;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvInstruction* TParseContext::makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value)
|
||||||
|
{
|
||||||
|
TSpirvInstruction* spirvInstuction = new TSpirvInstruction;
|
||||||
|
if (name == "id")
|
||||||
|
spirvInstuction->id = value;
|
||||||
|
else
|
||||||
|
error(loc, "unknown SPIR-V instruction qualifier", name.c_str(), "");
|
||||||
|
|
||||||
|
return spirvInstuction;
|
||||||
|
}
|
||||||
|
|
||||||
|
TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2)
|
||||||
|
{
|
||||||
|
// Merge qualifiers of the second SPIR-V instruction to those of the first one
|
||||||
|
if (!spirvInst2->set.empty()) {
|
||||||
|
if (spirvInst1->set.empty())
|
||||||
|
spirvInst1->set = spirvInst2->set;
|
||||||
|
else
|
||||||
|
error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(set)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spirvInst2->id != -1) {
|
||||||
|
if (spirvInst1->id == -1)
|
||||||
|
spirvInst1->id = spirvInst2->id;
|
||||||
|
else
|
||||||
|
error(loc, "too many SPIR-V instruction qualifiers", "spirv_instruction", "(id)");
|
||||||
|
}
|
||||||
|
|
||||||
|
return spirvInst1;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // end namespace glslang
|
||||||
|
|
||||||
|
#endif // GLSLANG_WEB
|
@ -77,6 +77,7 @@ void TType::buildMangledName(TString& mangledName) const
|
|||||||
case EbtAtomicUint: mangledName += "au"; break;
|
case EbtAtomicUint: mangledName += "au"; break;
|
||||||
case EbtAccStruct: mangledName += "as"; break;
|
case EbtAccStruct: mangledName += "as"; break;
|
||||||
case EbtRayQuery: mangledName += "rq"; break;
|
case EbtRayQuery: mangledName += "rq"; break;
|
||||||
|
case EbtSpirvType: mangledName += "spv-t"; break;
|
||||||
#endif
|
#endif
|
||||||
case EbtSampler:
|
case EbtSampler:
|
||||||
switch (sampler.type) {
|
switch (sampler.type) {
|
||||||
@ -390,6 +391,9 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
|
|||||||
implicitThis = copyOf.implicitThis;
|
implicitThis = copyOf.implicitThis;
|
||||||
illegalImplicitThis = copyOf.illegalImplicitThis;
|
illegalImplicitThis = copyOf.illegalImplicitThis;
|
||||||
defaultParamCount = copyOf.defaultParamCount;
|
defaultParamCount = copyOf.defaultParamCount;
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
spirvInst = copyOf.spirvInst;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TFunction* TFunction::clone() const
|
TFunction* TFunction::clone() const
|
||||||
|
@ -319,6 +319,15 @@ public:
|
|||||||
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
|
virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; }
|
||||||
virtual const TParameter& operator[](int i) const { return parameters[i]; }
|
virtual const TParameter& operator[](int i) const { return parameters[i]; }
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
virtual void setSpirvInstruction(const TSpirvInstruction& inst)
|
||||||
|
{
|
||||||
|
relateToOperator(EOpSpirvInst);
|
||||||
|
spirvInst = inst;
|
||||||
|
}
|
||||||
|
virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||||
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
virtual void dump(TInfoSink& infoSink, bool complete = false) const override;
|
||||||
#endif
|
#endif
|
||||||
@ -342,6 +351,10 @@ protected:
|
|||||||
// This is important for a static member function that has member variables in scope,
|
// This is important for a static member function that has member variables in scope,
|
||||||
// but is not allowed to use them, or see hidden symbols instead.
|
// but is not allowed to use them, or see hidden symbols instead.
|
||||||
int defaultParamCount;
|
int defaultParamCount;
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -251,6 +251,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
|
|
||||||
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_EXT_subgroup_uniform_control_flow] = EBhDisable;
|
||||||
|
|
||||||
// #line and #include
|
// #line and #include
|
||||||
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
|
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
|
||||||
@ -332,6 +333,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable;
|
extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable;
|
||||||
|
|
||||||
// OVR extensions
|
// OVR extensions
|
||||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||||
@ -353,6 +355,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_int64] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
|
extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
@ -415,6 +418,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
}
|
}
|
||||||
if (version >= 310) {
|
if (version >= 310) {
|
||||||
preamble += "#define GL_EXT_null_initializer 1\n";
|
preamble += "#define GL_EXT_null_initializer 1\n";
|
||||||
|
preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { // !isEsProfile()
|
} else { // !isEsProfile()
|
||||||
@ -491,6 +495,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
"#define GL_EXT_ray_tracing 1\n"
|
"#define GL_EXT_ray_tracing 1\n"
|
||||||
"#define GL_EXT_ray_query 1\n"
|
"#define GL_EXT_ray_query 1\n"
|
||||||
"#define GL_EXT_ray_flags_primitive_culling 1\n"
|
"#define GL_EXT_ray_flags_primitive_culling 1\n"
|
||||||
|
"#define GL_EXT_spirv_intrinsics 1\n"
|
||||||
|
|
||||||
"#define GL_AMD_shader_ballot 1\n"
|
"#define GL_AMD_shader_ballot 1\n"
|
||||||
"#define GL_AMD_shader_trinary_minmax 1\n"
|
"#define GL_AMD_shader_trinary_minmax 1\n"
|
||||||
@ -535,6 +540,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
|
"#define GL_EXT_shader_subgroup_extended_types_float16 1\n"
|
||||||
|
|
||||||
"#define GL_EXT_shader_atomic_float 1\n"
|
"#define GL_EXT_shader_atomic_float 1\n"
|
||||||
|
"#define GL_EXT_shader_atomic_float2 1\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
if (version >= 150) {
|
if (version >= 150) {
|
||||||
@ -546,6 +552,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
}
|
}
|
||||||
if (version >= 140) {
|
if (version >= 140) {
|
||||||
preamble += "#define GL_EXT_null_initializer 1\n";
|
preamble += "#define GL_EXT_null_initializer 1\n";
|
||||||
|
preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n";
|
||||||
}
|
}
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
}
|
}
|
||||||
@ -599,6 +606,29 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
preamble += "\n";
|
preamble += "\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
if (!isEsProfile()) {
|
||||||
|
switch (language) {
|
||||||
|
case EShLangVertex: preamble += "#define GL_VERTEX_SHADER 1 \n"; break;
|
||||||
|
case EShLangTessControl: preamble += "#define GL_TESSELLATION_CONTROL_SHADER 1 \n"; break;
|
||||||
|
case EShLangTessEvaluation: preamble += "#define GL_TESSELLATION_EVALUATION_SHADER 1 \n"; break;
|
||||||
|
case EShLangGeometry: preamble += "#define GL_GEOMETRY_SHADER 1 \n"; break;
|
||||||
|
case EShLangFragment: preamble += "#define GL_FRAGMENT_SHADER 1 \n"; break;
|
||||||
|
case EShLangCompute: preamble += "#define GL_COMPUTE_SHADER 1 \n"; break;
|
||||||
|
case EShLangRayGen: preamble += "#define GL_RAY_GENERATION_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangIntersect: preamble += "#define GL_INTERSECTION_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangAnyHit: preamble += "#define GL_ANY_HIT_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break;
|
||||||
|
case EShLangTaskNV: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break;
|
||||||
|
case EShLangMeshNV: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -204,6 +204,8 @@ const char* const E_GL_EXT_fragment_shading_rate = "GL_EXT_fragment_s
|
|||||||
const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64";
|
const char* const E_GL_EXT_shader_image_int64 = "GL_EXT_shader_image_int64";
|
||||||
const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initializer";
|
const char* const E_GL_EXT_null_initializer = "GL_EXT_null_initializer";
|
||||||
const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block";
|
const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_memory_block";
|
||||||
|
const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow";
|
||||||
|
const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics";
|
||||||
|
|
||||||
// Arrays of extensions for the above viewportEXTs duplications
|
// Arrays of extensions for the above viewportEXTs duplications
|
||||||
|
|
||||||
@ -305,6 +307,7 @@ const char* const E_GL_EXT_shader_subgroup_extended_types_float16 = "GL_EXT_shad
|
|||||||
const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation";
|
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_float = "GL_EXT_shader_atomic_float";
|
||||||
|
const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
|
||||||
|
|
||||||
// Arrays of extensions for the above AEP duplications
|
// Arrays of extensions for the above AEP duplications
|
||||||
|
|
||||||
|
@ -123,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const
|
|||||||
return EatPeelCount;
|
return EatPeelCount;
|
||||||
else if (name == "partial_count")
|
else if (name == "partial_count")
|
||||||
return EatPartialCount;
|
return EatPartialCount;
|
||||||
|
else if (name == "subgroup_uniform_control_flow")
|
||||||
|
return EatSubgroupUniformControlFlow;
|
||||||
else
|
else
|
||||||
return EatNone;
|
return EatNone;
|
||||||
}
|
}
|
||||||
@ -341,6 +343,29 @@ void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Function attributes
|
||||||
|
//
|
||||||
|
void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttributes& attributes, TFunction* function)
|
||||||
|
{
|
||||||
|
for (auto it = attributes.begin(); it != attributes.end(); ++it) {
|
||||||
|
if (it->size() > 0) {
|
||||||
|
warn(loc, "attribute with arguments not recognized, skipping", "", "");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (it->name) {
|
||||||
|
case EatSubgroupUniformControlFlow:
|
||||||
|
intermediate.setSubgroupUniformControlFlow();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
warn(loc, "attribute does not apply to a function", "", "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
|
@ -118,7 +118,8 @@ namespace glslang {
|
|||||||
EatFormatR8ui,
|
EatFormatR8ui,
|
||||||
EatFormatUnknown,
|
EatFormatUnknown,
|
||||||
EatNonWritable,
|
EatNonWritable,
|
||||||
EatNonReadable
|
EatNonReadable,
|
||||||
|
EatSubgroupUniformControlFlow,
|
||||||
};
|
};
|
||||||
|
|
||||||
class TIntermAggregate;
|
class TIntermAggregate;
|
||||||
|
@ -116,6 +116,9 @@ using namespace glslang;
|
|||||||
glslang::TIntermNodePair nodePair;
|
glslang::TIntermNodePair nodePair;
|
||||||
glslang::TIntermTyped* intermTypedNode;
|
glslang::TIntermTyped* intermTypedNode;
|
||||||
glslang::TAttributes* attributes;
|
glslang::TAttributes* attributes;
|
||||||
|
glslang::TSpirvRequirement* spirvReq;
|
||||||
|
glslang::TSpirvInstruction* spirvInst;
|
||||||
|
glslang::TSpirvTypeParameters* spirvTypeParams;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
glslang::TPublicType type;
|
glslang::TPublicType type;
|
||||||
@ -271,6 +274,11 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
|
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
|
||||||
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
|
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
|
||||||
|
|
||||||
|
// spirv intrinsics
|
||||||
|
%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
|
||||||
|
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
|
|
||||||
%token <lex> LEFT_OP RIGHT_OP
|
%token <lex> LEFT_OP RIGHT_OP
|
||||||
@ -362,6 +370,19 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
%type <interm.attributes> attribute attribute_list single_attribute
|
%type <interm.attributes> attribute attribute_list single_attribute
|
||||||
%type <interm.intermNode> demote_statement
|
%type <interm.intermNode> demote_statement
|
||||||
%type <interm.intermTypedNode> initializer_list
|
%type <interm.intermTypedNode> initializer_list
|
||||||
|
%type <interm.spirvReq> spirv_requirements_list spirv_requirements_parameter
|
||||||
|
%type <interm.intermNode> spirv_extension_list spirv_capability_list
|
||||||
|
%type <interm.intermNode> spirv_execution_mode_qualifier
|
||||||
|
%type <interm.intermNode> spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list
|
||||||
|
%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_string_parameter_list
|
||||||
|
%type <interm.type> spirv_type_specifier
|
||||||
|
%type <interm.spirvTypeParams> spirv_type_parameter_list spirv_type_parameter
|
||||||
|
%type <interm.spirvInst> spirv_instruction_qualifier
|
||||||
|
%type <interm.spirvInst> spirv_instruction_qualifier_list spirv_instruction_qualifier_id
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
|
|
||||||
%start translation_unit
|
%start translation_unit
|
||||||
@ -875,6 +896,20 @@ declaration
|
|||||||
$$ = 0;
|
$$ = 0;
|
||||||
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||||
}
|
}
|
||||||
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
|
| spirv_instruction_qualifier function_prototype SEMICOLON {
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier");
|
||||||
|
$2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier
|
||||||
|
parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */);
|
||||||
|
$$ = 0;
|
||||||
|
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_qualifier SEMICOLON {
|
||||||
|
parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier");
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier");
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
| init_declarator_list SEMICOLON {
|
| init_declarator_list SEMICOLON {
|
||||||
if ($1.intermNode && $1.intermNode->getAsAggregate())
|
if ($1.intermNode && $1.intermNode->getAsAggregate())
|
||||||
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
|
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
|
||||||
@ -944,6 +979,25 @@ function_prototype
|
|||||||
$$.function = $1;
|
$$.function = $1;
|
||||||
$$.loc = $2.loc;
|
$$.loc = $2.loc;
|
||||||
}
|
}
|
||||||
|
| function_declarator RIGHT_PAREN attribute {
|
||||||
|
$$.function = $1;
|
||||||
|
$$.loc = $2.loc;
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($2.loc, *$3, $$.function);
|
||||||
|
}
|
||||||
|
| attribute function_declarator RIGHT_PAREN {
|
||||||
|
$$.function = $2;
|
||||||
|
$$.loc = $3.loc;
|
||||||
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
||||||
|
}
|
||||||
|
| attribute function_declarator RIGHT_PAREN attribute {
|
||||||
|
$$.function = $2;
|
||||||
|
$$.loc = $3.loc;
|
||||||
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$4, $$.function);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
function_declarator
|
function_declarator
|
||||||
@ -1347,6 +1401,25 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
| non_uniform_qualifier {
|
| non_uniform_qualifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
|
| spirv_storage_class_qualifier {
|
||||||
|
parseContext.globalCheck($1.loc, "spirv_storage_class");
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_decorate_qualifier {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| SPIRV_BY_REFERENCE {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvByReference();
|
||||||
|
}
|
||||||
|
| SPIRV_LITERAL {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvLiteral();
|
||||||
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3407,6 +3480,10 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
$$.basicType = EbtUint;
|
$$.basicType = EbtUint;
|
||||||
$$.coopmat = true;
|
$$.coopmat = true;
|
||||||
}
|
}
|
||||||
|
| spirv_type_specifier {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
| struct_specifier {
|
| struct_specifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
@ -3713,6 +3790,7 @@ selection_statement
|
|||||||
}
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_ON
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
| attribute selection_statement_nonattributed {
|
| attribute selection_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleSelectionAttributes(*$1, $2);
|
parseContext.handleSelectionAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -3760,6 +3838,7 @@ switch_statement
|
|||||||
}
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_ON
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
| attribute switch_statement_nonattributed {
|
| attribute switch_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleSwitchAttributes(*$1, $2);
|
parseContext.handleSwitchAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -3824,6 +3903,7 @@ iteration_statement
|
|||||||
}
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_ON
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
| attribute iteration_statement_nonattributed {
|
| attribute iteration_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleLoopAttributes(*$1, $2);
|
parseContext.handleLoopAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -4027,7 +4107,6 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
attribute
|
attribute
|
||||||
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
|
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_list
|
attribute_list
|
||||||
@ -4047,4 +4126,273 @@ single_attribute
|
|||||||
}
|
}
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
|
|
||||||
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
|
spirv_requirements_list
|
||||||
|
: spirv_requirements_parameter {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_requirements_list COMMA spirv_requirements_parameter {
|
||||||
|
$$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_requirements_parameter
|
||||||
|
: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET {
|
||||||
|
$$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr);
|
||||||
|
}
|
||||||
|
| IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET {
|
||||||
|
$$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate());
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_extension_list
|
||||||
|
: STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_extension_list COMMA STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_capability_list
|
||||||
|
: INTCONSTANT {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_capability_list COMMA INTCONSTANT {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_qualifier
|
||||||
|
: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($3.i);
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($5.i);
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_parameter_list
|
||||||
|
: spirv_execution_mode_parameter {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_parameter
|
||||||
|
: 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);
|
||||||
|
}
|
||||||
|
| STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_id_parameter_list
|
||||||
|
: constant_expression {
|
||||||
|
if ($1->getBasicType() != EbtFloat &&
|
||||||
|
$1->getBasicType() != EbtInt &&
|
||||||
|
$1->getBasicType() != EbtUint &&
|
||||||
|
$1->getBasicType() != EbtBool &&
|
||||||
|
$1->getBasicType() != EbtString)
|
||||||
|
parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), "");
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_id_parameter_list COMMA constant_expression {
|
||||||
|
if ($3->getBasicType() != EbtFloat &&
|
||||||
|
$3->getBasicType() != EbtInt &&
|
||||||
|
$3->getBasicType() != EbtUint &&
|
||||||
|
$3->getBasicType() != EbtBool &&
|
||||||
|
$3->getBasicType() != EbtString)
|
||||||
|
parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), "");
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_storage_class_qualifier
|
||||||
|
: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.storage = EvqSpirvStorageClass;
|
||||||
|
$$.qualifier.spirvStorageClass = $3.i;
|
||||||
|
}
|
||||||
|
| SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.storage = EvqSpirvStorageClass;
|
||||||
|
$$.qualifier.spirvStorageClass = $5.i;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_qualifier
|
||||||
|
: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorate($3.i);
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorate($5.i);
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_parameter_list
|
||||||
|
: spirv_decorate_parameter {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_decorate_parameter_list COMMA spirv_decorate_parameter {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_parameter
|
||||||
|
: 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_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(), "");
|
||||||
|
$$ = 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(), "");
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_string_parameter_list
|
||||||
|
: STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(
|
||||||
|
parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_decorate_string_parameter_list COMMA STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_specifier
|
||||||
|
: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.setSpirvType(*$3, $5);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.setSpirvType(*$5, $7);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.setSpirvType(*$3);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.setSpirvType(*$5);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_parameter_list
|
||||||
|
: spirv_type_parameter {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_type_parameter_list COMMA spirv_type_parameter {
|
||||||
|
$$ = parseContext.mergeSpirvTypeParameters($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_parameter
|
||||||
|
: constant_expression {
|
||||||
|
$$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
|
||||||
|
}
|
||||||
|
| type_specifier {
|
||||||
|
$$ = parseContext.makeSpirvTypeParameters($1);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier
|
||||||
|
: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$ = $3;
|
||||||
|
}
|
||||||
|
| SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$ = $5;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier_list
|
||||||
|
: spirv_instruction_qualifier_id {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id {
|
||||||
|
$$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier_id
|
||||||
|
: IDENTIFIER EQUAL STRING_LITERAL {
|
||||||
|
$$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string);
|
||||||
|
}
|
||||||
|
| IDENTIFIER EQUAL INTCONSTANT {
|
||||||
|
$$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i);
|
||||||
|
}
|
||||||
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
@ -116,6 +116,9 @@ using namespace glslang;
|
|||||||
glslang::TIntermNodePair nodePair;
|
glslang::TIntermNodePair nodePair;
|
||||||
glslang::TIntermTyped* intermTypedNode;
|
glslang::TIntermTyped* intermTypedNode;
|
||||||
glslang::TAttributes* attributes;
|
glslang::TAttributes* attributes;
|
||||||
|
glslang::TSpirvRequirement* spirvReq;
|
||||||
|
glslang::TSpirvInstruction* spirvInst;
|
||||||
|
glslang::TSpirvTypeParameters* spirvTypeParams;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
glslang::TPublicType type;
|
glslang::TPublicType type;
|
||||||
@ -271,6 +274,11 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
|
%token <lex> SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS
|
||||||
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
|
%token <lex> F16SUBPASSINPUT F16SUBPASSINPUTMS
|
||||||
|
|
||||||
|
// spirv intrinsics
|
||||||
|
%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> LEFT_OP RIGHT_OP
|
%token <lex> LEFT_OP RIGHT_OP
|
||||||
@ -362,6 +370,19 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%type <interm.attributes> attribute attribute_list single_attribute
|
%type <interm.attributes> attribute attribute_list single_attribute
|
||||||
%type <interm.intermNode> demote_statement
|
%type <interm.intermNode> demote_statement
|
||||||
%type <interm.intermTypedNode> initializer_list
|
%type <interm.intermTypedNode> initializer_list
|
||||||
|
%type <interm.spirvReq> spirv_requirements_list spirv_requirements_parameter
|
||||||
|
%type <interm.intermNode> spirv_extension_list spirv_capability_list
|
||||||
|
%type <interm.intermNode> spirv_execution_mode_qualifier
|
||||||
|
%type <interm.intermNode> spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list
|
||||||
|
%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_string_parameter_list
|
||||||
|
%type <interm.type> spirv_type_specifier
|
||||||
|
%type <interm.spirvTypeParams> spirv_type_parameter_list spirv_type_parameter
|
||||||
|
%type <interm.spirvInst> spirv_instruction_qualifier
|
||||||
|
%type <interm.spirvInst> spirv_instruction_qualifier_list spirv_instruction_qualifier_id
|
||||||
|
|
||||||
|
|
||||||
%start translation_unit
|
%start translation_unit
|
||||||
@ -875,6 +896,20 @@ declaration
|
|||||||
$$ = 0;
|
$$ = 0;
|
||||||
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||||
}
|
}
|
||||||
|
|
||||||
|
| spirv_instruction_qualifier function_prototype SEMICOLON {
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier");
|
||||||
|
$2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier
|
||||||
|
parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */);
|
||||||
|
$$ = 0;
|
||||||
|
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_qualifier SEMICOLON {
|
||||||
|
parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier");
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier");
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
| init_declarator_list SEMICOLON {
|
| init_declarator_list SEMICOLON {
|
||||||
if ($1.intermNode && $1.intermNode->getAsAggregate())
|
if ($1.intermNode && $1.intermNode->getAsAggregate())
|
||||||
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
|
$1.intermNode->getAsAggregate()->setOperator(EOpSequence);
|
||||||
@ -944,6 +979,25 @@ function_prototype
|
|||||||
$$.function = $1;
|
$$.function = $1;
|
||||||
$$.loc = $2.loc;
|
$$.loc = $2.loc;
|
||||||
}
|
}
|
||||||
|
| function_declarator RIGHT_PAREN attribute {
|
||||||
|
$$.function = $1;
|
||||||
|
$$.loc = $2.loc;
|
||||||
|
parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($2.loc, *$3, $$.function);
|
||||||
|
}
|
||||||
|
| attribute function_declarator RIGHT_PAREN {
|
||||||
|
$$.function = $2;
|
||||||
|
$$.loc = $3.loc;
|
||||||
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
||||||
|
}
|
||||||
|
| attribute function_declarator RIGHT_PAREN attribute {
|
||||||
|
$$.function = $2;
|
||||||
|
$$.loc = $3.loc;
|
||||||
|
parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute");
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$1, $$.function);
|
||||||
|
parseContext.handleFunctionAttributes($3.loc, *$4, $$.function);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
function_declarator
|
function_declarator
|
||||||
@ -1347,6 +1401,25 @@ single_type_qualifier
|
|||||||
| non_uniform_qualifier {
|
| non_uniform_qualifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
}
|
}
|
||||||
|
| spirv_storage_class_qualifier {
|
||||||
|
parseContext.globalCheck($1.loc, "spirv_storage_class");
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_decorate_qualifier {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| SPIRV_BY_REFERENCE {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvByReference();
|
||||||
|
}
|
||||||
|
| SPIRV_LITERAL {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvLiteral();
|
||||||
|
}
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3407,6 +3480,10 @@ type_specifier_nonarray
|
|||||||
$$.basicType = EbtUint;
|
$$.basicType = EbtUint;
|
||||||
$$.coopmat = true;
|
$$.coopmat = true;
|
||||||
}
|
}
|
||||||
|
| spirv_type_specifier {
|
||||||
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
|
||||||
| struct_specifier {
|
| struct_specifier {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
@ -3713,6 +3790,7 @@ selection_statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
| attribute selection_statement_nonattributed {
|
| attribute selection_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleSelectionAttributes(*$1, $2);
|
parseContext.handleSelectionAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -3760,6 +3838,7 @@ switch_statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
| attribute switch_statement_nonattributed {
|
| attribute switch_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleSwitchAttributes(*$1, $2);
|
parseContext.handleSwitchAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -3824,6 +3903,7 @@ iteration_statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
| attribute iteration_statement_nonattributed {
|
| attribute iteration_statement_nonattributed {
|
||||||
|
parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
||||||
parseContext.handleLoopAttributes(*$1, $2);
|
parseContext.handleLoopAttributes(*$1, $2);
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
}
|
}
|
||||||
@ -4027,7 +4107,6 @@ function_definition
|
|||||||
attribute
|
attribute
|
||||||
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
|
: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET {
|
||||||
$$ = $3;
|
$$ = $3;
|
||||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_list
|
attribute_list
|
||||||
@ -4047,4 +4126,273 @@ single_attribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
spirv_requirements_list
|
||||||
|
: spirv_requirements_parameter {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_requirements_list COMMA spirv_requirements_parameter {
|
||||||
|
$$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_requirements_parameter
|
||||||
|
: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET {
|
||||||
|
$$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr);
|
||||||
|
}
|
||||||
|
| IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET {
|
||||||
|
$$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate());
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_extension_list
|
||||||
|
: STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_extension_list COMMA STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_capability_list
|
||||||
|
: INTCONSTANT {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_capability_list COMMA INTCONSTANT {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_qualifier
|
||||||
|
: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($3.i);
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($5.i);
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
| SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate());
|
||||||
|
$$ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_parameter_list
|
||||||
|
: spirv_execution_mode_parameter {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_parameter
|
||||||
|
: 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);
|
||||||
|
}
|
||||||
|
| STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_execution_mode_id_parameter_list
|
||||||
|
: constant_expression {
|
||||||
|
if ($1->getBasicType() != EbtFloat &&
|
||||||
|
$1->getBasicType() != EbtInt &&
|
||||||
|
$1->getBasicType() != EbtUint &&
|
||||||
|
$1->getBasicType() != EbtBool &&
|
||||||
|
$1->getBasicType() != EbtString)
|
||||||
|
parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), "");
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_execution_mode_id_parameter_list COMMA constant_expression {
|
||||||
|
if ($3->getBasicType() != EbtFloat &&
|
||||||
|
$3->getBasicType() != EbtInt &&
|
||||||
|
$3->getBasicType() != EbtUint &&
|
||||||
|
$3->getBasicType() != EbtBool &&
|
||||||
|
$3->getBasicType() != EbtString)
|
||||||
|
parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), "");
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_storage_class_qualifier
|
||||||
|
: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.storage = EvqSpirvStorageClass;
|
||||||
|
$$.qualifier.spirvStorageClass = $3.i;
|
||||||
|
}
|
||||||
|
| SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.storage = EvqSpirvStorageClass;
|
||||||
|
$$.qualifier.spirvStorageClass = $5.i;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_qualifier
|
||||||
|
: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorate($3.i);
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorate($5.i);
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate());
|
||||||
|
}
|
||||||
|
| SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc);
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate());
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_parameter_list
|
||||||
|
: spirv_decorate_parameter {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate($1);
|
||||||
|
}
|
||||||
|
| spirv_decorate_parameter_list COMMA spirv_decorate_parameter {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_parameter
|
||||||
|
: 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_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(), "");
|
||||||
|
$$ = 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(), "");
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_decorate_string_parameter_list
|
||||||
|
: STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.makeAggregate(
|
||||||
|
parseContext.intermediate.addConstantUnion($1.string, $1.loc, true));
|
||||||
|
}
|
||||||
|
| spirv_decorate_string_parameter_list COMMA STRING_LITERAL {
|
||||||
|
$$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_specifier
|
||||||
|
: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.setSpirvType(*$3, $5);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.setSpirvType(*$5, $7);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.setSpirvType(*$3);
|
||||||
|
}
|
||||||
|
| SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$.setSpirvType(*$5);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_parameter_list
|
||||||
|
: spirv_type_parameter {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_type_parameter_list COMMA spirv_type_parameter {
|
||||||
|
$$ = parseContext.mergeSpirvTypeParameters($1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_type_parameter
|
||||||
|
: constant_expression {
|
||||||
|
$$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion());
|
||||||
|
}
|
||||||
|
| type_specifier {
|
||||||
|
$$ = parseContext.makeSpirvTypeParameters($1);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier
|
||||||
|
: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
$$ = $3;
|
||||||
|
}
|
||||||
|
| SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN {
|
||||||
|
parseContext.intermediate.insertSpirvRequirement($3);
|
||||||
|
$$ = $5;
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier_list
|
||||||
|
: spirv_instruction_qualifier_id {
|
||||||
|
$$ = $1;
|
||||||
|
}
|
||||||
|
| spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id {
|
||||||
|
$$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3);
|
||||||
|
}
|
||||||
|
|
||||||
|
spirv_instruction_qualifier_id
|
||||||
|
: IDENTIFIER EQUAL STRING_LITERAL {
|
||||||
|
$$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string);
|
||||||
|
}
|
||||||
|
| IDENTIFIER EQUAL INTCONSTANT {
|
||||||
|
$$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -368,134 +368,144 @@ extern int yydebug;
|
|||||||
USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */
|
USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */
|
||||||
F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */
|
F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */
|
||||||
F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */
|
F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */
|
||||||
LEFT_OP = 572, /* LEFT_OP */
|
SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */
|
||||||
RIGHT_OP = 573, /* RIGHT_OP */
|
SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */
|
||||||
INC_OP = 574, /* INC_OP */
|
SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */
|
||||||
DEC_OP = 575, /* DEC_OP */
|
SPIRV_DECORATE = 575, /* SPIRV_DECORATE */
|
||||||
LE_OP = 576, /* LE_OP */
|
SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */
|
||||||
GE_OP = 577, /* GE_OP */
|
SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */
|
||||||
EQ_OP = 578, /* EQ_OP */
|
SPIRV_TYPE = 578, /* SPIRV_TYPE */
|
||||||
NE_OP = 579, /* NE_OP */
|
SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */
|
||||||
AND_OP = 580, /* AND_OP */
|
SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */
|
||||||
OR_OP = 581, /* OR_OP */
|
SPIRV_LITERAL = 581, /* SPIRV_LITERAL */
|
||||||
XOR_OP = 582, /* XOR_OP */
|
LEFT_OP = 582, /* LEFT_OP */
|
||||||
MUL_ASSIGN = 583, /* MUL_ASSIGN */
|
RIGHT_OP = 583, /* RIGHT_OP */
|
||||||
DIV_ASSIGN = 584, /* DIV_ASSIGN */
|
INC_OP = 584, /* INC_OP */
|
||||||
ADD_ASSIGN = 585, /* ADD_ASSIGN */
|
DEC_OP = 585, /* DEC_OP */
|
||||||
MOD_ASSIGN = 586, /* MOD_ASSIGN */
|
LE_OP = 586, /* LE_OP */
|
||||||
LEFT_ASSIGN = 587, /* LEFT_ASSIGN */
|
GE_OP = 587, /* GE_OP */
|
||||||
RIGHT_ASSIGN = 588, /* RIGHT_ASSIGN */
|
EQ_OP = 588, /* EQ_OP */
|
||||||
AND_ASSIGN = 589, /* AND_ASSIGN */
|
NE_OP = 589, /* NE_OP */
|
||||||
XOR_ASSIGN = 590, /* XOR_ASSIGN */
|
AND_OP = 590, /* AND_OP */
|
||||||
OR_ASSIGN = 591, /* OR_ASSIGN */
|
OR_OP = 591, /* OR_OP */
|
||||||
SUB_ASSIGN = 592, /* SUB_ASSIGN */
|
XOR_OP = 592, /* XOR_OP */
|
||||||
STRING_LITERAL = 593, /* STRING_LITERAL */
|
MUL_ASSIGN = 593, /* MUL_ASSIGN */
|
||||||
LEFT_PAREN = 594, /* LEFT_PAREN */
|
DIV_ASSIGN = 594, /* DIV_ASSIGN */
|
||||||
RIGHT_PAREN = 595, /* RIGHT_PAREN */
|
ADD_ASSIGN = 595, /* ADD_ASSIGN */
|
||||||
LEFT_BRACKET = 596, /* LEFT_BRACKET */
|
MOD_ASSIGN = 596, /* MOD_ASSIGN */
|
||||||
RIGHT_BRACKET = 597, /* RIGHT_BRACKET */
|
LEFT_ASSIGN = 597, /* LEFT_ASSIGN */
|
||||||
LEFT_BRACE = 598, /* LEFT_BRACE */
|
RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */
|
||||||
RIGHT_BRACE = 599, /* RIGHT_BRACE */
|
AND_ASSIGN = 599, /* AND_ASSIGN */
|
||||||
DOT = 600, /* DOT */
|
XOR_ASSIGN = 600, /* XOR_ASSIGN */
|
||||||
COMMA = 601, /* COMMA */
|
OR_ASSIGN = 601, /* OR_ASSIGN */
|
||||||
COLON = 602, /* COLON */
|
SUB_ASSIGN = 602, /* SUB_ASSIGN */
|
||||||
EQUAL = 603, /* EQUAL */
|
STRING_LITERAL = 603, /* STRING_LITERAL */
|
||||||
SEMICOLON = 604, /* SEMICOLON */
|
LEFT_PAREN = 604, /* LEFT_PAREN */
|
||||||
BANG = 605, /* BANG */
|
RIGHT_PAREN = 605, /* RIGHT_PAREN */
|
||||||
DASH = 606, /* DASH */
|
LEFT_BRACKET = 606, /* LEFT_BRACKET */
|
||||||
TILDE = 607, /* TILDE */
|
RIGHT_BRACKET = 607, /* RIGHT_BRACKET */
|
||||||
PLUS = 608, /* PLUS */
|
LEFT_BRACE = 608, /* LEFT_BRACE */
|
||||||
STAR = 609, /* STAR */
|
RIGHT_BRACE = 609, /* RIGHT_BRACE */
|
||||||
SLASH = 610, /* SLASH */
|
DOT = 610, /* DOT */
|
||||||
PERCENT = 611, /* PERCENT */
|
COMMA = 611, /* COMMA */
|
||||||
LEFT_ANGLE = 612, /* LEFT_ANGLE */
|
COLON = 612, /* COLON */
|
||||||
RIGHT_ANGLE = 613, /* RIGHT_ANGLE */
|
EQUAL = 613, /* EQUAL */
|
||||||
VERTICAL_BAR = 614, /* VERTICAL_BAR */
|
SEMICOLON = 614, /* SEMICOLON */
|
||||||
CARET = 615, /* CARET */
|
BANG = 615, /* BANG */
|
||||||
AMPERSAND = 616, /* AMPERSAND */
|
DASH = 616, /* DASH */
|
||||||
QUESTION = 617, /* QUESTION */
|
TILDE = 617, /* TILDE */
|
||||||
INVARIANT = 618, /* INVARIANT */
|
PLUS = 618, /* PLUS */
|
||||||
HIGH_PRECISION = 619, /* HIGH_PRECISION */
|
STAR = 619, /* STAR */
|
||||||
MEDIUM_PRECISION = 620, /* MEDIUM_PRECISION */
|
SLASH = 620, /* SLASH */
|
||||||
LOW_PRECISION = 621, /* LOW_PRECISION */
|
PERCENT = 621, /* PERCENT */
|
||||||
PRECISION = 622, /* PRECISION */
|
LEFT_ANGLE = 622, /* LEFT_ANGLE */
|
||||||
PACKED = 623, /* PACKED */
|
RIGHT_ANGLE = 623, /* RIGHT_ANGLE */
|
||||||
RESOURCE = 624, /* RESOURCE */
|
VERTICAL_BAR = 624, /* VERTICAL_BAR */
|
||||||
SUPERP = 625, /* SUPERP */
|
CARET = 625, /* CARET */
|
||||||
FLOATCONSTANT = 626, /* FLOATCONSTANT */
|
AMPERSAND = 626, /* AMPERSAND */
|
||||||
INTCONSTANT = 627, /* INTCONSTANT */
|
QUESTION = 627, /* QUESTION */
|
||||||
UINTCONSTANT = 628, /* UINTCONSTANT */
|
INVARIANT = 628, /* INVARIANT */
|
||||||
BOOLCONSTANT = 629, /* BOOLCONSTANT */
|
HIGH_PRECISION = 629, /* HIGH_PRECISION */
|
||||||
IDENTIFIER = 630, /* IDENTIFIER */
|
MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */
|
||||||
TYPE_NAME = 631, /* TYPE_NAME */
|
LOW_PRECISION = 631, /* LOW_PRECISION */
|
||||||
CENTROID = 632, /* CENTROID */
|
PRECISION = 632, /* PRECISION */
|
||||||
IN = 633, /* IN */
|
PACKED = 633, /* PACKED */
|
||||||
OUT = 634, /* OUT */
|
RESOURCE = 634, /* RESOURCE */
|
||||||
INOUT = 635, /* INOUT */
|
SUPERP = 635, /* SUPERP */
|
||||||
STRUCT = 636, /* STRUCT */
|
FLOATCONSTANT = 636, /* FLOATCONSTANT */
|
||||||
VOID = 637, /* VOID */
|
INTCONSTANT = 637, /* INTCONSTANT */
|
||||||
WHILE = 638, /* WHILE */
|
UINTCONSTANT = 638, /* UINTCONSTANT */
|
||||||
BREAK = 639, /* BREAK */
|
BOOLCONSTANT = 639, /* BOOLCONSTANT */
|
||||||
CONTINUE = 640, /* CONTINUE */
|
IDENTIFIER = 640, /* IDENTIFIER */
|
||||||
DO = 641, /* DO */
|
TYPE_NAME = 641, /* TYPE_NAME */
|
||||||
ELSE = 642, /* ELSE */
|
CENTROID = 642, /* CENTROID */
|
||||||
FOR = 643, /* FOR */
|
IN = 643, /* IN */
|
||||||
IF = 644, /* IF */
|
OUT = 644, /* OUT */
|
||||||
DISCARD = 645, /* DISCARD */
|
INOUT = 645, /* INOUT */
|
||||||
RETURN = 646, /* RETURN */
|
STRUCT = 646, /* STRUCT */
|
||||||
SWITCH = 647, /* SWITCH */
|
VOID = 647, /* VOID */
|
||||||
CASE = 648, /* CASE */
|
WHILE = 648, /* WHILE */
|
||||||
DEFAULT = 649, /* DEFAULT */
|
BREAK = 649, /* BREAK */
|
||||||
TERMINATE_INVOCATION = 650, /* TERMINATE_INVOCATION */
|
CONTINUE = 650, /* CONTINUE */
|
||||||
TERMINATE_RAY = 651, /* TERMINATE_RAY */
|
DO = 651, /* DO */
|
||||||
IGNORE_INTERSECTION = 652, /* IGNORE_INTERSECTION */
|
ELSE = 652, /* ELSE */
|
||||||
UNIFORM = 653, /* UNIFORM */
|
FOR = 653, /* FOR */
|
||||||
SHARED = 654, /* SHARED */
|
IF = 654, /* IF */
|
||||||
BUFFER = 655, /* BUFFER */
|
DISCARD = 655, /* DISCARD */
|
||||||
FLAT = 656, /* FLAT */
|
RETURN = 656, /* RETURN */
|
||||||
SMOOTH = 657, /* SMOOTH */
|
SWITCH = 657, /* SWITCH */
|
||||||
LAYOUT = 658, /* LAYOUT */
|
CASE = 658, /* CASE */
|
||||||
DOUBLECONSTANT = 659, /* DOUBLECONSTANT */
|
DEFAULT = 659, /* DEFAULT */
|
||||||
INT16CONSTANT = 660, /* INT16CONSTANT */
|
TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */
|
||||||
UINT16CONSTANT = 661, /* UINT16CONSTANT */
|
TERMINATE_RAY = 661, /* TERMINATE_RAY */
|
||||||
FLOAT16CONSTANT = 662, /* FLOAT16CONSTANT */
|
IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */
|
||||||
INT32CONSTANT = 663, /* INT32CONSTANT */
|
UNIFORM = 663, /* UNIFORM */
|
||||||
UINT32CONSTANT = 664, /* UINT32CONSTANT */
|
SHARED = 664, /* SHARED */
|
||||||
INT64CONSTANT = 665, /* INT64CONSTANT */
|
BUFFER = 665, /* BUFFER */
|
||||||
UINT64CONSTANT = 666, /* UINT64CONSTANT */
|
FLAT = 666, /* FLAT */
|
||||||
SUBROUTINE = 667, /* SUBROUTINE */
|
SMOOTH = 667, /* SMOOTH */
|
||||||
DEMOTE = 668, /* DEMOTE */
|
LAYOUT = 668, /* LAYOUT */
|
||||||
PAYLOADNV = 669, /* PAYLOADNV */
|
DOUBLECONSTANT = 669, /* DOUBLECONSTANT */
|
||||||
PAYLOADINNV = 670, /* PAYLOADINNV */
|
INT16CONSTANT = 670, /* INT16CONSTANT */
|
||||||
HITATTRNV = 671, /* HITATTRNV */
|
UINT16CONSTANT = 671, /* UINT16CONSTANT */
|
||||||
CALLDATANV = 672, /* CALLDATANV */
|
FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */
|
||||||
CALLDATAINNV = 673, /* CALLDATAINNV */
|
INT32CONSTANT = 673, /* INT32CONSTANT */
|
||||||
PAYLOADEXT = 674, /* PAYLOADEXT */
|
UINT32CONSTANT = 674, /* UINT32CONSTANT */
|
||||||
PAYLOADINEXT = 675, /* PAYLOADINEXT */
|
INT64CONSTANT = 675, /* INT64CONSTANT */
|
||||||
HITATTREXT = 676, /* HITATTREXT */
|
UINT64CONSTANT = 676, /* UINT64CONSTANT */
|
||||||
CALLDATAEXT = 677, /* CALLDATAEXT */
|
SUBROUTINE = 677, /* SUBROUTINE */
|
||||||
CALLDATAINEXT = 678, /* CALLDATAINEXT */
|
DEMOTE = 678, /* DEMOTE */
|
||||||
PATCH = 679, /* PATCH */
|
PAYLOADNV = 679, /* PAYLOADNV */
|
||||||
SAMPLE = 680, /* SAMPLE */
|
PAYLOADINNV = 680, /* PAYLOADINNV */
|
||||||
NONUNIFORM = 681, /* NONUNIFORM */
|
HITATTRNV = 681, /* HITATTRNV */
|
||||||
COHERENT = 682, /* COHERENT */
|
CALLDATANV = 682, /* CALLDATANV */
|
||||||
VOLATILE = 683, /* VOLATILE */
|
CALLDATAINNV = 683, /* CALLDATAINNV */
|
||||||
RESTRICT = 684, /* RESTRICT */
|
PAYLOADEXT = 684, /* PAYLOADEXT */
|
||||||
READONLY = 685, /* READONLY */
|
PAYLOADINEXT = 685, /* PAYLOADINEXT */
|
||||||
WRITEONLY = 686, /* WRITEONLY */
|
HITATTREXT = 686, /* HITATTREXT */
|
||||||
DEVICECOHERENT = 687, /* DEVICECOHERENT */
|
CALLDATAEXT = 687, /* CALLDATAEXT */
|
||||||
QUEUEFAMILYCOHERENT = 688, /* QUEUEFAMILYCOHERENT */
|
CALLDATAINEXT = 688, /* CALLDATAINEXT */
|
||||||
WORKGROUPCOHERENT = 689, /* WORKGROUPCOHERENT */
|
PATCH = 689, /* PATCH */
|
||||||
SUBGROUPCOHERENT = 690, /* SUBGROUPCOHERENT */
|
SAMPLE = 690, /* SAMPLE */
|
||||||
NONPRIVATE = 691, /* NONPRIVATE */
|
NONUNIFORM = 691, /* NONUNIFORM */
|
||||||
SHADERCALLCOHERENT = 692, /* SHADERCALLCOHERENT */
|
COHERENT = 692, /* COHERENT */
|
||||||
NOPERSPECTIVE = 693, /* NOPERSPECTIVE */
|
VOLATILE = 693, /* VOLATILE */
|
||||||
EXPLICITINTERPAMD = 694, /* EXPLICITINTERPAMD */
|
RESTRICT = 694, /* RESTRICT */
|
||||||
PERVERTEXNV = 695, /* PERVERTEXNV */
|
READONLY = 695, /* READONLY */
|
||||||
PERPRIMITIVENV = 696, /* PERPRIMITIVENV */
|
WRITEONLY = 696, /* WRITEONLY */
|
||||||
PERVIEWNV = 697, /* PERVIEWNV */
|
DEVICECOHERENT = 697, /* DEVICECOHERENT */
|
||||||
PERTASKNV = 698, /* PERTASKNV */
|
QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */
|
||||||
PRECISE = 699 /* PRECISE */
|
WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */
|
||||||
|
SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */
|
||||||
|
NONPRIVATE = 701, /* NONPRIVATE */
|
||||||
|
SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */
|
||||||
|
NOPERSPECTIVE = 703, /* NOPERSPECTIVE */
|
||||||
|
EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */
|
||||||
|
PERVERTEXNV = 705, /* PERVERTEXNV */
|
||||||
|
PERPRIMITIVENV = 706, /* PERPRIMITIVENV */
|
||||||
|
PERVIEWNV = 707, /* PERVIEWNV */
|
||||||
|
PERTASKNV = 708, /* PERTASKNV */
|
||||||
|
PRECISE = 709 /* PRECISE */
|
||||||
};
|
};
|
||||||
typedef enum yytokentype yytoken_kind_t;
|
typedef enum yytokentype yytoken_kind_t;
|
||||||
#endif
|
#endif
|
||||||
@ -527,6 +537,9 @@ union YYSTYPE
|
|||||||
glslang::TIntermNodePair nodePair;
|
glslang::TIntermNodePair nodePair;
|
||||||
glslang::TIntermTyped* intermTypedNode;
|
glslang::TIntermTyped* intermTypedNode;
|
||||||
glslang::TAttributes* attributes;
|
glslang::TAttributes* attributes;
|
||||||
|
glslang::TSpirvRequirement* spirvReq;
|
||||||
|
glslang::TSpirvInstruction* spirvInst;
|
||||||
|
glslang::TSpirvTypeParameters* spirvTypeParams;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
glslang::TPublicType type;
|
glslang::TPublicType type;
|
||||||
@ -540,7 +553,7 @@ union YYSTYPE
|
|||||||
glslang::TArraySizes* typeParameters;
|
glslang::TArraySizes* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
|
|
||||||
#line 544 "MachineIndependent/glslang_tab.cpp.h"
|
#line 557 "MachineIndependent/glslang_tab.cpp.h"
|
||||||
|
|
||||||
};
|
};
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
|
@ -696,6 +696,10 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
|
|||||||
|
|
||||||
case EOpConstructReference: out.debug << "Construct reference type"; break;
|
case EOpConstructReference: out.debug << "Construct reference type"; break;
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default: out.debug.message(EPrefixError, "Bad unary op");
|
default: out.debug.message(EPrefixError, "Bad unary op");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1126,6 +1130,10 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||||||
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
||||||
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
||||||
|
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1487,6 +1495,9 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||||||
if (xfbMode)
|
if (xfbMode)
|
||||||
infoSink.debug << "in xfb mode\n";
|
infoSink.debug << "in xfb mode\n";
|
||||||
|
|
||||||
|
if (getSubgroupUniformControlFlow())
|
||||||
|
infoSink.debug << "subgroup_uniform_control_flow\n";
|
||||||
|
|
||||||
switch (language) {
|
switch (language) {
|
||||||
case EShLangVertex:
|
case EShLangVertex:
|
||||||
break;
|
break;
|
||||||
|
@ -328,7 +328,10 @@ public:
|
|||||||
textureSamplerTransformMode(EShTexSampTransKeep),
|
textureSamplerTransformMode(EShTexSampTransKeep),
|
||||||
needToLegalize(false),
|
needToLegalize(false),
|
||||||
binaryDoubleOutput(false),
|
binaryDoubleOutput(false),
|
||||||
|
subgroupUniformControlFlow(false),
|
||||||
usePhysicalStorageBuffer(false),
|
usePhysicalStorageBuffer(false),
|
||||||
|
spirvRequirement(nullptr),
|
||||||
|
spirvExecutionMode(nullptr),
|
||||||
uniformLocationBase(0)
|
uniformLocationBase(0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -864,6 +867,18 @@ public:
|
|||||||
|
|
||||||
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
|
void setBinaryDoubleOutput() { binaryDoubleOutput = true; }
|
||||||
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
|
bool getBinaryDoubleOutput() { return binaryDoubleOutput; }
|
||||||
|
|
||||||
|
void setSubgroupUniformControlFlow() { subgroupUniformControlFlow = true; }
|
||||||
|
bool getSubgroupUniformControlFlow() const { return subgroupUniformControlFlow; }
|
||||||
|
|
||||||
|
// GL_EXT_spirv_intrinsics
|
||||||
|
void insertSpirvRequirement(const TSpirvRequirement* spirvReq);
|
||||||
|
bool hasSpirvRequirement() const { return spirvRequirement != nullptr; }
|
||||||
|
const TSpirvRequirement& getSpirvRequirement() const { return *spirvRequirement; }
|
||||||
|
void insertSpirvExecutionMode(int executionMode, const TIntermAggregate* args = nullptr);
|
||||||
|
void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args);
|
||||||
|
bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; }
|
||||||
|
const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; }
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
|
|
||||||
void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
|
void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing)
|
||||||
@ -1115,8 +1130,12 @@ protected:
|
|||||||
|
|
||||||
bool needToLegalize;
|
bool needToLegalize;
|
||||||
bool binaryDoubleOutput;
|
bool binaryDoubleOutput;
|
||||||
|
bool subgroupUniformControlFlow;
|
||||||
bool usePhysicalStorageBuffer;
|
bool usePhysicalStorageBuffer;
|
||||||
|
|
||||||
|
TSpirvRequirement* spirvRequirement;
|
||||||
|
TSpirvExecutionMode* spirvExecutionMode;
|
||||||
|
|
||||||
std::unordered_map<std::string, int> uniformLocationOverrides;
|
std::unordered_map<std::string, int> uniformLocationOverrides;
|
||||||
int uniformLocationBase;
|
int uniformLocationBase;
|
||||||
TNumericFeatures numericFeatures;
|
TNumericFeatures numericFeatures;
|
||||||
|
@ -166,36 +166,35 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// matrix from vector or scalar
|
// matrix from vector or scalar
|
||||||
int count = 0;
|
|
||||||
const int startIndex = index;
|
|
||||||
int nodeComps = node->getType().computeNumComponents();
|
int nodeComps = node->getType().computeNumComponents();
|
||||||
for (int i = startIndex; i < endIndex; i++) {
|
if (nodeComps == 1) {
|
||||||
|
for (int c = 0; c < matrixCols; ++c) {
|
||||||
|
for (int r = 0; r < matrixRows; ++r) {
|
||||||
|
if (r == c)
|
||||||
|
leftUnionArray[index] = rightUnionArray[0];
|
||||||
|
else
|
||||||
|
leftUnionArray[index].setDConst(0.0);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int count = 0;
|
||||||
|
for (int i = index; i < endIndex; i++) {
|
||||||
if (i >= instanceSize)
|
if (i >= instanceSize)
|
||||||
return;
|
return;
|
||||||
if (nodeComps == 1) {
|
|
||||||
// If there is a single scalar parameter to a matrix
|
|
||||||
// constructor, it is used to initialize all the
|
|
||||||
// components on the matrix's diagonal, with the
|
|
||||||
// remaining components initialized to 0.0.
|
|
||||||
if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
|
|
||||||
leftUnionArray[i] = rightUnionArray[count];
|
|
||||||
else
|
|
||||||
leftUnionArray[i].setDConst(0.0);
|
|
||||||
} else {
|
|
||||||
// construct the matrix in column-major order, from
|
// construct the matrix in column-major order, from
|
||||||
// the components provided, in order
|
// the components provided, in order
|
||||||
leftUnionArray[i] = rightUnionArray[count];
|
leftUnionArray[i] = rightUnionArray[count];
|
||||||
}
|
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
if (nodeComps > 1)
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
|
bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam)
|
||||||
{
|
{
|
||||||
|
@ -1191,8 +1191,10 @@ int TPpContext::tokenize(TPpToken& ppToken)
|
|||||||
// HLSL allows string literals.
|
// HLSL allows string literals.
|
||||||
// GLSL allows string literals with GL_EXT_debug_printf.
|
// GLSL allows string literals with GL_EXT_debug_printf.
|
||||||
if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) {
|
if (ifdepth == 0 && parseContext.intermediate.getSource() != EShSourceHlsl) {
|
||||||
parseContext.requireExtensions(ppToken.loc, 1, &E_GL_EXT_debug_printf, "string literal");
|
const char* const string_literal_EXTs[] = { E_GL_EXT_debug_printf, E_GL_EXT_spirv_intrinsics };
|
||||||
if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf))
|
parseContext.requireExtensions(ppToken.loc, 2, string_literal_EXTs, "string literal");
|
||||||
|
if (!parseContext.extensionTurnedOn(E_GL_EXT_debug_printf) &&
|
||||||
|
!parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -351,10 +351,18 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"spv.functionSemantics.frag",
|
"spv.functionSemantics.frag",
|
||||||
"spv.functionParameterTypes.frag",
|
"spv.functionParameterTypes.frag",
|
||||||
"spv.GeometryShaderPassthrough.geom",
|
"spv.GeometryShaderPassthrough.geom",
|
||||||
|
"spv.funcall.array.frag",
|
||||||
"spv.interpOps.frag",
|
"spv.interpOps.frag",
|
||||||
"spv.int64.frag",
|
"spv.int64.frag",
|
||||||
"spv.intcoopmat.comp",
|
"spv.intcoopmat.comp",
|
||||||
"spv.intOps.vert",
|
"spv.intOps.vert",
|
||||||
|
"spv.intrinsicsSpirvByReference.vert",
|
||||||
|
"spv.intrinsicsSpirvDecorate.frag",
|
||||||
|
"spv.intrinsicsSpirvExecutionMode.frag",
|
||||||
|
"spv.intrinsicsSpirvInstruction.vert",
|
||||||
|
"spv.intrinsicsSpirvLiteral.vert",
|
||||||
|
"spv.intrinsicsSpirvStorageClass.rchit",
|
||||||
|
"spv.intrinsicsSpirvType.rgen",
|
||||||
"spv.layer.tese",
|
"spv.layer.tese",
|
||||||
"spv.layoutNested.vert",
|
"spv.layoutNested.vert",
|
||||||
"spv.length.frag",
|
"spv.length.frag",
|
||||||
@ -442,6 +450,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"spv.specConstant.int8.comp",
|
"spv.specConstant.int8.comp",
|
||||||
"spv.storageBuffer.vert",
|
"spv.storageBuffer.vert",
|
||||||
"spv.terminate.frag",
|
"spv.terminate.frag",
|
||||||
|
"spv.subgroupUniformControlFlow.vert",
|
||||||
"spv.precise.tese",
|
"spv.precise.tese",
|
||||||
"spv.precise.tesc",
|
"spv.precise.tesc",
|
||||||
"spv.viewportindex.tese",
|
"spv.viewportindex.tese",
|
||||||
@ -555,6 +564,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"spv.1.4.OpCopyLogical.comp",
|
"spv.1.4.OpCopyLogical.comp",
|
||||||
"spv.1.4.OpCopyLogicalBool.comp",
|
"spv.1.4.OpCopyLogicalBool.comp",
|
||||||
"spv.1.4.OpCopyLogical.funcall.frag",
|
"spv.1.4.OpCopyLogical.funcall.frag",
|
||||||
|
"spv.1.4.funcall.array.frag",
|
||||||
"spv.1.4.image.frag",
|
"spv.1.4.image.frag",
|
||||||
"spv.1.4.sparseTexture.frag",
|
"spv.1.4.sparseTexture.frag",
|
||||||
"spv.1.4.texture.frag",
|
"spv.1.4.texture.frag",
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
"site" : "github",
|
"site" : "github",
|
||||||
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
"subrepo" : "KhronosGroup/SPIRV-Tools",
|
||||||
"subdir" : "External/spirv-tools",
|
"subdir" : "External/spirv-tools",
|
||||||
"commit" : "dc72924cb31cd9f3dbc3eb47e9d926cf641e3a07"
|
"commit" : "5dd2f76918bb2d0d67628e338f60f724f3e02e13"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "spirv-tools/external/spirv-headers",
|
"name" : "spirv-tools/external/spirv-headers",
|
||||||
"site" : "github",
|
"site" : "github",
|
||||||
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
"subrepo" : "KhronosGroup/SPIRV-Headers",
|
||||||
"subdir" : "External/spirv-tools/external/spirv-headers",
|
"subdir" : "External/spirv-tools/external/spirv-headers",
|
||||||
"commit" : "dafead1765f6c1a5f9f8a76387dcb2abe4e54acd"
|
"commit" : "07f259e68af3a540038fa32df522554e74f53ed5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user