[Mesa-stable] [PATCH] glsl: Expose gl_MaxTess{Control, Evaluation}AtomicCounters.
Kenneth Graunke
kenneth at whitecape.org
Wed Sep 23 19:27:15 PDT 2015
On Wednesday, September 23, 2015 06:15:50 PM Matt Turner wrote:
> ... with only ARB_shader_atomic_counters.
>
> I expected to see interactions with ARB_tessellation_shader in the
> ARB_shader_atomic_counters spec, but they do not exist. It seems that we
> should unconditionally expose these variables in the presence of
> ARB_shader_atomic_counters:
>
> gl_MaxTessControlAtomicCounters
> gl_MaxTessEvaluationAtomicCounters
>
> This partially reverts commit da7adb99e8. The commit also affected
> gl_MaxTessControlImageUniforms and gl_MaxTessEvaluationImageUniforms
> similarly but the ARB_shader_image_load_store spec does list an
> interaction with ARB_tessellation_shader.
>
> Cc: "11.0" <mesa-stable at lists.freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92095
> ---
> Or should we consider the lack of interactions in ARB_shader_atomic_counters
> to be a bug, such that we should modify the test failing in the bug?
>
> src/glsl/builtin_variables.cpp | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
> index b5e2908..0722051 100644
> --- a/src/glsl/builtin_variables.cpp
> +++ b/src/glsl/builtin_variables.cpp
> @@ -680,14 +680,10 @@ builtin_variable_generator::generate_constants()
> if (!state->es_shader) {
> add_const("gl_MaxGeometryAtomicCounters",
> state->Const.MaxGeometryAtomicCounters);
> -
> - 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);
> - }
> + add_const("gl_MaxTessControlAtomicCounters",
> + state->Const.MaxTessControlAtomicCounters);
> + add_const("gl_MaxTessEvaluationAtomicCounters",
> + state->Const.MaxTessEvaluationAtomicCounters);
> }
> }
I think this is probably the right thing to do...my guess is that
implementations that don't support tessellation are supposed to set
the constant to 0 counters.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
But feel free to get other opinions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-stable/attachments/20150923/eca04510/attachment.sig>
More information about the mesa-stable
mailing list