2016-06-26 05:06:20 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 2016 Google, Inc.
|
|
|
|
//
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions
|
|
|
|
// are met:
|
|
|
|
//
|
|
|
|
// Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
//
|
|
|
|
// Redistributions in binary form must reproduce the above
|
|
|
|
// copyright notice, this list of conditions and the following
|
|
|
|
// disclaimer in the documentation and/or other materials provided
|
|
|
|
// with the distribution.
|
|
|
|
//
|
|
|
|
// Neither the name of Google Inc. nor the names of its
|
|
|
|
// contributors may be used to endorse or promote products derived
|
|
|
|
// from this software without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstring>
|
|
|
|
#include <sstream>
|
2018-06-02 07:26:43 +00:00
|
|
|
#include <cctype>
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
#include "ResourceLimits.h"
|
|
|
|
|
|
|
|
namespace glslang {
|
|
|
|
|
|
|
|
const TBuiltInResource DefaultTBuiltInResource = {
|
|
|
|
/* .MaxLights = */ 32,
|
|
|
|
/* .MaxClipPlanes = */ 6,
|
|
|
|
/* .MaxTextureUnits = */ 32,
|
|
|
|
/* .MaxTextureCoords = */ 32,
|
|
|
|
/* .MaxVertexAttribs = */ 64,
|
|
|
|
/* .MaxVertexUniformComponents = */ 4096,
|
|
|
|
/* .MaxVaryingFloats = */ 64,
|
|
|
|
/* .MaxVertexTextureImageUnits = */ 32,
|
|
|
|
/* .MaxCombinedTextureImageUnits = */ 80,
|
|
|
|
/* .MaxTextureImageUnits = */ 32,
|
|
|
|
/* .MaxFragmentUniformComponents = */ 4096,
|
|
|
|
/* .MaxDrawBuffers = */ 32,
|
|
|
|
/* .MaxVertexUniformVectors = */ 128,
|
|
|
|
/* .MaxVaryingVectors = */ 8,
|
|
|
|
/* .MaxFragmentUniformVectors = */ 16,
|
|
|
|
/* .MaxVertexOutputVectors = */ 16,
|
|
|
|
/* .MaxFragmentInputVectors = */ 15,
|
|
|
|
/* .MinProgramTexelOffset = */ -8,
|
|
|
|
/* .MaxProgramTexelOffset = */ 7,
|
|
|
|
/* .MaxClipDistances = */ 8,
|
|
|
|
/* .MaxComputeWorkGroupCountX = */ 65535,
|
|
|
|
/* .MaxComputeWorkGroupCountY = */ 65535,
|
|
|
|
/* .MaxComputeWorkGroupCountZ = */ 65535,
|
|
|
|
/* .MaxComputeWorkGroupSizeX = */ 1024,
|
|
|
|
/* .MaxComputeWorkGroupSizeY = */ 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,
|
|
|
|
/* .MaxCombinedShaderOutputResources = */ 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,
|
|
|
|
/* .MaxTransformFeedbackBuffers = */ 4,
|
|
|
|
/* .MaxTransformFeedbackInterleavedComponents = */ 64,
|
|
|
|
/* .MaxCullDistances = */ 8,
|
|
|
|
/* .MaxCombinedClipAndCullDistances = */ 8,
|
|
|
|
/* .MaxSamples = */ 4,
|
2020-03-02 15:42:00 +00:00
|
|
|
/* .maxMeshOutputVerticesNV = */ 256,
|
|
|
|
/* .maxMeshOutputPrimitivesNV = */ 512,
|
|
|
|
/* .maxMeshWorkGroupSizeX_NV = */ 32,
|
|
|
|
/* .maxMeshWorkGroupSizeY_NV = */ 1,
|
|
|
|
/* .maxMeshWorkGroupSizeZ_NV = */ 1,
|
|
|
|
/* .maxTaskWorkGroupSizeX_NV = */ 32,
|
|
|
|
/* .maxTaskWorkGroupSizeY_NV = */ 1,
|
|
|
|
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
|
|
|
|
/* .maxMeshViewCountNV = */ 4,
|
2022-04-30 05:37:59 +00:00
|
|
|
/* .maxDualSourceDrawBuffersEXT = */ 1,
|
2020-03-02 15:42:00 +00:00
|
|
|
|
2016-06-26 05:06:20 +00:00
|
|
|
/* .limits = */ {
|
|
|
|
/* .nonInductiveForLoops = */ 1,
|
|
|
|
/* .whileLoops = */ 1,
|
|
|
|
/* .doWhileLoops = */ 1,
|
|
|
|
/* .generalUniformIndexing = */ 1,
|
|
|
|
/* .generalAttributeMatrixVectorIndexing = */ 1,
|
|
|
|
/* .generalVaryingIndexing = */ 1,
|
|
|
|
/* .generalSamplerIndexing = */ 1,
|
|
|
|
/* .generalVariableIndexing = */ 1,
|
|
|
|
/* .generalConstantMatrixVectorIndexing = */ 1,
|
|
|
|
}};
|
|
|
|
|
|
|
|
std::string GetDefaultTBuiltInResourceString()
|
|
|
|
{
|
|
|
|
std::ostringstream ostream;
|
|
|
|
|
|
|
|
ostream << "MaxLights " << DefaultTBuiltInResource.maxLights << "\n"
|
|
|
|
<< "MaxClipPlanes " << DefaultTBuiltInResource.maxClipPlanes << "\n"
|
|
|
|
<< "MaxTextureUnits " << DefaultTBuiltInResource.maxTextureUnits << "\n"
|
|
|
|
<< "MaxTextureCoords " << DefaultTBuiltInResource.maxTextureCoords << "\n"
|
|
|
|
<< "MaxVertexAttribs " << DefaultTBuiltInResource.maxVertexAttribs << "\n"
|
|
|
|
<< "MaxVertexUniformComponents " << DefaultTBuiltInResource.maxVertexUniformComponents << "\n"
|
|
|
|
<< "MaxVaryingFloats " << DefaultTBuiltInResource.maxVaryingFloats << "\n"
|
|
|
|
<< "MaxVertexTextureImageUnits " << DefaultTBuiltInResource.maxVertexTextureImageUnits << "\n"
|
|
|
|
<< "MaxCombinedTextureImageUnits " << DefaultTBuiltInResource.maxCombinedTextureImageUnits << "\n"
|
|
|
|
<< "MaxTextureImageUnits " << DefaultTBuiltInResource.maxTextureImageUnits << "\n"
|
|
|
|
<< "MaxFragmentUniformComponents " << DefaultTBuiltInResource.maxFragmentUniformComponents << "\n"
|
|
|
|
<< "MaxDrawBuffers " << DefaultTBuiltInResource.maxDrawBuffers << "\n"
|
|
|
|
<< "MaxVertexUniformVectors " << DefaultTBuiltInResource.maxVertexUniformVectors << "\n"
|
|
|
|
<< "MaxVaryingVectors " << DefaultTBuiltInResource.maxVaryingVectors << "\n"
|
|
|
|
<< "MaxFragmentUniformVectors " << DefaultTBuiltInResource.maxFragmentUniformVectors << "\n"
|
|
|
|
<< "MaxVertexOutputVectors " << DefaultTBuiltInResource.maxVertexOutputVectors << "\n"
|
|
|
|
<< "MaxFragmentInputVectors " << DefaultTBuiltInResource.maxFragmentInputVectors << "\n"
|
|
|
|
<< "MinProgramTexelOffset " << DefaultTBuiltInResource.minProgramTexelOffset << "\n"
|
|
|
|
<< "MaxProgramTexelOffset " << DefaultTBuiltInResource.maxProgramTexelOffset << "\n"
|
|
|
|
<< "MaxClipDistances " << DefaultTBuiltInResource.maxClipDistances << "\n"
|
|
|
|
<< "MaxComputeWorkGroupCountX " << DefaultTBuiltInResource.maxComputeWorkGroupCountX << "\n"
|
|
|
|
<< "MaxComputeWorkGroupCountY " << DefaultTBuiltInResource.maxComputeWorkGroupCountY << "\n"
|
|
|
|
<< "MaxComputeWorkGroupCountZ " << DefaultTBuiltInResource.maxComputeWorkGroupCountZ << "\n"
|
|
|
|
<< "MaxComputeWorkGroupSizeX " << DefaultTBuiltInResource.maxComputeWorkGroupSizeX << "\n"
|
|
|
|
<< "MaxComputeWorkGroupSizeY " << DefaultTBuiltInResource.maxComputeWorkGroupSizeY << "\n"
|
|
|
|
<< "MaxComputeWorkGroupSizeZ " << DefaultTBuiltInResource.maxComputeWorkGroupSizeZ << "\n"
|
|
|
|
<< "MaxComputeUniformComponents " << DefaultTBuiltInResource.maxComputeUniformComponents << "\n"
|
|
|
|
<< "MaxComputeTextureImageUnits " << DefaultTBuiltInResource.maxComputeTextureImageUnits << "\n"
|
|
|
|
<< "MaxComputeImageUniforms " << DefaultTBuiltInResource.maxComputeImageUniforms << "\n"
|
|
|
|
<< "MaxComputeAtomicCounters " << DefaultTBuiltInResource.maxComputeAtomicCounters << "\n"
|
|
|
|
<< "MaxComputeAtomicCounterBuffers " << DefaultTBuiltInResource.maxComputeAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxVaryingComponents " << DefaultTBuiltInResource.maxVaryingComponents << "\n"
|
|
|
|
<< "MaxVertexOutputComponents " << DefaultTBuiltInResource.maxVertexOutputComponents << "\n"
|
|
|
|
<< "MaxGeometryInputComponents " << DefaultTBuiltInResource.maxGeometryInputComponents << "\n"
|
|
|
|
<< "MaxGeometryOutputComponents " << DefaultTBuiltInResource.maxGeometryOutputComponents << "\n"
|
|
|
|
<< "MaxFragmentInputComponents " << DefaultTBuiltInResource.maxFragmentInputComponents << "\n"
|
|
|
|
<< "MaxImageUnits " << DefaultTBuiltInResource.maxImageUnits << "\n"
|
|
|
|
<< "MaxCombinedImageUnitsAndFragmentOutputs " << DefaultTBuiltInResource.maxCombinedImageUnitsAndFragmentOutputs << "\n"
|
|
|
|
<< "MaxCombinedShaderOutputResources " << DefaultTBuiltInResource.maxCombinedShaderOutputResources << "\n"
|
|
|
|
<< "MaxImageSamples " << DefaultTBuiltInResource.maxImageSamples << "\n"
|
|
|
|
<< "MaxVertexImageUniforms " << DefaultTBuiltInResource.maxVertexImageUniforms << "\n"
|
|
|
|
<< "MaxTessControlImageUniforms " << DefaultTBuiltInResource.maxTessControlImageUniforms << "\n"
|
|
|
|
<< "MaxTessEvaluationImageUniforms " << DefaultTBuiltInResource.maxTessEvaluationImageUniforms << "\n"
|
|
|
|
<< "MaxGeometryImageUniforms " << DefaultTBuiltInResource.maxGeometryImageUniforms << "\n"
|
|
|
|
<< "MaxFragmentImageUniforms " << DefaultTBuiltInResource.maxFragmentImageUniforms << "\n"
|
|
|
|
<< "MaxCombinedImageUniforms " << DefaultTBuiltInResource.maxCombinedImageUniforms << "\n"
|
|
|
|
<< "MaxGeometryTextureImageUnits " << DefaultTBuiltInResource.maxGeometryTextureImageUnits << "\n"
|
|
|
|
<< "MaxGeometryOutputVertices " << DefaultTBuiltInResource.maxGeometryOutputVertices << "\n"
|
|
|
|
<< "MaxGeometryTotalOutputComponents " << DefaultTBuiltInResource.maxGeometryTotalOutputComponents << "\n"
|
|
|
|
<< "MaxGeometryUniformComponents " << DefaultTBuiltInResource.maxGeometryUniformComponents << "\n"
|
|
|
|
<< "MaxGeometryVaryingComponents " << DefaultTBuiltInResource.maxGeometryVaryingComponents << "\n"
|
|
|
|
<< "MaxTessControlInputComponents " << DefaultTBuiltInResource.maxTessControlInputComponents << "\n"
|
|
|
|
<< "MaxTessControlOutputComponents " << DefaultTBuiltInResource.maxTessControlOutputComponents << "\n"
|
|
|
|
<< "MaxTessControlTextureImageUnits " << DefaultTBuiltInResource.maxTessControlTextureImageUnits << "\n"
|
|
|
|
<< "MaxTessControlUniformComponents " << DefaultTBuiltInResource.maxTessControlUniformComponents << "\n"
|
|
|
|
<< "MaxTessControlTotalOutputComponents " << DefaultTBuiltInResource.maxTessControlTotalOutputComponents << "\n"
|
|
|
|
<< "MaxTessEvaluationInputComponents " << DefaultTBuiltInResource.maxTessEvaluationInputComponents << "\n"
|
|
|
|
<< "MaxTessEvaluationOutputComponents " << DefaultTBuiltInResource.maxTessEvaluationOutputComponents << "\n"
|
|
|
|
<< "MaxTessEvaluationTextureImageUnits " << DefaultTBuiltInResource.maxTessEvaluationTextureImageUnits << "\n"
|
|
|
|
<< "MaxTessEvaluationUniformComponents " << DefaultTBuiltInResource.maxTessEvaluationUniformComponents << "\n"
|
|
|
|
<< "MaxTessPatchComponents " << DefaultTBuiltInResource.maxTessPatchComponents << "\n"
|
|
|
|
<< "MaxPatchVertices " << DefaultTBuiltInResource.maxPatchVertices << "\n"
|
|
|
|
<< "MaxTessGenLevel " << DefaultTBuiltInResource.maxTessGenLevel << "\n"
|
|
|
|
<< "MaxViewports " << DefaultTBuiltInResource.maxViewports << "\n"
|
|
|
|
<< "MaxVertexAtomicCounters " << DefaultTBuiltInResource.maxVertexAtomicCounters << "\n"
|
|
|
|
<< "MaxTessControlAtomicCounters " << DefaultTBuiltInResource.maxTessControlAtomicCounters << "\n"
|
|
|
|
<< "MaxTessEvaluationAtomicCounters " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounters << "\n"
|
|
|
|
<< "MaxGeometryAtomicCounters " << DefaultTBuiltInResource.maxGeometryAtomicCounters << "\n"
|
|
|
|
<< "MaxFragmentAtomicCounters " << DefaultTBuiltInResource.maxFragmentAtomicCounters << "\n"
|
|
|
|
<< "MaxCombinedAtomicCounters " << DefaultTBuiltInResource.maxCombinedAtomicCounters << "\n"
|
|
|
|
<< "MaxAtomicCounterBindings " << DefaultTBuiltInResource.maxAtomicCounterBindings << "\n"
|
|
|
|
<< "MaxVertexAtomicCounterBuffers " << DefaultTBuiltInResource.maxVertexAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxTessControlAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessControlAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxTessEvaluationAtomicCounterBuffers " << DefaultTBuiltInResource.maxTessEvaluationAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxGeometryAtomicCounterBuffers " << DefaultTBuiltInResource.maxGeometryAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxFragmentAtomicCounterBuffers " << DefaultTBuiltInResource.maxFragmentAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxCombinedAtomicCounterBuffers " << DefaultTBuiltInResource.maxCombinedAtomicCounterBuffers << "\n"
|
|
|
|
<< "MaxAtomicCounterBufferSize " << DefaultTBuiltInResource.maxAtomicCounterBufferSize << "\n"
|
|
|
|
<< "MaxTransformFeedbackBuffers " << DefaultTBuiltInResource.maxTransformFeedbackBuffers << "\n"
|
|
|
|
<< "MaxTransformFeedbackInterleavedComponents " << DefaultTBuiltInResource.maxTransformFeedbackInterleavedComponents << "\n"
|
|
|
|
<< "MaxCullDistances " << DefaultTBuiltInResource.maxCullDistances << "\n"
|
|
|
|
<< "MaxCombinedClipAndCullDistances " << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
|
|
|
|
<< "MaxSamples " << DefaultTBuiltInResource.maxSamples << "\n"
|
2020-03-02 15:42:00 +00:00
|
|
|
<< "MaxMeshOutputVerticesNV " << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
|
|
|
|
<< "MaxMeshOutputPrimitivesNV " << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
|
|
|
|
<< "MaxMeshWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
|
|
|
|
<< "MaxMeshWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
|
|
|
|
<< "MaxMeshWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
|
|
|
|
<< "MaxTaskWorkGroupSizeX_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
|
|
|
|
<< "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
|
|
|
|
<< "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
|
|
|
|
<< "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
|
2022-04-30 05:37:59 +00:00
|
|
|
<< "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n"
|
2016-06-26 05:06:20 +00:00
|
|
|
<< "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
|
|
|
|
<< "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n"
|
|
|
|
<< "doWhileLoops " << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
|
|
|
|
<< "generalUniformIndexing " << DefaultTBuiltInResource.limits.generalUniformIndexing << "\n"
|
|
|
|
<< "generalAttributeMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalAttributeMatrixVectorIndexing << "\n"
|
|
|
|
<< "generalVaryingIndexing " << DefaultTBuiltInResource.limits.generalVaryingIndexing << "\n"
|
|
|
|
<< "generalSamplerIndexing " << DefaultTBuiltInResource.limits.generalSamplerIndexing << "\n"
|
|
|
|
<< "generalVariableIndexing " << DefaultTBuiltInResource.limits.generalVariableIndexing << "\n"
|
|
|
|
<< "generalConstantMatrixVectorIndexing " << DefaultTBuiltInResource.limits.generalConstantMatrixVectorIndexing << "\n"
|
|
|
|
;
|
|
|
|
|
|
|
|
return ostream.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DecodeResourceLimits(TBuiltInResource* resources, char* config)
|
|
|
|
{
|
2018-06-02 07:26:43 +00:00
|
|
|
static const char* delims = " \t\n\r";
|
|
|
|
|
|
|
|
size_t pos = 0;
|
|
|
|
std::string configStr(config);
|
|
|
|
|
|
|
|
while ((pos = configStr.find_first_not_of(delims, pos)) != std::string::npos) {
|
|
|
|
const size_t token_s = pos;
|
|
|
|
const size_t token_e = configStr.find_first_of(delims, token_s);
|
|
|
|
const size_t value_s = configStr.find_first_not_of(delims, token_e);
|
|
|
|
const size_t value_e = configStr.find_first_of(delims, value_s);
|
|
|
|
pos = value_e;
|
|
|
|
|
|
|
|
// Faster to use compare(), but prefering readability.
|
|
|
|
const std::string tokenStr = configStr.substr(token_s, token_e-token_s);
|
|
|
|
const std::string valueStr = configStr.substr(value_s, value_e-value_s);
|
|
|
|
|
|
|
|
if (value_s == std::string::npos || ! (valueStr[0] == '-' || isdigit(valueStr[0]))) {
|
|
|
|
printf("Error: '%s' bad .conf file. Each name must be followed by one number.\n",
|
|
|
|
valueStr.c_str());
|
2016-06-26 05:06:20 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-06-02 07:26:43 +00:00
|
|
|
const int value = std::atoi(valueStr.c_str());
|
|
|
|
|
|
|
|
if (tokenStr == "MaxLights")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxLights = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxClipPlanes")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxClipPlanes = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTextureUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTextureUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTextureCoords")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTextureCoords = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexAttribs")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexAttribs = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVaryingFloats")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVaryingFloats = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxDrawBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxDrawBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexUniformVectors")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexUniformVectors = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVaryingVectors")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVaryingVectors = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentUniformVectors")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentUniformVectors = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexOutputVectors")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexOutputVectors = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentInputVectors")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentInputVectors = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MinProgramTexelOffset")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->minProgramTexelOffset = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxProgramTexelOffset")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxProgramTexelOffset = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxClipDistances")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxClipDistances = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupCountX")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupCountX = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupCountY")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupCountY = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupCountZ")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupCountZ = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupSizeX")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupSizeX = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupSizeY")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupSizeY = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeWorkGroupSizeZ")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeWorkGroupSizeZ = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxComputeAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxComputeAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVaryingComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVaryingComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryInputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryInputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentInputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentInputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedImageUnitsAndFragmentOutputs")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedImageUnitsAndFragmentOutputs = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedShaderOutputResources")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedShaderOutputResources = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxImageSamples")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxImageSamples = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedImageUniforms")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedImageUniforms = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryOutputVertices")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryOutputVertices = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryTotalOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryTotalOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryVaryingComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryVaryingComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlInputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlInputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlTotalOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlTotalOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationInputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationInputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationOutputComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationOutputComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationTextureImageUnits")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationTextureImageUnits = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationUniformComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationUniformComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessPatchComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessPatchComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxPatchVertices")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxPatchVertices = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessGenLevel")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessGenLevel = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxViewports")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxViewports = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedAtomicCounters")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedAtomicCounters = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxAtomicCounterBindings")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxAtomicCounterBindings = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxVertexAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxVertexAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessControlAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessControlAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTessEvaluationAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTessEvaluationAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxGeometryAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxGeometryAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxFragmentAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxFragmentAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedAtomicCounterBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedAtomicCounterBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxAtomicCounterBufferSize")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxAtomicCounterBufferSize = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTransformFeedbackBuffers")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTransformFeedbackBuffers = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxTransformFeedbackInterleavedComponents")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxTransformFeedbackInterleavedComponents = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCullDistances")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCullDistances = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxCombinedClipAndCullDistances")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxCombinedClipAndCullDistances = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "MaxSamples")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->maxSamples = value;
|
2020-03-02 15:42:00 +00:00
|
|
|
else if (tokenStr == "MaxMeshOutputVerticesNV")
|
|
|
|
resources->maxMeshOutputVerticesNV = value;
|
|
|
|
else if (tokenStr == "MaxMeshOutputPrimitivesNV")
|
|
|
|
resources->maxMeshOutputPrimitivesNV = value;
|
|
|
|
else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
|
|
|
|
resources->maxMeshWorkGroupSizeX_NV = value;
|
|
|
|
else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
|
|
|
|
resources->maxMeshWorkGroupSizeY_NV = value;
|
|
|
|
else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
|
|
|
|
resources->maxMeshWorkGroupSizeZ_NV = value;
|
|
|
|
else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
|
|
|
|
resources->maxTaskWorkGroupSizeX_NV = value;
|
|
|
|
else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
|
|
|
|
resources->maxTaskWorkGroupSizeY_NV = value;
|
|
|
|
else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
|
|
|
|
resources->maxTaskWorkGroupSizeZ_NV = value;
|
|
|
|
else if (tokenStr == "MaxMeshViewCountNV")
|
|
|
|
resources->maxMeshViewCountNV = value;
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "nonInductiveForLoops")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.nonInductiveForLoops = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "whileLoops")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.whileLoops = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "doWhileLoops")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.doWhileLoops = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalUniformIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalUniformIndexing = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalAttributeMatrixVectorIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalAttributeMatrixVectorIndexing = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalVaryingIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalVaryingIndexing = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalSamplerIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalSamplerIndexing = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalVariableIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalVariableIndexing = (value != 0);
|
2018-06-02 07:26:43 +00:00
|
|
|
else if (tokenStr == "generalConstantMatrixVectorIndexing")
|
2016-06-26 05:06:20 +00:00
|
|
|
resources->limits.generalConstantMatrixVectorIndexing = (value != 0);
|
|
|
|
else
|
2018-06-02 07:26:43 +00:00
|
|
|
printf("Warning: unrecognized limit (%s) in configuration file.\n", tokenStr.c_str());
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // end namespace glslang
|