aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-28 09:11:23 -0700
committerBrian Paul <[email protected]>2015-03-02 08:55:30 -0700
commitc16c719647664abf7531896770c31eda1dbe7a58 (patch)
tree45e8296addc08b5d1542c989e5f523208692c789 /src/glsl/glsl_parser_extras.cpp
parent70b401029cf800f22e6c4318cfd2ab9bf118bb6c (diff)
glsl: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index f19804b7238..79624bc263c 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -119,9 +119,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->Const.MaxAtomicBufferBindings = ctx->Const.MaxAtomicBufferBindings;
/* Compute shader constants */
- for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupCount); i++)
+ for (unsigned i = 0; i < ARRAY_SIZE(this->Const.MaxComputeWorkGroupCount); i++)
this->Const.MaxComputeWorkGroupCount[i] = ctx->Const.MaxComputeWorkGroupCount[i];
- for (unsigned i = 0; i < Elements(this->Const.MaxComputeWorkGroupSize); i++)
+ for (unsigned i = 0; i < ARRAY_SIZE(this->Const.MaxComputeWorkGroupSize); i++)
this->Const.MaxComputeWorkGroupSize[i] = ctx->Const.MaxComputeWorkGroupSize[i];
this->Const.MaxImageUnits = ctx->Const.MaxImageUnits;
@@ -636,7 +636,7 @@ void _mesa_glsl_extension::set_flags(_mesa_glsl_parse_state *state,
*/
static const _mesa_glsl_extension *find_extension(const char *name)
{
- for (unsigned i = 0; i < Elements(_mesa_glsl_supported_extensions); ++i) {
+ for (unsigned i = 0; i < ARRAY_SIZE(_mesa_glsl_supported_extensions); ++i) {
if (strcmp(name, _mesa_glsl_supported_extensions[i].name) == 0) {
return &_mesa_glsl_supported_extensions[i];
}
@@ -674,7 +674,7 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
return false;
} else {
for (unsigned i = 0;
- i < Elements(_mesa_glsl_supported_extensions); ++i) {
+ i < ARRAY_SIZE(_mesa_glsl_supported_extensions); ++i) {
const _mesa_glsl_extension *extension
= &_mesa_glsl_supported_extensions[i];
if (extension->compatible_with_state(state)) {