Add built-in constants through version 440. Some still need to be consumed when initializing the symbol table.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23634 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
c78a126ba6
commit
284231c9c5
@ -107,37 +107,95 @@ std::string ConfigFile;
|
|||||||
// - parsing this string for the case where the user didn't supply one
|
// - parsing this string for the case where the user didn't supply one
|
||||||
// - dumping out a template for user construction of a config file
|
// - dumping out a template for user construction of a config file
|
||||||
//
|
//
|
||||||
const char* DefaultConfig =
|
const char* DefaultConfig =
|
||||||
"MaxLights 32\n"
|
"MaxLights 32\n"
|
||||||
"MaxClipPlanes 6\n"
|
"MaxClipPlanes 6\n"
|
||||||
"MaxTextureUnits 32\n"
|
"MaxTextureUnits 32\n"
|
||||||
"MaxTextureCoords 32\n"
|
"MaxTextureCoords 32\n"
|
||||||
"MaxVertexAttribs 64\n"
|
"MaxVertexAttribs 64\n"
|
||||||
"MaxVertexUniformComponents 4096\n"
|
"MaxVertexUniformComponents 4096\n"
|
||||||
"MaxVaryingFloats 64\n"
|
"MaxVaryingFloats 64\n"
|
||||||
"MaxVertexTextureImageUnits 32\n"
|
"MaxVertexTextureImageUnits 32\n"
|
||||||
"MaxCombinedTextureImageUnits 32\n"
|
"MaxCombinedTextureImageUnits 32\n"
|
||||||
"MaxTextureImageUnits 32\n"
|
"MaxTextureImageUnits 32\n"
|
||||||
"MaxFragmentUniformComponents 4096\n"
|
"MaxFragmentUniformComponents 4096\n"
|
||||||
"MaxDrawBuffers 32\n"
|
"MaxDrawBuffers 32\n"
|
||||||
"MaxVertexUniformVectors 128\n"
|
"MaxVertexUniformVectors 128\n"
|
||||||
"MaxVaryingVectors 8\n"
|
"MaxVaryingVectors 8\n"
|
||||||
"MaxFragmentUniformVectors 16\n"
|
"MaxFragmentUniformVectors 16\n"
|
||||||
"MaxVertexOutputVectors 16\n"
|
"MaxVertexOutputVectors 16\n"
|
||||||
"MaxFragmentInputVectors 15\n"
|
"MaxFragmentInputVectors 15\n"
|
||||||
"MinProgramTexelOffset -8\n"
|
"MinProgramTexelOffset -8\n"
|
||||||
"MaxProgramTexelOffset 7\n"
|
"MaxProgramTexelOffset 7\n"
|
||||||
"MaxClipDistances 8\n"
|
"MaxClipDistances 8\n"
|
||||||
"nonInductiveForLoops 1\n"
|
"MaxComputeWorkGroupCountX 65535\n"
|
||||||
"whileLoops 1\n"
|
"MaxComputeWorkGroupCountY 65535\n"
|
||||||
"doWhileLoops 1\n"
|
"MaxComputeWorkGroupCountZ 65535\n"
|
||||||
"generalUniformIndexing 1\n"
|
"MaxComputeWorkGroupSizeX 1024\n"
|
||||||
"generalAttributeMatrixVectorIndexing 1\n"
|
"MaxComputeWorkGroupSizeX 1024\n"
|
||||||
"generalVaryingIndexing 1\n"
|
"MaxComputeWorkGroupSizeZ 64\n"
|
||||||
"generalSamplerIndexing 1\n"
|
"MaxComputeUniformComponents 1024\n"
|
||||||
"generalVariableIndexing 1\n"
|
"MaxComputeTextureImageUnits 16\n"
|
||||||
"generalConstantMatrixVectorIndexing 1\n"
|
"MaxComputeImageUniforms 8\n"
|
||||||
;
|
"MaxComputeAtomicCounters 8\n"
|
||||||
|
"MaxComputeAtomicCounterBuffers 1\n"
|
||||||
|
"MaxVaryingComponents 60\n"
|
||||||
|
"MaxVertexOutputComponents 64\n"
|
||||||
|
"MaxGeometryInputComponents 64\n"
|
||||||
|
"MaxGeometryOutputComponents 128\n"
|
||||||
|
"MaxFragmentInputComponents 128\n"
|
||||||
|
"MaxImageUnits 8\n"
|
||||||
|
"MaxCombinedImageUnitsAndFragmentOutputs 8\n"
|
||||||
|
"MaxImageSamples 0\n"
|
||||||
|
"MaxVertexImageUniforms 0\n"
|
||||||
|
"MaxTessControlImageUniforms 0\n"
|
||||||
|
"MaxTessEvaluationImageUniforms 0\n"
|
||||||
|
"MaxGeometryImageUniforms 0\n"
|
||||||
|
"MaxFragmentImageUniforms 8\n"
|
||||||
|
"MaxCombinedImageUniforms 8\n"
|
||||||
|
"MaxGeometryTextureImageUnits 16\n"
|
||||||
|
"MaxGeometryOutputVertices 256\n"
|
||||||
|
"MaxGeometryTotalOutputComponents 1024\n"
|
||||||
|
"MaxGeometryUniformComponents 1024\n"
|
||||||
|
"MaxGeometryVaryingComponents 64\n"
|
||||||
|
"MaxTessControlInputComponents 128\n"
|
||||||
|
"MaxTessControlOutputComponents 128\n"
|
||||||
|
"MaxTessControlTextureImageUnits 16\n"
|
||||||
|
"MaxTessControlUniformComponents 1024\n"
|
||||||
|
"MaxTessControlTotalOutputComponents 4096\n"
|
||||||
|
"MaxTessEvaluationInputComponents 128\n"
|
||||||
|
"MaxTessEvaluationOutputComponents 128\n"
|
||||||
|
"MaxTessEvaluationTextureImageUnits 16\n"
|
||||||
|
"MaxTessEvaluationUniformComponents 1024\n"
|
||||||
|
"MaxTessPatchComponents 120\n"
|
||||||
|
"MaxPatchVertices 32\n"
|
||||||
|
"MaxTessGenLevel 64\n"
|
||||||
|
"MaxViewports 16\n"
|
||||||
|
"MaxVertexAtomicCounters 0\n"
|
||||||
|
"MaxTessControlAtomicCounters 0\n"
|
||||||
|
"MaxTessEvaluationAtomicCounters 0\n"
|
||||||
|
"MaxGeometryAtomicCounters 0\n"
|
||||||
|
"MaxFragmentAtomicCounters 8\n"
|
||||||
|
"MaxCombinedAtomicCounters 8\n"
|
||||||
|
"MaxAtomicCounterBindings 1\n"
|
||||||
|
"MaxVertexAtomicCounterBuffers 0\n"
|
||||||
|
"MaxTessControlAtomicCounterBuffers 0\n"
|
||||||
|
"MaxTessEvaluationAtomicCounterBuffers 0\n"
|
||||||
|
"MaxGeometryAtomicCounterBuffers 0\n"
|
||||||
|
"MaxFragmentAtomicCounterBuffers 1\n"
|
||||||
|
"MaxCombinedAtomicCounterBuffers 1\n"
|
||||||
|
"MaxAtomicCounterBufferSize 16384\n"
|
||||||
|
|
||||||
|
"nonInductiveForLoops 1\n"
|
||||||
|
"whileLoops 1\n"
|
||||||
|
"doWhileLoops 1\n"
|
||||||
|
"generalUniformIndexing 1\n"
|
||||||
|
"generalAttributeMatrixVectorIndexing 1\n"
|
||||||
|
"generalVaryingIndexing 1\n"
|
||||||
|
"generalSamplerIndexing 1\n"
|
||||||
|
"generalVariableIndexing 1\n"
|
||||||
|
"generalConstantMatrixVectorIndexing 1\n"
|
||||||
|
;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Parse either a .conf file provided by the user or the default string above.
|
// Parse either a .conf file provided by the user or the default string above.
|
||||||
@ -211,6 +269,121 @@ void ProcessConfigFile()
|
|||||||
Resources.maxProgramTexelOffset = value;
|
Resources.maxProgramTexelOffset = value;
|
||||||
else if (strcmp(token, "MaxClipDistances") == 0)
|
else if (strcmp(token, "MaxClipDistances") == 0)
|
||||||
Resources.maxClipDistances = value;
|
Resources.maxClipDistances = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupCountX") == 0)
|
||||||
|
Resources.maxComputeWorkGroupCountX = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupCountY") == 0)
|
||||||
|
Resources.maxComputeWorkGroupCountY = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupCountZ") == 0)
|
||||||
|
Resources.maxComputeWorkGroupCountZ = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupSizeX") == 0)
|
||||||
|
Resources.maxComputeWorkGroupSizeX = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupSizeY") == 0)
|
||||||
|
Resources.maxComputeWorkGroupSizeY = value;
|
||||||
|
else if (strcmp(token, "MaxComputeWorkGroupSizeZ") == 0)
|
||||||
|
Resources.maxComputeWorkGroupSizeZ = value;
|
||||||
|
else if (strcmp(token, "MaxComputeUniformComponents") == 0)
|
||||||
|
Resources.maxComputeUniformComponents = value;
|
||||||
|
else if (strcmp(token, "MaxComputeTextureImageUnits") == 0)
|
||||||
|
Resources.maxComputeTextureImageUnits = value;
|
||||||
|
else if (strcmp(token, "MaxComputeImageUniforms") == 0)
|
||||||
|
Resources.maxComputeImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxComputeAtomicCounters") == 0)
|
||||||
|
Resources.maxComputeAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxComputeAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxComputeAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxVaryingComponents") == 0)
|
||||||
|
Resources.maxVaryingComponents = value;
|
||||||
|
else if (strcmp(token, "MaxVertexOutputComponents") == 0)
|
||||||
|
Resources.maxVertexOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryInputComponents") == 0)
|
||||||
|
Resources.maxGeometryInputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryOutputComponents") == 0)
|
||||||
|
Resources.maxGeometryOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxFragmentInputComponents") == 0)
|
||||||
|
Resources.maxFragmentInputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxImageUnits") == 0)
|
||||||
|
Resources.maxImageUnits = value;
|
||||||
|
else if (strcmp(token, "MaxCombinedImageUnitsAndFragmentOutputs") == 0)
|
||||||
|
Resources.maxCombinedImageUnitsAndFragmentOutputs = value;
|
||||||
|
else if (strcmp(token, "MaxImageSamples") == 0)
|
||||||
|
Resources.maxImageSamples = value;
|
||||||
|
else if (strcmp(token, "MaxVertexImageUniforms") == 0)
|
||||||
|
Resources.maxVertexImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlImageUniforms") == 0)
|
||||||
|
Resources.maxTessControlImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationImageUniforms") == 0)
|
||||||
|
Resources.maxTessEvaluationImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryImageUniforms") == 0)
|
||||||
|
Resources.maxGeometryImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxFragmentImageUniforms") == 0)
|
||||||
|
Resources.maxFragmentImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxCombinedImageUniforms") == 0)
|
||||||
|
Resources.maxCombinedImageUniforms = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryTextureImageUnits") == 0)
|
||||||
|
Resources.maxGeometryTextureImageUnits = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryOutputVertices") == 0)
|
||||||
|
Resources.maxGeometryOutputVertices = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryTotalOutputComponents") == 0)
|
||||||
|
Resources.maxGeometryTotalOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryUniformComponents") == 0)
|
||||||
|
Resources.maxGeometryUniformComponents = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryVaryingComponents") == 0)
|
||||||
|
Resources.maxGeometryVaryingComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlInputComponents") == 0)
|
||||||
|
Resources.maxTessControlInputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlOutputComponents") == 0)
|
||||||
|
Resources.maxTessControlOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlTextureImageUnits") == 0)
|
||||||
|
Resources.maxTessControlTextureImageUnits = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlUniformComponents") == 0)
|
||||||
|
Resources.maxTessControlUniformComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlTotalOutputComponents") == 0)
|
||||||
|
Resources.maxTessControlTotalOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationInputComponents") == 0)
|
||||||
|
Resources.maxTessEvaluationInputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationOutputComponents") == 0)
|
||||||
|
Resources.maxTessEvaluationOutputComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationTextureImageUnits") == 0)
|
||||||
|
Resources.maxTessEvaluationTextureImageUnits = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationUniformComponents") == 0)
|
||||||
|
Resources.maxTessEvaluationUniformComponents = value;
|
||||||
|
else if (strcmp(token, "MaxTessPatchComponents") == 0)
|
||||||
|
Resources.maxTessPatchComponents = value;
|
||||||
|
else if (strcmp(token, "MaxPatchVertices") == 0)
|
||||||
|
Resources.maxPatchVertices = value;
|
||||||
|
else if (strcmp(token, "MaxTessGenLevel") == 0)
|
||||||
|
Resources.maxTessGenLevel = value;
|
||||||
|
else if (strcmp(token, "MaxViewports") == 0)
|
||||||
|
Resources.maxViewports = value;
|
||||||
|
else if (strcmp(token, "MaxVertexAtomicCounters") == 0)
|
||||||
|
Resources.maxVertexAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlAtomicCounters") == 0)
|
||||||
|
Resources.maxTessControlAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationAtomicCounters") == 0)
|
||||||
|
Resources.maxTessEvaluationAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryAtomicCounters") == 0)
|
||||||
|
Resources.maxGeometryAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxFragmentAtomicCounters") == 0)
|
||||||
|
Resources.maxFragmentAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxCombinedAtomicCounters") == 0)
|
||||||
|
Resources.maxCombinedAtomicCounters = value;
|
||||||
|
else if (strcmp(token, "MaxAtomicCounterBindings") == 0)
|
||||||
|
Resources.maxAtomicCounterBindings = value;
|
||||||
|
else if (strcmp(token, "MaxVertexAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxVertexAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxTessControlAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxTessControlAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxTessEvaluationAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxTessEvaluationAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxGeometryAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxGeometryAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxFragmentAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxFragmentAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxCombinedAtomicCounterBuffers") == 0)
|
||||||
|
Resources.maxCombinedAtomicCounterBuffers = value;
|
||||||
|
else if (strcmp(token, "MaxAtomicCounterBufferSize") == 0)
|
||||||
|
Resources.maxAtomicCounterBufferSize = value;
|
||||||
|
|
||||||
else if (strcmp(token, "nonInductiveForLoops") == 0)
|
else if (strcmp(token, "nonInductiveForLoops") == 0)
|
||||||
Resources.limits.nonInductiveForLoops = (value != 0);
|
Resources.limits.nonInductiveForLoops = (value != 0);
|
||||||
else if (strcmp(token, "whileLoops") == 0)
|
else if (strcmp(token, "whileLoops") == 0)
|
||||||
|
|||||||
@ -18,6 +18,63 @@ MaxFragmentInputVectors 15
|
|||||||
MinProgramTexelOffset -8
|
MinProgramTexelOffset -8
|
||||||
MaxProgramTexelOffset 7
|
MaxProgramTexelOffset 7
|
||||||
MaxClipDistances 8
|
MaxClipDistances 8
|
||||||
|
MaxComputeWorkGroupCountX 65535
|
||||||
|
MaxComputeWorkGroupCountY 65535
|
||||||
|
MaxComputeWorkGroupCountZ 65535
|
||||||
|
MaxComputeWorkGroupSizeX 1024
|
||||||
|
MaxComputeWorkGroupSizeX 1024
|
||||||
|
MaxComputeWorkGroupSizeZ 64
|
||||||
|
MaxComputeUniformComponents 1024
|
||||||
|
MaxComputeTextureImageUnits 16
|
||||||
|
MaxComputeImageUniforms 8
|
||||||
|
MaxComputeAtomicCounters 8
|
||||||
|
MaxComputeAtomicCounterBuffers 1
|
||||||
|
MaxVaryingComponents 60
|
||||||
|
MaxVertexOutputComponents 64
|
||||||
|
MaxGeometryInputComponents 64
|
||||||
|
MaxGeometryOutputComponents 128
|
||||||
|
MaxFragmentInputComponents 128
|
||||||
|
MaxImageUnits 8
|
||||||
|
MaxCombinedImageUnitsAndFragmentOutputs 8
|
||||||
|
MaxImageSamples 0
|
||||||
|
MaxVertexImageUniforms 0
|
||||||
|
MaxTessControlImageUniforms 0
|
||||||
|
MaxTessEvaluationImageUniforms 0
|
||||||
|
MaxGeometryImageUniforms 0
|
||||||
|
MaxFragmentImageUniforms 8
|
||||||
|
MaxCombinedImageUniforms 8
|
||||||
|
MaxGeometryTextureImageUnits 16
|
||||||
|
MaxGeometryOutputVertices 256
|
||||||
|
MaxGeometryTotalOutputComponents 1024
|
||||||
|
MaxGeometryUniformComponents 1024
|
||||||
|
MaxGeometryVaryingComponents 64
|
||||||
|
MaxTessControlInputComponents 128
|
||||||
|
MaxTessControlOutputComponents 128
|
||||||
|
MaxTessControlTextureImageUnits 16
|
||||||
|
MaxTessControlUniformComponents 1024
|
||||||
|
MaxTessControlTotalOutputComponents 4096
|
||||||
|
MaxTessEvaluationInputComponents 128
|
||||||
|
MaxTessEvaluationOutputComponents 128
|
||||||
|
MaxTessEvaluationTextureImageUnits 16
|
||||||
|
MaxTessEvaluationUniformComponents 1024
|
||||||
|
MaxTessPatchComponents 120
|
||||||
|
MaxPatchVertices 32
|
||||||
|
MaxTessGenLevel 64
|
||||||
|
MaxViewports 16
|
||||||
|
MaxVertexAtomicCounters 0
|
||||||
|
MaxTessControlAtomicCounters 0
|
||||||
|
MaxTessEvaluationAtomicCounters 0
|
||||||
|
MaxGeometryAtomicCounters 0
|
||||||
|
MaxFragmentAtomicCounters 8
|
||||||
|
MaxCombinedAtomicCounters 8
|
||||||
|
MaxAtomicCounterBindings 1
|
||||||
|
MaxVertexAtomicCounterBuffers 0
|
||||||
|
MaxTessControlAtomicCounterBuffers 0
|
||||||
|
MaxTessEvaluationAtomicCounterBuffers 0
|
||||||
|
MaxGeometryAtomicCounterBuffers 0
|
||||||
|
MaxFragmentAtomicCounterBuffers 1
|
||||||
|
MaxCombinedAtomicCounterBuffers 1
|
||||||
|
MaxAtomicCounterBufferSize 16384
|
||||||
nonInductiveForLoops 1
|
nonInductiveForLoops 1
|
||||||
whileLoops 1
|
whileLoops 1
|
||||||
doWhileLoops 1
|
doWhileLoops 1
|
||||||
|
|||||||
@ -70,6 +70,64 @@ struct TBuiltInResource {
|
|||||||
int minProgramTexelOffset;
|
int minProgramTexelOffset;
|
||||||
int maxProgramTexelOffset;
|
int maxProgramTexelOffset;
|
||||||
int maxClipDistances;
|
int maxClipDistances;
|
||||||
|
int maxComputeWorkGroupCountX;
|
||||||
|
int maxComputeWorkGroupCountY;
|
||||||
|
int maxComputeWorkGroupCountZ;
|
||||||
|
int maxComputeWorkGroupSizeX;
|
||||||
|
int maxComputeWorkGroupSizeY;
|
||||||
|
int maxComputeWorkGroupSizeZ;
|
||||||
|
int maxComputeUniformComponents;
|
||||||
|
int maxComputeTextureImageUnits;
|
||||||
|
int maxComputeImageUniforms;
|
||||||
|
int maxComputeAtomicCounters;
|
||||||
|
int maxComputeAtomicCounterBuffers;
|
||||||
|
int maxVaryingComponents;
|
||||||
|
int maxVertexOutputComponents;
|
||||||
|
int maxGeometryInputComponents;
|
||||||
|
int maxGeometryOutputComponents;
|
||||||
|
int maxFragmentInputComponents;
|
||||||
|
int maxImageUnits;
|
||||||
|
int maxCombinedImageUnitsAndFragmentOutputs;
|
||||||
|
int maxImageSamples;
|
||||||
|
int maxVertexImageUniforms;
|
||||||
|
int maxTessControlImageUniforms;
|
||||||
|
int maxTessEvaluationImageUniforms;
|
||||||
|
int maxGeometryImageUniforms;
|
||||||
|
int maxFragmentImageUniforms;
|
||||||
|
int maxCombinedImageUniforms;
|
||||||
|
int maxGeometryTextureImageUnits;
|
||||||
|
int maxGeometryOutputVertices;
|
||||||
|
int maxGeometryTotalOutputComponents;
|
||||||
|
int maxGeometryUniformComponents;
|
||||||
|
int maxGeometryVaryingComponents;
|
||||||
|
int maxTessControlInputComponents;
|
||||||
|
int maxTessControlOutputComponents;
|
||||||
|
int maxTessControlTextureImageUnits;
|
||||||
|
int maxTessControlUniformComponents;
|
||||||
|
int maxTessControlTotalOutputComponents;
|
||||||
|
int maxTessEvaluationInputComponents;
|
||||||
|
int maxTessEvaluationOutputComponents;
|
||||||
|
int maxTessEvaluationTextureImageUnits;
|
||||||
|
int maxTessEvaluationUniformComponents;
|
||||||
|
int maxTessPatchComponents;
|
||||||
|
int maxPatchVertices;
|
||||||
|
int maxTessGenLevel;
|
||||||
|
int maxViewports;
|
||||||
|
int maxVertexAtomicCounters;
|
||||||
|
int maxTessControlAtomicCounters;
|
||||||
|
int maxTessEvaluationAtomicCounters;
|
||||||
|
int maxGeometryAtomicCounters;
|
||||||
|
int maxFragmentAtomicCounters;
|
||||||
|
int maxCombinedAtomicCounters;
|
||||||
|
int maxAtomicCounterBindings;
|
||||||
|
int maxVertexAtomicCounterBuffers;
|
||||||
|
int maxTessControlAtomicCounterBuffers;
|
||||||
|
int maxTessEvaluationAtomicCounterBuffers;
|
||||||
|
int maxGeometryAtomicCounterBuffers;
|
||||||
|
int maxFragmentAtomicCounterBuffers;
|
||||||
|
int maxCombinedAtomicCounterBuffers;
|
||||||
|
int maxAtomicCounterBufferSize;
|
||||||
|
|
||||||
TLimits limits;
|
TLimits limits;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1941,8 +1941,110 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||||||
if (version >= 130) {
|
if (version >= 130) {
|
||||||
snprintf(builtInConstant, maxSize, "const int gl_MaxClipDistances = %d;", resources.maxClipDistances);
|
snprintf(builtInConstant, maxSize, "const int gl_MaxClipDistances = %d;", resources.maxClipDistances);
|
||||||
s.append(builtInConstant);
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingComponents = %d;", resources.maxVaryingComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
// geometry
|
||||||
|
if (version >= 150) {
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryInputComponents = %d;", resources.maxGeometryInputComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputComponents = %d;", resources.maxGeometryOutputComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryOutputVertices = %d;", resources.maxGeometryOutputVertices);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTotalOutputComponents = %d;", resources.maxGeometryTotalOutputComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryUniformComponents = %d;", resources.maxGeometryUniformComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryVaryingComponents = %d;", resources.maxGeometryVaryingComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (version >= 150) {
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexOutputComponents = %d;", resources.maxVertexOutputComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentInputComponents = %d;", resources.maxFragmentInputComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
// tessellation
|
||||||
|
if (version >= 400) {
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlInputComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlOutputComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlUniformComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTotalOutputComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationInputComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationOutputComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationUniformComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessPatchComponents = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessGenLevel = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxPatchVertices = %d;", resources.);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (version >= 410) {
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxViewports = %d;", resources.maxViewports);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
// atomic counters
|
||||||
|
if (version >= 420) {
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounters = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBindings = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxVertexAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedAtomicCounterBuffers = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxAtomicCounterBufferSize = %d;", resources.);
|
||||||
|
}
|
||||||
|
|
||||||
|
// images
|
||||||
|
if (version >= 420) {
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryImageUniforms = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxGeometryTextureImageUnits = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlImageUniforms = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationImageUniforms = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessControlTextureImageUnits = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxTessEvaluationTextureImageUnits = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxImageUnits = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUnitsAndFragmentOutputs = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxImageSamples = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxVertexImageUniforms = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentImageUniforms = %d;", resources.);
|
||||||
|
//snprintf(builtInConstant, maxSize, "const int gl_MaxCombinedImageUniforms = %d;", resources.);
|
||||||
|
}
|
||||||
|
|
||||||
|
// compute
|
||||||
|
if (version >= 430) {
|
||||||
|
snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupCount = {%d,%d,%d};", resources.maxComputeWorkGroupCountX,
|
||||||
|
resources.maxComputeWorkGroupCountY,
|
||||||
|
resources.maxComputeWorkGroupCountZ);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupSize = {%d,%d,%d};", resources.maxComputeWorkGroupSizeX,
|
||||||
|
resources.maxComputeWorkGroupSizeY,
|
||||||
|
resources.maxComputeWorkGroupSizeZ);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeUniformComponents = %d;", resources.maxComputeUniformComponents);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeTextureImageUnits = %d;", resources.maxComputeTextureImageUnits);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeImageUniforms = %d;", resources.maxComputeImageUniforms);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounters = %d;", resources.maxComputeAtomicCounters);
|
||||||
|
s.append(builtInConstant);
|
||||||
|
snprintf(builtInConstant, maxSize, "const int gl_MaxComputeAtomicCounterBuffers = %d;", resources.maxComputeAtomicCounterBuffers);
|
||||||
|
s.append(builtInConstant);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s.append("\n");
|
s.append("\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user