Mesa (master): nir: cleanup glsl_get_struct_field_offset, glsl_get_explicit_stride
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 22 11:11:38 UTC 2019
Module: Mesa
Branch: master
Commit: da3ca69afadb142c1591c75c2bfd345c8d4337de
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da3ca69afadb142c1591c75c2bfd345c8d4337de
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Tue Jan 22 09:37:58 2019 +0200
nir: cleanup glsl_get_struct_field_offset, glsl_get_explicit_stride
Take away const qualifier from return type of these functions as
-Wignored-qualifiers points out it is ignored for these cases.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/compiler/nir_types.cpp | 4 ++--
src/compiler/nir_types.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 356252276b..7ea5ef9b83 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -71,14 +71,14 @@ glsl_get_struct_field(const glsl_type *type, unsigned index)
return type->fields.structure[index].type;
}
-const int
+int
glsl_get_struct_field_offset(const struct glsl_type *type,
unsigned index)
{
return type->fields.structure[index].offset;
}
-const unsigned
+unsigned
glsl_get_explicit_stride(const struct glsl_type *type)
{
return type->explicit_stride;
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index d17671b940..15891ce43b 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -46,10 +46,10 @@ const char *glsl_get_type_name(const struct glsl_type *type);
const struct glsl_type *glsl_get_struct_field(const struct glsl_type *type,
unsigned index);
-const int glsl_get_struct_field_offset(const struct glsl_type *type,
- unsigned index);
+int glsl_get_struct_field_offset(const struct glsl_type *type,
+ unsigned index);
-const unsigned glsl_get_explicit_stride(const struct glsl_type *type);
+unsigned glsl_get_explicit_stride(const struct glsl_type *type);
const struct glsl_type *glsl_get_array_element(const struct glsl_type *type);
const struct glsl_type *glsl_without_array(const struct glsl_type *type);
const struct glsl_type *glsl_without_array_or_matrix(const struct glsl_type *type);
More information about the mesa-commit
mailing list