Mesa (main): nir/glsl: wrap component_slots_aligned()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 04:43:32 UTC 2022


Module: Mesa
Branch: main
Commit: 5d57bd0345bc8f4bbbfd563079247755fa762417
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d57bd0345bc8f4bbbfd563079247755fa762417

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Tue Nov  2 12:33:10 2021 +1100

nir/glsl: wrap component_slots_aligned()

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15731>

---

 src/compiler/nir_types.cpp | 6 ++++++
 src/compiler/nir_types.h   | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index e99b755ba9b..4693ddd4905 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -203,6 +203,12 @@ glsl_get_component_slots(const struct glsl_type *type)
    return type->component_slots();
 }
 
+unsigned
+glsl_get_component_slots_aligned(const struct glsl_type *type, unsigned offset)
+{
+   return type->component_slots_aligned(offset);
+}
+
 unsigned
 glsl_varying_count(const struct glsl_type *type)
 {
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index d86f995fe10..ddbb472c9fe 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -102,6 +102,8 @@ unsigned glsl_count_dword_slots(const struct glsl_type *type, bool is_bindless);
 unsigned glsl_count_attribute_slots(const struct glsl_type *type,
                                     bool is_gl_vertex_input);
 unsigned glsl_get_component_slots(const struct glsl_type *type);
+unsigned glsl_get_component_slots_aligned(const struct glsl_type *type,
+                                          unsigned offset);
 unsigned glsl_varying_count(const struct glsl_type *type);
 
 const char *glsl_get_struct_elem_name(const struct glsl_type *type,



More information about the mesa-commit mailing list