Limits from other extensions added by Marek.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
if (!state->es_shader) {
add_const("gl_MaxGeometryAtomicCounters",
state->Const.MaxGeometryAtomicCounters);
- add_const("gl_MaxTessControlAtomicCounters", 0);
- add_const("gl_MaxTessEvaluationAtomicCounters", 0);
+
+ if (state->is_version(400, 0) ||
+ state->ARB_tessellation_shader_enable) {
+ add_const("gl_MaxTessControlAtomicCounters",
+ state->Const.MaxTessControlAtomicCounters);
+ add_const("gl_MaxTessEvaluationAtomicCounters",
+ state->Const.MaxTessEvaluationAtomicCounters);
+ }
}
}
if (!state->es_shader) {
add_const("gl_MaxGeometryAtomicCounterBuffers",
state->Const.MaxGeometryAtomicCounterBuffers);
- add_const("gl_MaxTessControlAtomicCounterBuffers", 0);
- add_const("gl_MaxTessEvaluationAtomicCounterBuffers", 0);
+ add_const("gl_MaxTessControlAtomicCounterBuffers",
+ state->Const.MaxTessControlAtomicCounterBuffers);
+ add_const("gl_MaxTessEvaluationAtomicCounterBuffers",
+ state->Const.MaxTessEvaluationAtomicCounterBuffers);
}
}
state->Const.MaxFragmentImageUniforms);
add_const("gl_MaxCombinedImageUniforms",
state->Const.MaxCombinedImageUniforms);
+
+ if (state->is_version(400, 0) ||
+ state->ARB_tessellation_shader_enable) {
+ add_const("gl_MaxTessControlImageUniforms",
+ state->Const.MaxTessControlImageUniforms);
+ add_const("gl_MaxTessEvaluationImageUniforms",
+ state->Const.MaxTessEvaluationImageUniforms);
+ }
}
if (state->is_version(410, 0) ||
state->ARB_viewport_array_enable)
add_const("gl_MaxViewports", state->Const.MaxViewports);
+
+ if (state->is_version(400, 0) ||
+ state->ARB_tessellation_shader_enable) {
+ add_const("gl_MaxPatchVertices", state->Const.MaxPatchVertices);
+ add_const("gl_MaxTessGenLevel", state->Const.MaxTessGenLevel);
+ add_const("gl_MaxTessControlInputComponents", state->Const.MaxTessControlInputComponents);
+ add_const("gl_MaxTessControlOutputComponents", state->Const.MaxTessControlOutputComponents);
+ add_const("gl_MaxTessControlTextureImageUnits", state->Const.MaxTessControlTextureImageUnits);
+ add_const("gl_MaxTessEvaluationInputComponents", state->Const.MaxTessEvaluationInputComponents);
+ add_const("gl_MaxTessEvaluationOutputComponents", state->Const.MaxTessEvaluationOutputComponents);
+ add_const("gl_MaxTessEvaluationTextureImageUnits", state->Const.MaxTessEvaluationTextureImageUnits);
+ add_const("gl_MaxTessPatchComponents", state->Const.MaxTessPatchComponents);
+ add_const("gl_MaxTessControlTotalOutputComponents", state->Const.MaxTessControlTotalOutputComponents);
+ add_const("gl_MaxTessControlUniformComponents", state->Const.MaxTessControlUniformComponents);
+ add_const("gl_MaxTessEvaluationUniformComponents", state->Const.MaxTessEvaluationUniformComponents);
+ }
}
this->Const.MaxGeometryUniformComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxUniformComponents;
this->Const.MaxVertexAtomicCounters = ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters;
+ this->Const.MaxTessControlAtomicCounters = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxAtomicCounters;
+ this->Const.MaxTessEvaluationAtomicCounters = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicCounters;
this->Const.MaxGeometryAtomicCounters = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicCounters;
this->Const.MaxFragmentAtomicCounters = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters;
this->Const.MaxCombinedAtomicCounters = ctx->Const.MaxCombinedAtomicCounters;
this->Const.MaxAtomicBufferBindings = ctx->Const.MaxAtomicBufferBindings;
this->Const.MaxVertexAtomicCounterBuffers =
ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicBuffers;
+ this->Const.MaxTessControlAtomicCounterBuffers =
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxAtomicBuffers;
+ this->Const.MaxTessEvaluationAtomicCounterBuffers =
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicBuffers;
this->Const.MaxGeometryAtomicCounterBuffers =
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicBuffers;
this->Const.MaxFragmentAtomicCounterBuffers =
this->Const.MaxCombinedImageUnitsAndFragmentOutputs = ctx->Const.MaxCombinedImageUnitsAndFragmentOutputs;
this->Const.MaxImageSamples = ctx->Const.MaxImageSamples;
this->Const.MaxVertexImageUniforms = ctx->Const.Program[MESA_SHADER_VERTEX].MaxImageUniforms;
+ this->Const.MaxTessControlImageUniforms = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms;
+ this->Const.MaxTessEvaluationImageUniforms = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxImageUniforms;
this->Const.MaxGeometryImageUniforms = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxImageUniforms;
this->Const.MaxFragmentImageUniforms = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxImageUniforms;
this->Const.MaxCombinedImageUniforms = ctx->Const.MaxCombinedImageUniforms;
/* tessellation shader constants */
this->Const.MaxPatchVertices = ctx->Const.MaxPatchVertices;
+ this->Const.MaxTessGenLevel = ctx->Const.MaxTessGenLevel;
+ this->Const.MaxTessControlInputComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxInputComponents;
+ this->Const.MaxTessControlOutputComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxOutputComponents;
+ this->Const.MaxTessControlTextureImageUnits = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits;
+ this->Const.MaxTessEvaluationInputComponents = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxInputComponents;
+ this->Const.MaxTessEvaluationOutputComponents = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxOutputComponents;
+ this->Const.MaxTessEvaluationTextureImageUnits = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits;
+ this->Const.MaxTessPatchComponents = ctx->Const.MaxTessPatchComponents;
+ this->Const.MaxTessControlTotalOutputComponents = ctx->Const.MaxTessControlTotalOutputComponents;
+ this->Const.MaxTessControlUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformComponents;
+ this->Const.MaxTessEvaluationUniformComponents = ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxUniformComponents;
this->current_function = NULL;
this->toplevel_ir = NULL;
/* ARB_shader_atomic_counters */
unsigned MaxVertexAtomicCounters;
+ unsigned MaxTessControlAtomicCounters;
+ unsigned MaxTessEvaluationAtomicCounters;
unsigned MaxGeometryAtomicCounters;
unsigned MaxFragmentAtomicCounters;
unsigned MaxCombinedAtomicCounters;
* 3.10.
*/
unsigned MaxVertexAtomicCounterBuffers;
+ unsigned MaxTessControlAtomicCounterBuffers;
+ unsigned MaxTessEvaluationAtomicCounterBuffers;
unsigned MaxGeometryAtomicCounterBuffers;
unsigned MaxFragmentAtomicCounterBuffers;
unsigned MaxCombinedAtomicCounterBuffers;
unsigned MaxCombinedImageUnitsAndFragmentOutputs;
unsigned MaxImageSamples;
unsigned MaxVertexImageUniforms;
+ unsigned MaxTessControlImageUniforms;
+ unsigned MaxTessEvaluationImageUniforms;
unsigned MaxGeometryImageUniforms;
unsigned MaxFragmentImageUniforms;
unsigned MaxCombinedImageUniforms;
/* ARB_tessellation_shader */
unsigned MaxPatchVertices;
+ unsigned MaxTessGenLevel;
+ unsigned MaxTessControlInputComponents;
+ unsigned MaxTessControlOutputComponents;
+ unsigned MaxTessControlTextureImageUnits;
+ unsigned MaxTessEvaluationInputComponents;
+ unsigned MaxTessEvaluationOutputComponents;
+ unsigned MaxTessEvaluationTextureImageUnits;
+ unsigned MaxTessPatchComponents;
+ unsigned MaxTessControlTotalOutputComponents;
+ unsigned MaxTessControlUniformComponents;
+ unsigned MaxTessEvaluationUniformComponents;
} Const;
/**