Add GLSL_EXT_shader_tile_image
This commit is contained in:
parent
a3310b7cff
commit
0bbec2e8f6
@ -39,6 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato
|
|||||||
static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add";
|
static const char* const E_SPV_EXT_shader_atomic_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_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";
|
||||||
|
static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image";
|
||||||
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextEXT_H
|
#endif // #ifndef GLSLextEXT_H
|
||||||
|
@ -351,6 +351,7 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler)
|
|||||||
case glslang::EsdRect: return spv::DimRect;
|
case glslang::EsdRect: return spv::DimRect;
|
||||||
case glslang::EsdBuffer: return spv::DimBuffer;
|
case glslang::EsdBuffer: return spv::DimBuffer;
|
||||||
case glslang::EsdSubpass: return spv::DimSubpassData;
|
case glslang::EsdSubpass: return spv::DimSubpassData;
|
||||||
|
case glslang::EsdAttachmentEXT: return spv::DimTileImageDataEXT;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
return spv::Dim2D;
|
return spv::Dim2D;
|
||||||
@ -1311,6 +1312,11 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
|||||||
return spv::StorageClassInput;
|
return spv::StorageClassInput;
|
||||||
if (type.getQualifier().isPipeOutput())
|
if (type.getQualifier().isPipeOutput())
|
||||||
return spv::StorageClassOutput;
|
return spv::StorageClassOutput;
|
||||||
|
if (type.getQualifier().storage == glslang::EvqTileImageEXT || type.isAttachmentEXT()) {
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT);
|
||||||
|
return spv::StorageClassTileImageEXT;
|
||||||
|
}
|
||||||
|
|
||||||
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl ||
|
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl ||
|
||||||
type.getQualifier().storage == glslang::EvqUniform) {
|
type.getQualifier().storage == glslang::EvqUniform) {
|
||||||
@ -1682,6 +1688,24 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
|
|||||||
builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
|
builder.addExtension(spv::E_SPV_KHR_post_depth_coverage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (glslangIntermediate->getNonCoherentColorAttachmentReadEXT()) {
|
||||||
|
builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT);
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentColorAttachmentReadEXT);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (glslangIntermediate->getNonCoherentDepthAttachmentReadEXT()) {
|
||||||
|
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentDepthAttachmentReadEXT);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (glslangIntermediate->getNonCoherentStencilAttachmentReadEXT()) {
|
||||||
|
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||||
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentStencilAttachmentReadEXT);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
}
|
||||||
|
|
||||||
if (glslangIntermediate->isDepthReplacing())
|
if (glslangIntermediate->isDepthReplacing())
|
||||||
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
|
builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing);
|
||||||
|
|
||||||
@ -5752,6 +5776,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cracked.attachmentEXT) {
|
||||||
|
if (opIt != arguments.end()) {
|
||||||
|
spv::IdImmediate sample = { true, *opIt };
|
||||||
|
operands.push_back(sample);
|
||||||
|
}
|
||||||
|
spv::Id result = builder.createOp(spv::OpColorAttachmentReadEXT, resultType(), operands);
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
builder.setPrecision(result, precision);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
spv::IdImmediate coord = { true, *(opIt++) };
|
spv::IdImmediate coord = { true, *(opIt++) };
|
||||||
operands.push_back(coord);
|
operands.push_back(coord);
|
||||||
if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) {
|
if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) {
|
||||||
@ -7172,6 +7207,19 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
|
|||||||
unaryOp = spv::OpCopyObject;
|
unaryOp = spv::OpCopyObject;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case glslang::EOpDepthAttachmentReadEXT:
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||||
|
unaryOp = spv::OpDepthAttachmentReadEXT;
|
||||||
|
decorations.precision = spv::NoPrecision;
|
||||||
|
break;
|
||||||
|
case glslang::EOpStencilAttachmentReadEXT:
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||||
|
unaryOp = spv::OpStencilAttachmentReadEXT;
|
||||||
|
decorations.precision = spv::DecorationRelaxedPrecision;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -9262,6 +9310,30 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
|
|||||||
return builder.createOp(spv::OpReadClockKHR, typeId, args);
|
return builder.createOp(spv::OpReadClockKHR, typeId, args);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
case glslang::EOpStencilAttachmentReadEXT:
|
||||||
|
case glslang::EOpDepthAttachmentReadEXT:
|
||||||
|
{
|
||||||
|
builder.addExtension(spv::E_SPV_EXT_shader_tile_image);
|
||||||
|
|
||||||
|
spv::Decoration precision;
|
||||||
|
spv::Op spv_op;
|
||||||
|
if (op == glslang::EOpStencilAttachmentReadEXT)
|
||||||
|
{
|
||||||
|
precision = spv::DecorationRelaxedPrecision;
|
||||||
|
spv_op = spv::OpStencilAttachmentReadEXT;
|
||||||
|
builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
precision = spv::NoPrecision;
|
||||||
|
spv_op = spv::OpDepthAttachmentReadEXT;
|
||||||
|
builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<spv::Id> args; // Dummy args
|
||||||
|
spv::Id result = builder.createOp(spv_op, typeId, args);
|
||||||
|
return builder.setPrecision(result, precision);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -215,6 +215,10 @@ const char* ExecutionModeString(int mode)
|
|||||||
case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL";
|
case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL";
|
||||||
case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL";
|
case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL";
|
||||||
|
|
||||||
|
case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT";
|
||||||
|
case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT";
|
||||||
|
case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT";
|
||||||
|
|
||||||
case ExecutionModeCeiling:
|
case ExecutionModeCeiling:
|
||||||
default: return "Bad";
|
default: return "Bad";
|
||||||
}
|
}
|
||||||
@ -247,6 +251,7 @@ const char* StorageClassString(int StorageClass)
|
|||||||
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT";
|
||||||
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
|
case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT";
|
||||||
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
|
case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV";
|
||||||
|
case StorageClassTileImageEXT: return "TileImageEXT";
|
||||||
default: return "Bad";
|
default: return "Bad";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -464,6 +469,7 @@ const char* DimensionString(int dim)
|
|||||||
case 4: return "Rect";
|
case 4: return "Rect";
|
||||||
case 5: return "Buffer";
|
case 5: return "Buffer";
|
||||||
case 6: return "SubpassData";
|
case 6: return "SubpassData";
|
||||||
|
case DimTileImageDataEXT: return "TileImageDataEXT";
|
||||||
|
|
||||||
default: return "Bad";
|
default: return "Bad";
|
||||||
}
|
}
|
||||||
@ -992,6 +998,10 @@ const char* CapabilityString(int info)
|
|||||||
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
|
case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT";
|
||||||
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
|
case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT";
|
||||||
|
|
||||||
|
case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT";
|
||||||
|
case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT";
|
||||||
|
case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT";
|
||||||
|
|
||||||
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR";
|
||||||
|
|
||||||
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT";
|
||||||
@ -1502,6 +1512,10 @@ const char* OpcodeString(int op)
|
|||||||
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
|
case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV";
|
||||||
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
|
case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV";
|
||||||
|
|
||||||
|
case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT";
|
||||||
|
case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT";
|
||||||
|
case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "Bad";
|
return "Bad";
|
||||||
}
|
}
|
||||||
@ -3268,6 +3282,11 @@ void Parameterize()
|
|||||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
|
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'");
|
||||||
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
|
InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'");
|
||||||
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
|
InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false);
|
||||||
|
|
||||||
|
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'");
|
||||||
|
InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||||
|
InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||||
|
InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // end spv namespace
|
}; // end spv namespace
|
||||||
|
@ -156,6 +156,9 @@ enum ExecutionMode {
|
|||||||
ExecutionModeSubgroupsPerWorkgroupId = 37,
|
ExecutionModeSubgroupsPerWorkgroupId = 37,
|
||||||
ExecutionModeLocalSizeId = 38,
|
ExecutionModeLocalSizeId = 38,
|
||||||
ExecutionModeLocalSizeHintId = 39,
|
ExecutionModeLocalSizeHintId = 39,
|
||||||
|
ExecutionModeNonCoherentColorAttachmentReadEXT = 4169,
|
||||||
|
ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170,
|
||||||
|
ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171,
|
||||||
ExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
ExecutionModeSubgroupUniformControlFlowKHR = 4421,
|
||||||
ExecutionModePostDepthCoverage = 4446,
|
ExecutionModePostDepthCoverage = 4446,
|
||||||
ExecutionModeDenormPreserve = 4459,
|
ExecutionModeDenormPreserve = 4459,
|
||||||
@ -214,6 +217,7 @@ enum StorageClass {
|
|||||||
StorageClassAtomicCounter = 10,
|
StorageClassAtomicCounter = 10,
|
||||||
StorageClassImage = 11,
|
StorageClassImage = 11,
|
||||||
StorageClassStorageBuffer = 12,
|
StorageClassStorageBuffer = 12,
|
||||||
|
StorageClassTileImageEXT = 4172,
|
||||||
StorageClassCallableDataKHR = 5328,
|
StorageClassCallableDataKHR = 5328,
|
||||||
StorageClassCallableDataNV = 5328,
|
StorageClassCallableDataNV = 5328,
|
||||||
StorageClassIncomingCallableDataKHR = 5329,
|
StorageClassIncomingCallableDataKHR = 5329,
|
||||||
@ -244,6 +248,7 @@ enum Dim {
|
|||||||
DimRect = 4,
|
DimRect = 4,
|
||||||
DimBuffer = 5,
|
DimBuffer = 5,
|
||||||
DimSubpassData = 6,
|
DimSubpassData = 6,
|
||||||
|
DimTileImageDataEXT = 4173,
|
||||||
DimMax = 0x7fffffff,
|
DimMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -984,6 +989,9 @@ enum Capability {
|
|||||||
CapabilityShaderViewportIndex = 70,
|
CapabilityShaderViewportIndex = 70,
|
||||||
CapabilityUniformDecoration = 71,
|
CapabilityUniformDecoration = 71,
|
||||||
CapabilityCoreBuiltinsARM = 4165,
|
CapabilityCoreBuiltinsARM = 4165,
|
||||||
|
CapabilityTileImageColorReadAccessEXT = 4166,
|
||||||
|
CapabilityTileImageDepthReadAccessEXT = 4167,
|
||||||
|
CapabilityTileImageStencilReadAccessEXT = 4168,
|
||||||
CapabilityFragmentShadingRateKHR = 4422,
|
CapabilityFragmentShadingRateKHR = 4422,
|
||||||
CapabilitySubgroupBallotKHR = 4423,
|
CapabilitySubgroupBallotKHR = 4423,
|
||||||
CapabilityDrawParameters = 4427,
|
CapabilityDrawParameters = 4427,
|
||||||
@ -1598,6 +1606,9 @@ enum Op {
|
|||||||
OpPtrEqual = 401,
|
OpPtrEqual = 401,
|
||||||
OpPtrNotEqual = 402,
|
OpPtrNotEqual = 402,
|
||||||
OpPtrDiff = 403,
|
OpPtrDiff = 403,
|
||||||
|
OpColorAttachmentReadEXT = 4160,
|
||||||
|
OpDepthAttachmentReadEXT = 4161,
|
||||||
|
OpStencilAttachmentReadEXT = 4162,
|
||||||
OpTerminateInvocation = 4416,
|
OpTerminateInvocation = 4416,
|
||||||
OpSubgroupBallotKHR = 4421,
|
OpSubgroupBallotKHR = 4421,
|
||||||
OpSubgroupFirstInvocationKHR = 4422,
|
OpSubgroupFirstInvocationKHR = 4422,
|
||||||
@ -2313,6 +2324,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||||||
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
|
case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
440.frag
|
440.frag
|
||||||
ERROR: 0:11: 'location' : overlapping use of location 4
|
ERROR: 0:11: 'location' : overlapping use of location 4
|
||||||
ERROR: 0:13: 'component' : type overflows the available 4 components
|
ERROR: 0:13: 'component' : type overflows the available 4 components
|
||||||
ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30
|
ERROR: 0:22: 'location' : fragment outputs or tileImageEXTs sharing the same location 30 must be the same basic type
|
||||||
ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||||
ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||||
ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type)
|
||||||
|
38
Test/baseResults/spv.ext.ShaderTileImage.color.frag.out
Normal file
38
Test/baseResults/spv.ext.ShaderTileImage.color.frag.out
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
spv.ext.ShaderTileImage.color.frag
|
||||||
|
WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||||
|
"precision mediump int; precision highp float;"
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 15
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability TileImageColorReadAccessEXT
|
||||||
|
Extension "SPV_EXT_shader_tile_image"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 9
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_shader_tile_image"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "out_color"
|
||||||
|
Name 12 "in_color"
|
||||||
|
Decorate 9(out_color) Location 0
|
||||||
|
Decorate 12(in_color) Location 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeVector 6(float) 4
|
||||||
|
8: TypePointer Output 7(fvec4)
|
||||||
|
9(out_color): 8(ptr) Variable Output
|
||||||
|
10: TypeImage 6(float) TileImageDataEXT nonsampled format:Unknown
|
||||||
|
11: TypePointer TileImageEXT 10
|
||||||
|
12(in_color): 11(ptr) Variable TileImageEXT
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
13: 10 Load 12(in_color)
|
||||||
|
14: 7(fvec4) ColorAttachmentReadEXT 13
|
||||||
|
Store 9(out_color) 14
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -0,0 +1,56 @@
|
|||||||
|
spv.ext.ShaderTileImage.depth_stencil.frag
|
||||||
|
WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
|
||||||
|
"precision mediump int; precision highp float;"
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 26
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability TileImageDepthReadAccessEXT
|
||||||
|
Capability TileImageStencilReadAccessEXT
|
||||||
|
Extension "SPV_EXT_shader_tile_image"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 16 22
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Source GLSL 460
|
||||||
|
SourceExtension "GL_EXT_shader_tile_image"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 8 "depth"
|
||||||
|
Name 12 "stencil_value"
|
||||||
|
Name 16 "stencil_out"
|
||||||
|
Name 22 "depth_out"
|
||||||
|
Decorate 13 RelaxedPrecision
|
||||||
|
Decorate 16(stencil_out) Location 0
|
||||||
|
Decorate 22(depth_out) Location 1
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypePointer Function 6(float)
|
||||||
|
10: TypeInt 32 0
|
||||||
|
11: TypePointer Function 10(int)
|
||||||
|
14: TypeVector 10(int) 4
|
||||||
|
15: TypePointer Output 14(ivec4)
|
||||||
|
16(stencil_out): 15(ptr) Variable Output
|
||||||
|
18: 10(int) Constant 0
|
||||||
|
20: TypeVector 6(float) 4
|
||||||
|
21: TypePointer Output 20(fvec4)
|
||||||
|
22(depth_out): 21(ptr) Variable Output
|
||||||
|
24: 6(float) Constant 0
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
8(depth): 7(ptr) Variable Function
|
||||||
|
12(stencil_value): 11(ptr) Variable Function
|
||||||
|
9: 6(float) DepthAttachmentReadEXT
|
||||||
|
Store 8(depth) 9
|
||||||
|
13: 10(int) StencilAttachmentReadEXT
|
||||||
|
Store 12(stencil_value) 13
|
||||||
|
17: 10(int) Load 12(stencil_value)
|
||||||
|
19: 14(ivec4) CompositeConstruct 17 18 18 18
|
||||||
|
Store 16(stencil_out) 19
|
||||||
|
23: 6(float) Load 8(depth)
|
||||||
|
25: 20(fvec4) CompositeConstruct 23 24 24 24
|
||||||
|
Store 22(depth_out) 25
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -0,0 +1,6 @@
|
|||||||
|
spv.ext.ShaderTileImage.overlap.frag
|
||||||
|
ERROR: 0:8: 'location' : overlapping use of location 1
|
||||||
|
ERROR: 1 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
@ -0,0 +1,6 @@
|
|||||||
|
spv.ext.ShaderTileImage.subpassinput.frag
|
||||||
|
ERROR: 0:6: 'subpassInput' : can not be used with GL_EXT_shader_tile_image enabled
|
||||||
|
ERROR: 1 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
@ -0,0 +1,6 @@
|
|||||||
|
spv.ext.ShaderTileImage.typemismatch.frag
|
||||||
|
ERROR: 0:7: 'location' : fragment outputs or tileImageEXTs sharing the same location 0 must be the same basic type
|
||||||
|
ERROR: 1 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
@ -0,0 +1,9 @@
|
|||||||
|
spv.ext.ShaderTileImage.wronglayout.frag
|
||||||
|
ERROR: 0:7: 'binding' : requires uniform or buffer storage qualifier
|
||||||
|
ERROR: 0:7: 'set' : cannot be used with tileImageEXT
|
||||||
|
ERROR: 0:7: 'tileImageEXT' : can only be used with an explicit location
|
||||||
|
ERROR: 0:7: 'input_attachment_index' : can only be used with a subpass
|
||||||
|
ERROR: 4 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
12
Test/spv.ext.ShaderTileImage.color.frag
Normal file
12
Test/spv.ext.ShaderTileImage.color.frag
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#version 460
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
layout(location=1) tileImageEXT highp attachmentEXT in_color;
|
||||||
|
layout(location=0) out highp vec4 out_color;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
out_color = colorAttachmentReadEXT(in_color);
|
||||||
|
}
|
16
Test/spv.ext.ShaderTileImage.depth_stencil.frag
Normal file
16
Test/spv.ext.ShaderTileImage.depth_stencil.frag
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#version 460
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
layout(location=0) out highp uvec4 stencil_out;
|
||||||
|
layout(location=1) out highp vec4 depth_out;
|
||||||
|
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
float depth = depthAttachmentReadEXT();
|
||||||
|
uint stencil_value = stencilAttachmentReadEXT();
|
||||||
|
stencil_out = uvec4(stencil_value,0,0,0);
|
||||||
|
depth_out = vec4(depth,0.0,0.0,0.0);
|
||||||
|
}
|
15
Test/spv.ext.ShaderTileImage.overlap.frag
Normal file
15
Test/spv.ext.ShaderTileImage.overlap.frag
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#version 460
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
precision mediump int;
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
layout(location=0) tileImageEXT highp attachmentEXT in_color[2];
|
||||||
|
layout(location=1) tileImageEXT highp attachmentEXT in_color_1;
|
||||||
|
layout(location=1) out highp vec4 out_color;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
out_color = colorAttachmentReadEXT(in_color[0]);
|
||||||
|
out_color += colorAttachmentReadEXT(in_color_1);
|
||||||
|
}
|
13
Test/spv.ext.ShaderTileImage.subpassinput.frag
Normal file
13
Test/spv.ext.ShaderTileImage.subpassinput.frag
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#version 450
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0, input_attachment_index = 0) uniform subpassInput i;
|
||||||
|
|
||||||
|
layout(location = 0) out vec4 fragColor;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
fragColor = subpassLoad(i);
|
||||||
|
}
|
13
Test/spv.ext.ShaderTileImage.typemismatch.frag
Normal file
13
Test/spv.ext.ShaderTileImage.typemismatch.frag
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#version 320 es
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
layout(non_coherent_color_attachment_readEXT) in;
|
||||||
|
|
||||||
|
layout(location=0) tileImageEXT highp iattachmentEXT in_color_i;
|
||||||
|
layout(location=0) out highp vec4 out_color_f;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
highp ivec4 read = colorAttachmentReadEXT(in_color_i);
|
||||||
|
out_color_f = vec4(read);
|
||||||
|
}
|
13
Test/spv.ext.ShaderTileImage.wronglayout.frag
Normal file
13
Test/spv.ext.ShaderTileImage.wronglayout.frag
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#version 460
|
||||||
|
#extension GL_EXT_shader_tile_image : require
|
||||||
|
|
||||||
|
precision highp float;
|
||||||
|
precision mediump int;
|
||||||
|
|
||||||
|
layout(binding=0, set=0, input_attachment_index=0) tileImageEXT highp attachmentEXT in_color;
|
||||||
|
layout(location=0) out highp vec4 out_color;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
out_color = colorAttachmentReadEXT(in_color);
|
||||||
|
}
|
@ -134,6 +134,8 @@ enum TStorageQualifier {
|
|||||||
EvqFragDepth,
|
EvqFragDepth,
|
||||||
EvqFragStencil,
|
EvqFragStencil,
|
||||||
|
|
||||||
|
EvqTileImageEXT,
|
||||||
|
|
||||||
// end of list
|
// end of list
|
||||||
EvqLast
|
EvqLast
|
||||||
};
|
};
|
||||||
|
@ -72,6 +72,7 @@ enum TSamplerDim {
|
|||||||
EsdRect,
|
EsdRect,
|
||||||
EsdBuffer,
|
EsdBuffer,
|
||||||
EsdSubpass, // goes only with non-sampled image (image is true)
|
EsdSubpass, // goes only with non-sampled image (image is true)
|
||||||
|
EsdAttachmentEXT,
|
||||||
EsdNumDims
|
EsdNumDims
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -90,6 +91,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||||||
bool isBuffer() const { return false; }
|
bool isBuffer() const { return false; }
|
||||||
bool isRect() const { return false; }
|
bool isRect() const { return false; }
|
||||||
bool isSubpass() const { return false; }
|
bool isSubpass() const { return false; }
|
||||||
|
bool isAttachmentEXT() const { return false; }
|
||||||
bool isCombined() const { return true; }
|
bool isCombined() const { return true; }
|
||||||
bool isImage() const { return false; }
|
bool isImage() const { return false; }
|
||||||
bool isImageClass() const { return false; }
|
bool isImageClass() const { return false; }
|
||||||
@ -122,8 +124,9 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||||||
bool isBuffer() const { return dim == EsdBuffer; }
|
bool isBuffer() const { return dim == EsdBuffer; }
|
||||||
bool isRect() const { return dim == EsdRect; }
|
bool isRect() const { return dim == EsdRect; }
|
||||||
bool isSubpass() const { return dim == EsdSubpass; }
|
bool isSubpass() const { return dim == EsdSubpass; }
|
||||||
|
bool isAttachmentEXT() const { return dim == EsdAttachmentEXT; }
|
||||||
bool isCombined() const { return combined; }
|
bool isCombined() const { return combined; }
|
||||||
bool isImage() const { return image && !isSubpass(); }
|
bool isImage() const { return image && !isSubpass() && !isAttachmentEXT();}
|
||||||
bool isImageClass() const { return image; }
|
bool isImageClass() const { return image; }
|
||||||
bool isMultiSample() const { return ms; }
|
bool isMultiSample() const { return ms; }
|
||||||
bool isExternal() const { return external; }
|
bool isExternal() const { return external; }
|
||||||
@ -214,6 +217,15 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||||||
dim = EsdSubpass;
|
dim = EsdSubpass;
|
||||||
ms = m;
|
ms = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make an AttachmentEXT
|
||||||
|
void setAttachmentEXT(TBasicType t)
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
type = t;
|
||||||
|
image = true;
|
||||||
|
dim = EsdAttachmentEXT;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool operator==(const TSampler& right) const
|
bool operator==(const TSampler& right) const
|
||||||
@ -264,7 +276,9 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
if (isImageClass()) {
|
if (isImageClass()) {
|
||||||
if (isSubpass())
|
if (isAttachmentEXT())
|
||||||
|
s.append("attachmentEXT");
|
||||||
|
else if (isSubpass())
|
||||||
s.append("subpass");
|
s.append("subpass");
|
||||||
else
|
else
|
||||||
s.append("image");
|
s.append("image");
|
||||||
@ -285,10 +299,11 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||||||
case Esd3D: s.append("3D"); break;
|
case Esd3D: s.append("3D"); break;
|
||||||
case EsdCube: s.append("Cube"); break;
|
case EsdCube: s.append("Cube"); break;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case Esd1D: s.append("1D"); break;
|
case Esd1D: s.append("1D"); break;
|
||||||
case EsdRect: s.append("2DRect"); break;
|
case EsdRect: s.append("2DRect"); break;
|
||||||
case EsdBuffer: s.append("Buffer"); break;
|
case EsdBuffer: s.append("Buffer"); break;
|
||||||
case EsdSubpass: s.append("Input"); break;
|
case EsdSubpass: s.append("Input"); break;
|
||||||
|
case EsdAttachmentEXT: s.append(""); break;
|
||||||
#endif
|
#endif
|
||||||
default: break; // some compilers want this
|
default: break; // some compilers want this
|
||||||
}
|
}
|
||||||
@ -1394,6 +1409,9 @@ struct TShaderQualifiers {
|
|||||||
bool earlyFragmentTests; // fragment input
|
bool earlyFragmentTests; // fragment input
|
||||||
bool postDepthCoverage; // fragment input
|
bool postDepthCoverage; // fragment input
|
||||||
bool earlyAndLateFragmentTestsAMD; //fragment input
|
bool earlyAndLateFragmentTestsAMD; //fragment input
|
||||||
|
bool nonCoherentColorAttachmentReadEXT; // fragment input
|
||||||
|
bool nonCoherentDepthAttachmentReadEXT; // fragment input
|
||||||
|
bool nonCoherentStencilAttachmentReadEXT; // fragment input
|
||||||
TLayoutDepth layoutDepth;
|
TLayoutDepth layoutDepth;
|
||||||
TLayoutStencil layoutStencil;
|
TLayoutStencil layoutStencil;
|
||||||
bool blendEquation; // true if any blend equation was specified
|
bool blendEquation; // true if any blend equation was specified
|
||||||
@ -1433,6 +1451,9 @@ struct TShaderQualifiers {
|
|||||||
earlyFragmentTests = false;
|
earlyFragmentTests = false;
|
||||||
earlyAndLateFragmentTestsAMD = false;
|
earlyAndLateFragmentTestsAMD = false;
|
||||||
postDepthCoverage = false;
|
postDepthCoverage = false;
|
||||||
|
nonCoherentColorAttachmentReadEXT = false;
|
||||||
|
nonCoherentDepthAttachmentReadEXT = false;
|
||||||
|
nonCoherentStencilAttachmentReadEXT = false;
|
||||||
layoutDepth = EldNone;
|
layoutDepth = EldNone;
|
||||||
layoutStencil = ElsNone;
|
layoutStencil = ElsNone;
|
||||||
blendEquation = false;
|
blendEquation = false;
|
||||||
@ -1490,6 +1511,12 @@ struct TShaderQualifiers {
|
|||||||
earlyAndLateFragmentTestsAMD = true;
|
earlyAndLateFragmentTestsAMD = true;
|
||||||
if (src.postDepthCoverage)
|
if (src.postDepthCoverage)
|
||||||
postDepthCoverage = true;
|
postDepthCoverage = true;
|
||||||
|
if (src.nonCoherentColorAttachmentReadEXT)
|
||||||
|
nonCoherentColorAttachmentReadEXT = true;
|
||||||
|
if (src.nonCoherentDepthAttachmentReadEXT)
|
||||||
|
nonCoherentDepthAttachmentReadEXT = true;
|
||||||
|
if (src.nonCoherentStencilAttachmentReadEXT)
|
||||||
|
nonCoherentStencilAttachmentReadEXT = true;
|
||||||
if (src.layoutDepth)
|
if (src.layoutDepth)
|
||||||
layoutDepth = src.layoutDepth;
|
layoutDepth = src.layoutDepth;
|
||||||
if (src.layoutStencil)
|
if (src.layoutStencil)
|
||||||
@ -1603,8 +1630,9 @@ public:
|
|||||||
#endif
|
#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(); }
|
||||||
|
bool isAttachmentEXT() const { return basicType == EbtSampler && sampler.isAttachmentEXT(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1927,8 +1955,8 @@ public:
|
|||||||
; }
|
; }
|
||||||
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; }
|
||||||
|
|
||||||
// "Image" is a superset of "Subpass"
|
virtual bool isAttachmentEXT() const { return basicType == EbtSampler && getSampler().isAttachmentEXT(); }
|
||||||
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
|
virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); }
|
||||||
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
|
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
|
||||||
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
|
virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); }
|
||||||
virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; }
|
virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; }
|
||||||
|
@ -827,6 +827,7 @@ enum TOperator {
|
|||||||
EOpSubpassLoadMS,
|
EOpSubpassLoadMS,
|
||||||
EOpSparseImageLoad,
|
EOpSparseImageLoad,
|
||||||
EOpSparseImageLoadLod,
|
EOpSparseImageLoadLod,
|
||||||
|
EOpColorAttachmentReadEXT, // Fragment only
|
||||||
|
|
||||||
EOpImageGuardEnd,
|
EOpImageGuardEnd,
|
||||||
|
|
||||||
@ -1093,6 +1094,10 @@ enum TOperator {
|
|||||||
|
|
||||||
// GL_EXT_ray_tracing_position_fetch
|
// GL_EXT_ray_tracing_position_fetch
|
||||||
EOpRayQueryGetIntersectionTriangleVertexPositionsEXT,
|
EOpRayQueryGetIntersectionTriangleVertexPositionsEXT,
|
||||||
|
|
||||||
|
// Shader tile image ops
|
||||||
|
EOpStencilAttachmentReadEXT, // Fragment only
|
||||||
|
EOpDepthAttachmentReadEXT, // Fragment only
|
||||||
};
|
};
|
||||||
|
|
||||||
class TIntermTraverser;
|
class TIntermTraverser;
|
||||||
@ -1396,6 +1401,7 @@ struct TCrackedTextureOp {
|
|||||||
bool subpass;
|
bool subpass;
|
||||||
bool lodClamp;
|
bool lodClamp;
|
||||||
bool fragMask;
|
bool fragMask;
|
||||||
|
bool attachmentEXT;
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -1452,6 +1458,7 @@ public:
|
|||||||
cracked.gather = false;
|
cracked.gather = false;
|
||||||
cracked.grad = false;
|
cracked.grad = false;
|
||||||
cracked.subpass = false;
|
cracked.subpass = false;
|
||||||
|
cracked.attachmentEXT = false;
|
||||||
cracked.lodClamp = false;
|
cracked.lodClamp = false;
|
||||||
cracked.fragMask = false;
|
cracked.fragMask = false;
|
||||||
|
|
||||||
@ -1612,6 +1619,9 @@ public:
|
|||||||
case EOpSubpassLoadMS:
|
case EOpSubpassLoadMS:
|
||||||
cracked.subpass = true;
|
cracked.subpass = true;
|
||||||
break;
|
break;
|
||||||
|
case EOpColorAttachmentReadEXT:
|
||||||
|
cracked.attachmentEXT = true;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -524,6 +524,7 @@ TBuiltIns::TBuiltIns()
|
|||||||
dimMap[EsdRect] = 2;
|
dimMap[EsdRect] = 2;
|
||||||
dimMap[EsdBuffer] = 1;
|
dimMap[EsdBuffer] = 1;
|
||||||
dimMap[EsdSubpass] = 2; // potentially unused for now
|
dimMap[EsdSubpass] = 2; // potentially unused for now
|
||||||
|
dimMap[EsdAttachmentEXT] = 2; // potentially unused for now
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4440,6 +4441,24 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"\n");
|
"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GL_EXT_shader_tile_image
|
||||||
|
if (spvVersion.vulkan > 0) {
|
||||||
|
stageBuiltins[EShLangFragment].append(
|
||||||
|
"lowp uint stencilAttachmentReadEXT();"
|
||||||
|
"lowp uint stencilAttachmentReadEXT(int);"
|
||||||
|
"highp float depthAttachmentReadEXT();"
|
||||||
|
"highp float depthAttachmentReadEXT(int);"
|
||||||
|
"\n");
|
||||||
|
stageBuiltins[EShLangFragment].append(
|
||||||
|
"vec4 colorAttachmentReadEXT(attachmentEXT);"
|
||||||
|
"vec4 colorAttachmentReadEXT(attachmentEXT, int);"
|
||||||
|
"ivec4 colorAttachmentReadEXT(iattachmentEXT);"
|
||||||
|
"ivec4 colorAttachmentReadEXT(iattachmentEXT, int);"
|
||||||
|
"uvec4 colorAttachmentReadEXT(uattachmentEXT);"
|
||||||
|
"uvec4 colorAttachmentReadEXT(uattachmentEXT, int);"
|
||||||
|
"\n");
|
||||||
|
}
|
||||||
|
|
||||||
// GL_ARB_derivative_control
|
// GL_ARB_derivative_control
|
||||||
if (profile != EEsProfile && version >= 400) {
|
if (profile != EEsProfile && version >= 400) {
|
||||||
stageBuiltins[EShLangFragment].append(derivativeControls);
|
stageBuiltins[EShLangFragment].append(derivativeControls);
|
||||||
@ -6201,6 +6220,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||||||
for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
|
for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube
|
||||||
#else
|
#else
|
||||||
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
|
for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass
|
||||||
|
if (dim == EsdAttachmentEXT)
|
||||||
|
continue;
|
||||||
if (dim == EsdSubpass && spvVersion.vulkan == 0)
|
if (dim == EsdSubpass && spvVersion.vulkan == 0)
|
||||||
continue;
|
continue;
|
||||||
if (dim == EsdSubpass && (image || shadow || arrayed))
|
if (dim == EsdSubpass && (image || shadow || arrayed))
|
||||||
@ -6246,6 +6267,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
|
|||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (dim == EsdSubpass) {
|
if (dim == EsdSubpass) {
|
||||||
sampler.setSubpass(bTypes[bType], ms ? true : false);
|
sampler.setSubpass(bTypes[bType], ms ? true : false);
|
||||||
|
} else if (dim == EsdAttachmentEXT) {
|
||||||
|
sampler.setAttachmentEXT(bTypes[bType]);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (image) {
|
if (image) {
|
||||||
@ -8732,6 +8755,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||||||
symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||||
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GL_EXT_shader_tile_image
|
||||||
|
symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||||
|
symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||||
|
symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image);
|
||||||
#endif // !GLSLANG_WEB
|
#endif // !GLSLANG_WEB
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -9957,6 +9985,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||||||
symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock);
|
symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock);
|
||||||
symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock);
|
symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock);
|
||||||
|
|
||||||
|
symbolTable.relateToOperator("stencilAttachmentReadEXT", EOpStencilAttachmentReadEXT);
|
||||||
|
symbolTable.relateToOperator("depthAttachmentReadEXT", EOpDepthAttachmentReadEXT);
|
||||||
|
symbolTable.relateToOperator("colorAttachmentReadEXT", EOpColorAttachmentReadEXT);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EShLangCompute:
|
case EShLangCompute:
|
||||||
|
@ -3812,7 +3812,10 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const
|
|||||||
// non-uniform sampler
|
// non-uniform sampler
|
||||||
// not yet: okay if it has an initializer
|
// not yet: okay if it has an initializer
|
||||||
// if (! initializer)
|
// if (! initializer)
|
||||||
error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
if (type.getSampler().isAttachmentEXT() && type.getQualifier().storage != EvqTileImageEXT)
|
||||||
|
error(loc, "can only be used in tileImageEXT variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||||
|
else if (type.getQualifier().storage != EvqTileImageEXT)
|
||||||
|
error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5173,6 +5176,7 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu
|
|||||||
case EvqIn:
|
case EvqIn:
|
||||||
case EvqOut:
|
case EvqOut:
|
||||||
case EvqInOut:
|
case EvqInOut:
|
||||||
|
case EvqTileImageEXT:
|
||||||
type.getQualifier().storage = qualifier;
|
type.getQualifier().storage = qualifier;
|
||||||
break;
|
break;
|
||||||
case EvqGlobal:
|
case EvqGlobal:
|
||||||
@ -5780,6 +5784,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||||||
publicType.shaderQualifiers.postDepthCoverage = true;
|
publicType.shaderQualifiers.postDepthCoverage = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/* id is transformed into lower case in the beginning of this function. */
|
||||||
|
if (id == "non_coherent_color_attachment_readext") {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_color_attachment_readEXT");
|
||||||
|
publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (id == "non_coherent_depth_attachment_readext") {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_depth_attachment_readEXT");
|
||||||
|
publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (id == "non_coherent_stencil_attachment_readext") {
|
||||||
|
requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_stencil_attachment_readEXT");
|
||||||
|
publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) {
|
for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) {
|
||||||
if (id == TQualifier::getLayoutDepthString(depth)) {
|
if (id == TQualifier::getLayoutDepthString(depth)) {
|
||||||
requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier");
|
requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier");
|
||||||
@ -6474,6 +6494,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
case EvqBuffer:
|
case EvqBuffer:
|
||||||
if (type.getBasicType() == EbtBlock)
|
if (type.getBasicType() == EbtBlock)
|
||||||
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
error(loc, "cannot apply to uniform or buffer block", "location", "");
|
||||||
|
else if (type.getBasicType() == EbtSampler && type.getSampler().isAttachmentEXT())
|
||||||
|
error(loc, "only applies to", "location", "%s with storage tileImageEXT", type.getBasicTypeString().c_str());
|
||||||
break;
|
break;
|
||||||
case EvqtaskPayloadSharedEXT:
|
case EvqtaskPayloadSharedEXT:
|
||||||
error(loc, "cannot apply to taskPayloadSharedEXT", "location", "");
|
error(loc, "cannot apply to taskPayloadSharedEXT", "location", "");
|
||||||
@ -6487,6 +6509,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
case EvqHitObjectAttrNV:
|
case EvqHitObjectAttrNV:
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case EvqTileImageEXT:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");
|
error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", "");
|
||||||
break;
|
break;
|
||||||
@ -6496,10 +6520,10 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision);
|
int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision);
|
||||||
if (repeated >= 0 && ! typeCollision)
|
if (repeated >= 0 && ! typeCollision)
|
||||||
error(loc, "overlapping use of location", "location", "%d", repeated);
|
error(loc, "overlapping use of location", "location", "%d", repeated);
|
||||||
// "fragment-shader outputs ... if two variables are placed within the same
|
// "fragment-shader outputs/tileImageEXT ... if two variables are placed within the same
|
||||||
// location, they must have the same underlying type (floating-point or integer)"
|
// location, they must have the same underlying type (floating-point or integer)"
|
||||||
if (typeCollision && language == EShLangFragment && qualifier.isPipeOutput())
|
if (typeCollision && language == EShLangFragment && (qualifier.isPipeOutput() || qualifier.storage == EvqTileImageEXT))
|
||||||
error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated);
|
error(loc, "fragment outputs or tileImageEXTs sharing the same location", "location", "%d must be the same basic type", repeated);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
@ -6583,7 +6607,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
!qualifier.hasAttachment() &&
|
!qualifier.hasAttachment() &&
|
||||||
!qualifier.hasBufferReference())
|
!qualifier.hasBufferReference())
|
||||||
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
||||||
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler)
|
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler && !type.getSampler().isAttachmentEXT())
|
||||||
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
|
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6645,6 +6669,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
|
|
||||||
// input attachment
|
// input attachment
|
||||||
if (type.isSubpass()) {
|
if (type.isSubpass()) {
|
||||||
|
if (extensionTurnedOn(E_GL_EXT_shader_tile_image))
|
||||||
|
error(loc, "can not be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), "");
|
||||||
if (! qualifier.hasAttachment())
|
if (! qualifier.hasAttachment())
|
||||||
error(loc, "requires an input_attachment_index layout qualifier", "subpass", "");
|
error(loc, "requires an input_attachment_index layout qualifier", "subpass", "");
|
||||||
} else {
|
} else {
|
||||||
@ -6812,6 +6838,14 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||||||
error(loc, "cannot be used with shaderRecordNV", "set", "");
|
error(loc, "cannot be used with shaderRecordNV", "set", "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qualifier.storage == EvqTileImageEXT) {
|
||||||
|
if (qualifier.hasSet())
|
||||||
|
error(loc, "cannot be used with tileImageEXT", "set", "");
|
||||||
|
if (!qualifier.hasLocation())
|
||||||
|
error(loc, "can only be used with an explicit location", "tileImageEXT", "");
|
||||||
|
}
|
||||||
|
|
||||||
if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) {
|
if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) {
|
||||||
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
|
error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", "");
|
||||||
}
|
}
|
||||||
@ -6851,6 +6885,12 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
|
|||||||
error(loc, message, "early_fragment_tests", "");
|
error(loc, message, "early_fragment_tests", "");
|
||||||
if (shaderQualifiers.postDepthCoverage)
|
if (shaderQualifiers.postDepthCoverage)
|
||||||
error(loc, message, "post_depth_coverage", "");
|
error(loc, message, "post_depth_coverage", "");
|
||||||
|
if (shaderQualifiers.nonCoherentColorAttachmentReadEXT)
|
||||||
|
error(loc, message, "non_coherent_color_attachment_readEXT", "");
|
||||||
|
if (shaderQualifiers.nonCoherentDepthAttachmentReadEXT)
|
||||||
|
error(loc, message, "non_coherent_depth_attachment_readEXT", "");
|
||||||
|
if (shaderQualifiers.nonCoherentStencilAttachmentReadEXT)
|
||||||
|
error(loc, message, "non_coherent_stencil_attachment_readEXT", "");
|
||||||
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
if (shaderQualifiers.primitives != TQualifier::layoutNotSet) {
|
||||||
if (language == EShLangMesh)
|
if (language == EShLangMesh)
|
||||||
error(loc, message, "max_primitives", "");
|
error(loc, message, "max_primitives", "");
|
||||||
@ -9460,6 +9500,24 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con
|
|||||||
else
|
else
|
||||||
error(loc, "can only apply to 'in'", "post_coverage_coverage", "");
|
error(loc, "can only apply to 'in'", "post_coverage_coverage", "");
|
||||||
}
|
}
|
||||||
|
if (publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT) {
|
||||||
|
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||||
|
intermediate.setNonCoherentColorAttachmentReadEXT();
|
||||||
|
else
|
||||||
|
error(loc, "can only apply to 'in'", "non_coherent_color_attachment_readEXT", "");
|
||||||
|
}
|
||||||
|
if (publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT) {
|
||||||
|
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||||
|
intermediate.setNonCoherentDepthAttachmentReadEXT();
|
||||||
|
else
|
||||||
|
error(loc, "can only apply to 'in'", "non_coherent_depth_attachment_readEXT", "");
|
||||||
|
}
|
||||||
|
if (publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT) {
|
||||||
|
if (publicType.qualifier.storage == EvqVaryingIn)
|
||||||
|
intermediate.setNonCoherentStencilAttachmentReadEXT();
|
||||||
|
else
|
||||||
|
error(loc, "can only apply to 'in'", "non_coherent_stencil_attachment_readEXT", "");
|
||||||
|
}
|
||||||
if (publicType.shaderQualifiers.hasBlendEquation()) {
|
if (publicType.shaderQualifiers.hasBlendEquation()) {
|
||||||
if (publicType.qualifier.storage != EvqVaryingOut)
|
if (publicType.qualifier.storage != EvqVaryingOut)
|
||||||
error(loc, "can only apply to 'out'", "blend equation", "");
|
error(loc, "can only apply to 'out'", "blend equation", "");
|
||||||
|
@ -343,6 +343,7 @@ void TScanContext::fillInKeywordMap()
|
|||||||
|
|
||||||
(*KeywordMap)["const"] = CONST;
|
(*KeywordMap)["const"] = CONST;
|
||||||
(*KeywordMap)["uniform"] = UNIFORM;
|
(*KeywordMap)["uniform"] = UNIFORM;
|
||||||
|
(*KeywordMap)["tileImageEXT"] = TILEIMAGEEXT;
|
||||||
(*KeywordMap)["buffer"] = BUFFER;
|
(*KeywordMap)["buffer"] = BUFFER;
|
||||||
(*KeywordMap)["in"] = IN;
|
(*KeywordMap)["in"] = IN;
|
||||||
(*KeywordMap)["out"] = OUT;
|
(*KeywordMap)["out"] = OUT;
|
||||||
@ -685,6 +686,10 @@ void TScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["texture2DRect"] = TEXTURE2DRECT;
|
(*KeywordMap)["texture2DRect"] = TEXTURE2DRECT;
|
||||||
(*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY;
|
(*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY;
|
||||||
|
|
||||||
|
(*KeywordMap)["attachmentEXT"] = ATTACHMENTEXT;
|
||||||
|
(*KeywordMap)["iattachmentEXT"] = IATTACHMENTEXT;
|
||||||
|
(*KeywordMap)["uattachmentEXT"] = UATTACHMENTEXT;
|
||||||
|
|
||||||
(*KeywordMap)["subpassInput"] = SUBPASSINPUT;
|
(*KeywordMap)["subpassInput"] = SUBPASSINPUT;
|
||||||
(*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS;
|
(*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS;
|
||||||
(*KeywordMap)["isubpassInput"] = ISUBPASSINPUT;
|
(*KeywordMap)["isubpassInput"] = ISUBPASSINPUT;
|
||||||
@ -942,6 +947,7 @@ int TScanContext::tokenizeIdentifier()
|
|||||||
switch (keyword) {
|
switch (keyword) {
|
||||||
case CONST:
|
case CONST:
|
||||||
case UNIFORM:
|
case UNIFORM:
|
||||||
|
case TILEIMAGEEXT:
|
||||||
case IN:
|
case IN:
|
||||||
case OUT:
|
case OUT:
|
||||||
case INOUT:
|
case INOUT:
|
||||||
@ -1658,6 +1664,9 @@ int TScanContext::tokenizeIdentifier()
|
|||||||
case ISUBPASSINPUTMS:
|
case ISUBPASSINPUTMS:
|
||||||
case USUBPASSINPUT:
|
case USUBPASSINPUT:
|
||||||
case USUBPASSINPUTMS:
|
case USUBPASSINPUTMS:
|
||||||
|
case ATTACHMENTEXT:
|
||||||
|
case IATTACHMENTEXT:
|
||||||
|
case UATTACHMENTEXT:
|
||||||
if (parseContext.spvVersion.vulkan > 0)
|
if (parseContext.spvVersion.vulkan > 0)
|
||||||
return keyword;
|
return keyword;
|
||||||
else
|
else
|
||||||
|
@ -355,6 +355,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable;
|
extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable;
|
extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable;
|
||||||
extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable;
|
extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable;
|
||||||
|
extensionBehavior[E_GL_EXT_shader_tile_image] = EBhDisable;
|
||||||
|
|
||||||
// OVR extensions
|
// OVR extensions
|
||||||
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
extensionBehavior[E_GL_OVR_multiview] = EBhDisable;
|
||||||
|
@ -328,6 +328,8 @@ const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation";
|
|||||||
const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
|
const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float";
|
||||||
const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
|
const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2";
|
||||||
|
|
||||||
|
const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image";
|
||||||
|
|
||||||
// Arrays of extensions for the above AEP duplications
|
// Arrays of extensions for the above AEP duplications
|
||||||
|
|
||||||
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
|
const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader };
|
||||||
|
@ -279,6 +279,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
|
%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
|
||||||
%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
|
%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
|
||||||
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
||||||
|
%token <lex> ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT
|
||||||
|
|
||||||
GLSLANG_WEB_EXCLUDE_OFF
|
GLSLANG_WEB_EXCLUDE_OFF
|
||||||
|
|
||||||
@ -304,7 +305,7 @@ GLSLANG_WEB_EXCLUDE_OFF
|
|||||||
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
||||||
%token <lex> TERMINATE_INVOCATION
|
%token <lex> TERMINATE_INVOCATION
|
||||||
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
|
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
|
||||||
%token <lex> UNIFORM SHARED BUFFER
|
%token <lex> UNIFORM SHARED BUFFER TILEIMAGEEXT
|
||||||
%token <lex> FLAT SMOOTH LAYOUT
|
%token <lex> FLAT SMOOTH LAYOUT
|
||||||
|
|
||||||
GLSLANG_WEB_EXCLUDE_ON
|
GLSLANG_WEB_EXCLUDE_ON
|
||||||
@ -1476,6 +1477,11 @@ storage_qualifier
|
|||||||
$$.init($1.loc);
|
$$.init($1.loc);
|
||||||
$$.qualifier.storage = EvqUniform;
|
$$.qualifier.storage = EvqUniform;
|
||||||
}
|
}
|
||||||
|
| TILEIMAGEEXT {
|
||||||
|
parseContext.globalCheck($1.loc, "tileImageEXT");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.storage = EvqTileImageEXT;
|
||||||
|
}
|
||||||
| SHARED {
|
| SHARED {
|
||||||
parseContext.globalCheck($1.loc, "shared");
|
parseContext.globalCheck($1.loc, "shared");
|
||||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||||
@ -3446,6 +3452,24 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
$$.sampler.set(EbtFloat, Esd2D);
|
$$.sampler.set(EbtFloat, Esd2D);
|
||||||
$$.sampler.yuv = true;
|
$$.sampler.yuv = true;
|
||||||
}
|
}
|
||||||
|
| ATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtFloat);
|
||||||
|
}
|
||||||
|
| IATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtInt);
|
||||||
|
}
|
||||||
|
| UATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtUint);
|
||||||
|
}
|
||||||
| SUBPASSINPUT {
|
| SUBPASSINPUT {
|
||||||
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
|
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
@ -279,6 +279,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
|
%token <lex> SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID
|
||||||
%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
|
%token <lex> SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING
|
||||||
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
%token <lex> SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL
|
||||||
|
%token <lex> ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -304,7 +305,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
%token <lex> BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
|
||||||
%token <lex> TERMINATE_INVOCATION
|
%token <lex> TERMINATE_INVOCATION
|
||||||
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
|
%token <lex> TERMINATE_RAY IGNORE_INTERSECTION
|
||||||
%token <lex> UNIFORM SHARED BUFFER
|
%token <lex> UNIFORM SHARED BUFFER TILEIMAGEEXT
|
||||||
%token <lex> FLAT SMOOTH LAYOUT
|
%token <lex> FLAT SMOOTH LAYOUT
|
||||||
|
|
||||||
|
|
||||||
@ -1476,6 +1477,11 @@ storage_qualifier
|
|||||||
$$.init($1.loc);
|
$$.init($1.loc);
|
||||||
$$.qualifier.storage = EvqUniform;
|
$$.qualifier.storage = EvqUniform;
|
||||||
}
|
}
|
||||||
|
| TILEIMAGEEXT {
|
||||||
|
parseContext.globalCheck($1.loc, "tileImageEXT");
|
||||||
|
$$.init($1.loc);
|
||||||
|
$$.qualifier.storage = EvqTileImageEXT;
|
||||||
|
}
|
||||||
| SHARED {
|
| SHARED {
|
||||||
parseContext.globalCheck($1.loc, "shared");
|
parseContext.globalCheck($1.loc, "shared");
|
||||||
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared");
|
||||||
@ -3446,6 +3452,24 @@ type_specifier_nonarray
|
|||||||
$$.sampler.set(EbtFloat, Esd2D);
|
$$.sampler.set(EbtFloat, Esd2D);
|
||||||
$$.sampler.yuv = true;
|
$$.sampler.yuv = true;
|
||||||
}
|
}
|
||||||
|
| ATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtFloat);
|
||||||
|
}
|
||||||
|
| IATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtInt);
|
||||||
|
}
|
||||||
|
| UATTACHMENTEXT {
|
||||||
|
parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input");
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtSampler;
|
||||||
|
$$.sampler.setAttachmentEXT(EbtUint);
|
||||||
|
}
|
||||||
| SUBPASSINPUT {
|
| SUBPASSINPUT {
|
||||||
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
|
parseContext.requireStage($1.loc, EShLangFragment, "subpass input");
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -380,137 +380,141 @@ extern int yydebug;
|
|||||||
SPIRV_STORAGE_CLASS = 581, /* SPIRV_STORAGE_CLASS */
|
SPIRV_STORAGE_CLASS = 581, /* SPIRV_STORAGE_CLASS */
|
||||||
SPIRV_BY_REFERENCE = 582, /* SPIRV_BY_REFERENCE */
|
SPIRV_BY_REFERENCE = 582, /* SPIRV_BY_REFERENCE */
|
||||||
SPIRV_LITERAL = 583, /* SPIRV_LITERAL */
|
SPIRV_LITERAL = 583, /* SPIRV_LITERAL */
|
||||||
LEFT_OP = 584, /* LEFT_OP */
|
ATTACHMENTEXT = 584, /* ATTACHMENTEXT */
|
||||||
RIGHT_OP = 585, /* RIGHT_OP */
|
IATTACHMENTEXT = 585, /* IATTACHMENTEXT */
|
||||||
INC_OP = 586, /* INC_OP */
|
UATTACHMENTEXT = 586, /* UATTACHMENTEXT */
|
||||||
DEC_OP = 587, /* DEC_OP */
|
LEFT_OP = 587, /* LEFT_OP */
|
||||||
LE_OP = 588, /* LE_OP */
|
RIGHT_OP = 588, /* RIGHT_OP */
|
||||||
GE_OP = 589, /* GE_OP */
|
INC_OP = 589, /* INC_OP */
|
||||||
EQ_OP = 590, /* EQ_OP */
|
DEC_OP = 590, /* DEC_OP */
|
||||||
NE_OP = 591, /* NE_OP */
|
LE_OP = 591, /* LE_OP */
|
||||||
AND_OP = 592, /* AND_OP */
|
GE_OP = 592, /* GE_OP */
|
||||||
OR_OP = 593, /* OR_OP */
|
EQ_OP = 593, /* EQ_OP */
|
||||||
XOR_OP = 594, /* XOR_OP */
|
NE_OP = 594, /* NE_OP */
|
||||||
MUL_ASSIGN = 595, /* MUL_ASSIGN */
|
AND_OP = 595, /* AND_OP */
|
||||||
DIV_ASSIGN = 596, /* DIV_ASSIGN */
|
OR_OP = 596, /* OR_OP */
|
||||||
ADD_ASSIGN = 597, /* ADD_ASSIGN */
|
XOR_OP = 597, /* XOR_OP */
|
||||||
MOD_ASSIGN = 598, /* MOD_ASSIGN */
|
MUL_ASSIGN = 598, /* MUL_ASSIGN */
|
||||||
LEFT_ASSIGN = 599, /* LEFT_ASSIGN */
|
DIV_ASSIGN = 599, /* DIV_ASSIGN */
|
||||||
RIGHT_ASSIGN = 600, /* RIGHT_ASSIGN */
|
ADD_ASSIGN = 600, /* ADD_ASSIGN */
|
||||||
AND_ASSIGN = 601, /* AND_ASSIGN */
|
MOD_ASSIGN = 601, /* MOD_ASSIGN */
|
||||||
XOR_ASSIGN = 602, /* XOR_ASSIGN */
|
LEFT_ASSIGN = 602, /* LEFT_ASSIGN */
|
||||||
OR_ASSIGN = 603, /* OR_ASSIGN */
|
RIGHT_ASSIGN = 603, /* RIGHT_ASSIGN */
|
||||||
SUB_ASSIGN = 604, /* SUB_ASSIGN */
|
AND_ASSIGN = 604, /* AND_ASSIGN */
|
||||||
STRING_LITERAL = 605, /* STRING_LITERAL */
|
XOR_ASSIGN = 605, /* XOR_ASSIGN */
|
||||||
LEFT_PAREN = 606, /* LEFT_PAREN */
|
OR_ASSIGN = 606, /* OR_ASSIGN */
|
||||||
RIGHT_PAREN = 607, /* RIGHT_PAREN */
|
SUB_ASSIGN = 607, /* SUB_ASSIGN */
|
||||||
LEFT_BRACKET = 608, /* LEFT_BRACKET */
|
STRING_LITERAL = 608, /* STRING_LITERAL */
|
||||||
RIGHT_BRACKET = 609, /* RIGHT_BRACKET */
|
LEFT_PAREN = 609, /* LEFT_PAREN */
|
||||||
LEFT_BRACE = 610, /* LEFT_BRACE */
|
RIGHT_PAREN = 610, /* RIGHT_PAREN */
|
||||||
RIGHT_BRACE = 611, /* RIGHT_BRACE */
|
LEFT_BRACKET = 611, /* LEFT_BRACKET */
|
||||||
DOT = 612, /* DOT */
|
RIGHT_BRACKET = 612, /* RIGHT_BRACKET */
|
||||||
COMMA = 613, /* COMMA */
|
LEFT_BRACE = 613, /* LEFT_BRACE */
|
||||||
COLON = 614, /* COLON */
|
RIGHT_BRACE = 614, /* RIGHT_BRACE */
|
||||||
EQUAL = 615, /* EQUAL */
|
DOT = 615, /* DOT */
|
||||||
SEMICOLON = 616, /* SEMICOLON */
|
COMMA = 616, /* COMMA */
|
||||||
BANG = 617, /* BANG */
|
COLON = 617, /* COLON */
|
||||||
DASH = 618, /* DASH */
|
EQUAL = 618, /* EQUAL */
|
||||||
TILDE = 619, /* TILDE */
|
SEMICOLON = 619, /* SEMICOLON */
|
||||||
PLUS = 620, /* PLUS */
|
BANG = 620, /* BANG */
|
||||||
STAR = 621, /* STAR */
|
DASH = 621, /* DASH */
|
||||||
SLASH = 622, /* SLASH */
|
TILDE = 622, /* TILDE */
|
||||||
PERCENT = 623, /* PERCENT */
|
PLUS = 623, /* PLUS */
|
||||||
LEFT_ANGLE = 624, /* LEFT_ANGLE */
|
STAR = 624, /* STAR */
|
||||||
RIGHT_ANGLE = 625, /* RIGHT_ANGLE */
|
SLASH = 625, /* SLASH */
|
||||||
VERTICAL_BAR = 626, /* VERTICAL_BAR */
|
PERCENT = 626, /* PERCENT */
|
||||||
CARET = 627, /* CARET */
|
LEFT_ANGLE = 627, /* LEFT_ANGLE */
|
||||||
AMPERSAND = 628, /* AMPERSAND */
|
RIGHT_ANGLE = 628, /* RIGHT_ANGLE */
|
||||||
QUESTION = 629, /* QUESTION */
|
VERTICAL_BAR = 629, /* VERTICAL_BAR */
|
||||||
INVARIANT = 630, /* INVARIANT */
|
CARET = 630, /* CARET */
|
||||||
HIGH_PRECISION = 631, /* HIGH_PRECISION */
|
AMPERSAND = 631, /* AMPERSAND */
|
||||||
MEDIUM_PRECISION = 632, /* MEDIUM_PRECISION */
|
QUESTION = 632, /* QUESTION */
|
||||||
LOW_PRECISION = 633, /* LOW_PRECISION */
|
INVARIANT = 633, /* INVARIANT */
|
||||||
PRECISION = 634, /* PRECISION */
|
HIGH_PRECISION = 634, /* HIGH_PRECISION */
|
||||||
PACKED = 635, /* PACKED */
|
MEDIUM_PRECISION = 635, /* MEDIUM_PRECISION */
|
||||||
RESOURCE = 636, /* RESOURCE */
|
LOW_PRECISION = 636, /* LOW_PRECISION */
|
||||||
SUPERP = 637, /* SUPERP */
|
PRECISION = 637, /* PRECISION */
|
||||||
FLOATCONSTANT = 638, /* FLOATCONSTANT */
|
PACKED = 638, /* PACKED */
|
||||||
INTCONSTANT = 639, /* INTCONSTANT */
|
RESOURCE = 639, /* RESOURCE */
|
||||||
UINTCONSTANT = 640, /* UINTCONSTANT */
|
SUPERP = 640, /* SUPERP */
|
||||||
BOOLCONSTANT = 641, /* BOOLCONSTANT */
|
FLOATCONSTANT = 641, /* FLOATCONSTANT */
|
||||||
IDENTIFIER = 642, /* IDENTIFIER */
|
INTCONSTANT = 642, /* INTCONSTANT */
|
||||||
TYPE_NAME = 643, /* TYPE_NAME */
|
UINTCONSTANT = 643, /* UINTCONSTANT */
|
||||||
CENTROID = 644, /* CENTROID */
|
BOOLCONSTANT = 644, /* BOOLCONSTANT */
|
||||||
IN = 645, /* IN */
|
IDENTIFIER = 645, /* IDENTIFIER */
|
||||||
OUT = 646, /* OUT */
|
TYPE_NAME = 646, /* TYPE_NAME */
|
||||||
INOUT = 647, /* INOUT */
|
CENTROID = 647, /* CENTROID */
|
||||||
STRUCT = 648, /* STRUCT */
|
IN = 648, /* IN */
|
||||||
VOID = 649, /* VOID */
|
OUT = 649, /* OUT */
|
||||||
WHILE = 650, /* WHILE */
|
INOUT = 650, /* INOUT */
|
||||||
BREAK = 651, /* BREAK */
|
STRUCT = 651, /* STRUCT */
|
||||||
CONTINUE = 652, /* CONTINUE */
|
VOID = 652, /* VOID */
|
||||||
DO = 653, /* DO */
|
WHILE = 653, /* WHILE */
|
||||||
ELSE = 654, /* ELSE */
|
BREAK = 654, /* BREAK */
|
||||||
FOR = 655, /* FOR */
|
CONTINUE = 655, /* CONTINUE */
|
||||||
IF = 656, /* IF */
|
DO = 656, /* DO */
|
||||||
DISCARD = 657, /* DISCARD */
|
ELSE = 657, /* ELSE */
|
||||||
RETURN = 658, /* RETURN */
|
FOR = 658, /* FOR */
|
||||||
SWITCH = 659, /* SWITCH */
|
IF = 659, /* IF */
|
||||||
CASE = 660, /* CASE */
|
DISCARD = 660, /* DISCARD */
|
||||||
DEFAULT = 661, /* DEFAULT */
|
RETURN = 661, /* RETURN */
|
||||||
TERMINATE_INVOCATION = 662, /* TERMINATE_INVOCATION */
|
SWITCH = 662, /* SWITCH */
|
||||||
TERMINATE_RAY = 663, /* TERMINATE_RAY */
|
CASE = 663, /* CASE */
|
||||||
IGNORE_INTERSECTION = 664, /* IGNORE_INTERSECTION */
|
DEFAULT = 664, /* DEFAULT */
|
||||||
UNIFORM = 665, /* UNIFORM */
|
TERMINATE_INVOCATION = 665, /* TERMINATE_INVOCATION */
|
||||||
SHARED = 666, /* SHARED */
|
TERMINATE_RAY = 666, /* TERMINATE_RAY */
|
||||||
BUFFER = 667, /* BUFFER */
|
IGNORE_INTERSECTION = 667, /* IGNORE_INTERSECTION */
|
||||||
FLAT = 668, /* FLAT */
|
UNIFORM = 668, /* UNIFORM */
|
||||||
SMOOTH = 669, /* SMOOTH */
|
SHARED = 669, /* SHARED */
|
||||||
LAYOUT = 670, /* LAYOUT */
|
BUFFER = 670, /* BUFFER */
|
||||||
DOUBLECONSTANT = 671, /* DOUBLECONSTANT */
|
TILEIMAGEEXT = 671, /* TILEIMAGEEXT */
|
||||||
INT16CONSTANT = 672, /* INT16CONSTANT */
|
FLAT = 672, /* FLAT */
|
||||||
UINT16CONSTANT = 673, /* UINT16CONSTANT */
|
SMOOTH = 673, /* SMOOTH */
|
||||||
FLOAT16CONSTANT = 674, /* FLOAT16CONSTANT */
|
LAYOUT = 674, /* LAYOUT */
|
||||||
INT32CONSTANT = 675, /* INT32CONSTANT */
|
DOUBLECONSTANT = 675, /* DOUBLECONSTANT */
|
||||||
UINT32CONSTANT = 676, /* UINT32CONSTANT */
|
INT16CONSTANT = 676, /* INT16CONSTANT */
|
||||||
INT64CONSTANT = 677, /* INT64CONSTANT */
|
UINT16CONSTANT = 677, /* UINT16CONSTANT */
|
||||||
UINT64CONSTANT = 678, /* UINT64CONSTANT */
|
FLOAT16CONSTANT = 678, /* FLOAT16CONSTANT */
|
||||||
SUBROUTINE = 679, /* SUBROUTINE */
|
INT32CONSTANT = 679, /* INT32CONSTANT */
|
||||||
DEMOTE = 680, /* DEMOTE */
|
UINT32CONSTANT = 680, /* UINT32CONSTANT */
|
||||||
PAYLOADNV = 681, /* PAYLOADNV */
|
INT64CONSTANT = 681, /* INT64CONSTANT */
|
||||||
PAYLOADINNV = 682, /* PAYLOADINNV */
|
UINT64CONSTANT = 682, /* UINT64CONSTANT */
|
||||||
HITATTRNV = 683, /* HITATTRNV */
|
SUBROUTINE = 683, /* SUBROUTINE */
|
||||||
CALLDATANV = 684, /* CALLDATANV */
|
DEMOTE = 684, /* DEMOTE */
|
||||||
CALLDATAINNV = 685, /* CALLDATAINNV */
|
PAYLOADNV = 685, /* PAYLOADNV */
|
||||||
PAYLOADEXT = 686, /* PAYLOADEXT */
|
PAYLOADINNV = 686, /* PAYLOADINNV */
|
||||||
PAYLOADINEXT = 687, /* PAYLOADINEXT */
|
HITATTRNV = 687, /* HITATTRNV */
|
||||||
HITATTREXT = 688, /* HITATTREXT */
|
CALLDATANV = 688, /* CALLDATANV */
|
||||||
CALLDATAEXT = 689, /* CALLDATAEXT */
|
CALLDATAINNV = 689, /* CALLDATAINNV */
|
||||||
CALLDATAINEXT = 690, /* CALLDATAINEXT */
|
PAYLOADEXT = 690, /* PAYLOADEXT */
|
||||||
PATCH = 691, /* PATCH */
|
PAYLOADINEXT = 691, /* PAYLOADINEXT */
|
||||||
SAMPLE = 692, /* SAMPLE */
|
HITATTREXT = 692, /* HITATTREXT */
|
||||||
NONUNIFORM = 693, /* NONUNIFORM */
|
CALLDATAEXT = 693, /* CALLDATAEXT */
|
||||||
COHERENT = 694, /* COHERENT */
|
CALLDATAINEXT = 694, /* CALLDATAINEXT */
|
||||||
VOLATILE = 695, /* VOLATILE */
|
PATCH = 695, /* PATCH */
|
||||||
RESTRICT = 696, /* RESTRICT */
|
SAMPLE = 696, /* SAMPLE */
|
||||||
READONLY = 697, /* READONLY */
|
NONUNIFORM = 697, /* NONUNIFORM */
|
||||||
WRITEONLY = 698, /* WRITEONLY */
|
COHERENT = 698, /* COHERENT */
|
||||||
DEVICECOHERENT = 699, /* DEVICECOHERENT */
|
VOLATILE = 699, /* VOLATILE */
|
||||||
QUEUEFAMILYCOHERENT = 700, /* QUEUEFAMILYCOHERENT */
|
RESTRICT = 700, /* RESTRICT */
|
||||||
WORKGROUPCOHERENT = 701, /* WORKGROUPCOHERENT */
|
READONLY = 701, /* READONLY */
|
||||||
SUBGROUPCOHERENT = 702, /* SUBGROUPCOHERENT */
|
WRITEONLY = 702, /* WRITEONLY */
|
||||||
NONPRIVATE = 703, /* NONPRIVATE */
|
DEVICECOHERENT = 703, /* DEVICECOHERENT */
|
||||||
SHADERCALLCOHERENT = 704, /* SHADERCALLCOHERENT */
|
QUEUEFAMILYCOHERENT = 704, /* QUEUEFAMILYCOHERENT */
|
||||||
NOPERSPECTIVE = 705, /* NOPERSPECTIVE */
|
WORKGROUPCOHERENT = 705, /* WORKGROUPCOHERENT */
|
||||||
EXPLICITINTERPAMD = 706, /* EXPLICITINTERPAMD */
|
SUBGROUPCOHERENT = 706, /* SUBGROUPCOHERENT */
|
||||||
PERVERTEXEXT = 707, /* PERVERTEXEXT */
|
NONPRIVATE = 707, /* NONPRIVATE */
|
||||||
PERVERTEXNV = 708, /* PERVERTEXNV */
|
SHADERCALLCOHERENT = 708, /* SHADERCALLCOHERENT */
|
||||||
PERPRIMITIVENV = 709, /* PERPRIMITIVENV */
|
NOPERSPECTIVE = 709, /* NOPERSPECTIVE */
|
||||||
PERVIEWNV = 710, /* PERVIEWNV */
|
EXPLICITINTERPAMD = 710, /* EXPLICITINTERPAMD */
|
||||||
PERTASKNV = 711, /* PERTASKNV */
|
PERVERTEXEXT = 711, /* PERVERTEXEXT */
|
||||||
PERPRIMITIVEEXT = 712, /* PERPRIMITIVEEXT */
|
PERVERTEXNV = 712, /* PERVERTEXNV */
|
||||||
TASKPAYLOADWORKGROUPEXT = 713, /* TASKPAYLOADWORKGROUPEXT */
|
PERPRIMITIVENV = 713, /* PERPRIMITIVENV */
|
||||||
PRECISE = 714 /* PRECISE */
|
PERVIEWNV = 714, /* PERVIEWNV */
|
||||||
|
PERTASKNV = 715, /* PERTASKNV */
|
||||||
|
PERPRIMITIVEEXT = 716, /* PERPRIMITIVEEXT */
|
||||||
|
TASKPAYLOADWORKGROUPEXT = 717, /* TASKPAYLOADWORKGROUPEXT */
|
||||||
|
PRECISE = 718 /* PRECISE */
|
||||||
};
|
};
|
||||||
typedef enum yytokentype yytoken_kind_t;
|
typedef enum yytokentype yytoken_kind_t;
|
||||||
#endif
|
#endif
|
||||||
@ -558,7 +562,7 @@ union YYSTYPE
|
|||||||
glslang::TArraySizes* typeParameters;
|
glslang::TArraySizes* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
|
|
||||||
#line 562 "MachineIndependent/glslang_tab.cpp.h"
|
#line 566 "MachineIndependent/glslang_tab.cpp.h"
|
||||||
|
|
||||||
};
|
};
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
|
@ -663,6 +663,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
|
|||||||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||||
|
|
||||||
|
case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break;
|
||||||
|
|
||||||
case EOpConstructReference: out.debug << "Construct reference type"; break;
|
case EOpConstructReference: out.debug << "Construct reference type"; break;
|
||||||
|
|
||||||
case EOpDeclare: out.debug << "Declare"; break;
|
case EOpDeclare: out.debug << "Declare"; break;
|
||||||
@ -1060,6 +1062,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||||||
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
case EOpSubpassLoad: out.debug << "subpassLoad"; break;
|
||||||
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break;
|
||||||
|
|
||||||
|
case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break;
|
||||||
|
|
||||||
case EOpTraceNV: out.debug << "traceNV"; break;
|
case EOpTraceNV: out.debug << "traceNV"; break;
|
||||||
case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break;
|
case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break;
|
||||||
case EOpTraceKHR: out.debug << "traceRayKHR"; break;
|
case EOpTraceKHR: out.debug << "traceRayKHR"; break;
|
||||||
@ -1141,6 +1145,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
case EOpSpirvInst: out.debug << "spirv_instruction"; break;
|
||||||
#endif
|
#endif
|
||||||
|
case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break;
|
||||||
|
case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break;
|
||||||
|
|
||||||
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
default: out.debug.message(EPrefixError, "Bad aggregation op");
|
||||||
}
|
}
|
||||||
@ -1545,6 +1551,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
|
|||||||
infoSink.debug << "using early_fragment_tests\n";
|
infoSink.debug << "using early_fragment_tests\n";
|
||||||
if (postDepthCoverage)
|
if (postDepthCoverage)
|
||||||
infoSink.debug << "using post_depth_coverage\n";
|
infoSink.debug << "using post_depth_coverage\n";
|
||||||
|
if (nonCoherentColorAttachmentReadEXT)
|
||||||
|
infoSink.debug << "using non_coherent_color_attachment_readEXT\n";
|
||||||
|
if (nonCoherentDepthAttachmentReadEXT)
|
||||||
|
infoSink.debug << "using non_coherent_depth_attachment_readEXT\n";
|
||||||
|
if (nonCoherentStencilAttachmentReadEXT)
|
||||||
|
infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n";
|
||||||
if (depthLayout != EldNone)
|
if (depthLayout != EldNone)
|
||||||
infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
|
infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n";
|
||||||
if (blendEquations != 0) {
|
if (blendEquations != 0) {
|
||||||
|
@ -271,6 +271,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit)
|
|||||||
|
|
||||||
MERGE_TRUE(earlyFragmentTests);
|
MERGE_TRUE(earlyFragmentTests);
|
||||||
MERGE_TRUE(postDepthCoverage);
|
MERGE_TRUE(postDepthCoverage);
|
||||||
|
MERGE_TRUE(nonCoherentColorAttachmentReadEXT);
|
||||||
|
MERGE_TRUE(nonCoherentDepthAttachmentReadEXT);
|
||||||
|
MERGE_TRUE(nonCoherentStencilAttachmentReadEXT);
|
||||||
|
|
||||||
if (depthLayout == EldNone)
|
if (depthLayout == EldNone)
|
||||||
depthLayout = unit.depthLayout;
|
depthLayout = unit.depthLayout;
|
||||||
@ -1617,7 +1620,7 @@ bool TIntermediate::userOutputUsed() const
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accumulate locations used for inputs, outputs, and uniforms, payload and callable data
|
// Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT
|
||||||
// and check for collisions as the accumulation is done.
|
// and check for collisions as the accumulation is done.
|
||||||
//
|
//
|
||||||
// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
|
// Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value.
|
||||||
@ -1639,6 +1642,8 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||||||
set = 2;
|
set = 2;
|
||||||
else if (qualifier.storage == EvqBuffer)
|
else if (qualifier.storage == EvqBuffer)
|
||||||
set = 3;
|
set = 3;
|
||||||
|
else if (qualifier.storage == EvqTileImageEXT)
|
||||||
|
set = 4;
|
||||||
else if (qualifier.isAnyPayload())
|
else if (qualifier.isAnyPayload())
|
||||||
setRT = 0;
|
setRT = 0;
|
||||||
else if (qualifier.isAnyCallable())
|
else if (qualifier.isAnyCallable())
|
||||||
@ -1731,7 +1736,10 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
// combine location and component ranges
|
// combine location and component ranges
|
||||||
TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0);
|
TBasicType basicTy = type.getBasicType();
|
||||||
|
if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT())
|
||||||
|
basicTy = type.getSampler().type;
|
||||||
|
TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0);
|
||||||
|
|
||||||
// check for collisions, except for vertex inputs on desktop targeting OpenGL
|
// check for collisions, except for vertex inputs on desktop targeting OpenGL
|
||||||
if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
|
if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0)
|
||||||
@ -1762,6 +1770,19 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check typeCollision between tileImageEXT and out
|
||||||
|
if (set == 4 || set == 1) {
|
||||||
|
// if the set is "tileImageEXT", check against "out" and vice versa
|
||||||
|
int againstSet = (set == 4) ? 1 : 4;
|
||||||
|
for (size_t r = 0; r < usedIo[againstSet].size(); ++r) {
|
||||||
|
if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) {
|
||||||
|
// aliased-type mismatch
|
||||||
|
typeCollision = true;
|
||||||
|
return std::max(range.location.start, usedIo[againstSet][r].location.start);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return -1; // no collision
|
return -1; // no collision
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,6 +322,9 @@ public:
|
|||||||
pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false),
|
pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false),
|
||||||
vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
|
vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false),
|
||||||
postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), depthLayout(EldNone), stencilLayout(ElsNone),
|
postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), depthLayout(EldNone), stencilLayout(ElsNone),
|
||||||
|
nonCoherentColorAttachmentReadEXT(false),
|
||||||
|
nonCoherentDepthAttachmentReadEXT(false),
|
||||||
|
nonCoherentStencilAttachmentReadEXT(false),
|
||||||
hlslFunctionality1(false),
|
hlslFunctionality1(false),
|
||||||
blendEquations(0), xfbMode(false), multiStream(false),
|
blendEquations(0), xfbMode(false), multiStream(false),
|
||||||
layoutOverrideCoverage(false),
|
layoutOverrideCoverage(false),
|
||||||
@ -638,6 +641,9 @@ public:
|
|||||||
bool getXfbMode() const { return false; }
|
bool getXfbMode() const { return false; }
|
||||||
bool isMultiStream() const { return false; }
|
bool isMultiStream() const { return false; }
|
||||||
TLayoutGeometry getOutputPrimitive() const { return ElgNone; }
|
TLayoutGeometry getOutputPrimitive() const { return ElgNone; }
|
||||||
|
bool getNonCoherentColorAttachmentReadEXT() const { return false; }
|
||||||
|
bool getNonCoherentDepthAttachmentReadEXT() const { return false; }
|
||||||
|
bool getNonCoherentStencilAttachmentReadEXT() const { return false; }
|
||||||
bool getPostDepthCoverage() const { return false; }
|
bool getPostDepthCoverage() const { return false; }
|
||||||
bool getEarlyFragmentTests() const { return false; }
|
bool getEarlyFragmentTests() const { return false; }
|
||||||
TLayoutDepth getDepth() const { return EldNone; }
|
TLayoutDepth getDepth() const { return EldNone; }
|
||||||
@ -894,6 +900,12 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
|
TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; }
|
||||||
|
void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; }
|
||||||
|
bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; }
|
||||||
|
void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; }
|
||||||
|
bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; }
|
||||||
|
void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; }
|
||||||
|
bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; }
|
||||||
void setPostDepthCoverage() { postDepthCoverage = true; }
|
void setPostDepthCoverage() { postDepthCoverage = true; }
|
||||||
bool getPostDepthCoverage() const { return postDepthCoverage; }
|
bool getPostDepthCoverage() const { return postDepthCoverage; }
|
||||||
void setEarlyFragmentTests() { earlyFragmentTests = true; }
|
void setEarlyFragmentTests() { earlyFragmentTests = true; }
|
||||||
@ -1215,6 +1227,9 @@ protected:
|
|||||||
bool earlyFragmentTests;
|
bool earlyFragmentTests;
|
||||||
bool postDepthCoverage;
|
bool postDepthCoverage;
|
||||||
bool earlyAndLateFragmentTestsAMD;
|
bool earlyAndLateFragmentTestsAMD;
|
||||||
|
bool nonCoherentColorAttachmentReadEXT;
|
||||||
|
bool nonCoherentDepthAttachmentReadEXT;
|
||||||
|
bool nonCoherentStencilAttachmentReadEXT;
|
||||||
TLayoutDepth depthLayout;
|
TLayoutDepth depthLayout;
|
||||||
TLayoutStencil stencilLayout;
|
TLayoutStencil stencilLayout;
|
||||||
bool hlslFunctionality1;
|
bool hlslFunctionality1;
|
||||||
|
@ -357,6 +357,12 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"spv.discard-dce.frag",
|
"spv.discard-dce.frag",
|
||||||
"spv.doWhileLoop.frag",
|
"spv.doWhileLoop.frag",
|
||||||
"spv.earlyReturnDiscard.frag",
|
"spv.earlyReturnDiscard.frag",
|
||||||
|
"spv.ext.ShaderTileImage.color.frag",
|
||||||
|
"spv.ext.ShaderTileImage.depth_stencil.frag",
|
||||||
|
"spv.ext.ShaderTileImage.subpassinput.frag",
|
||||||
|
"spv.ext.ShaderTileImage.typemismatch.frag",
|
||||||
|
"spv.ext.ShaderTileImage.overlap.frag",
|
||||||
|
"spv.ext.ShaderTileImage.wronglayout.frag",
|
||||||
"spv.extPostDepthCoverage.frag",
|
"spv.extPostDepthCoverage.frag",
|
||||||
"spv.extPostDepthCoverage_Error.frag",
|
"spv.extPostDepthCoverage_Error.frag",
|
||||||
"spv.float16convertonlyarith.comp",
|
"spv.float16convertonlyarith.comp",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user