Mesa (master): nir: Add a helper to get the uvec4 type.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Jan 3 22:36:11 UTC 2018
Module: Mesa
Branch: master
Commit: deb552ca276813a243dd68ea335ab40d4b93afc0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=deb552ca276813a243dd68ea335ab40d4b93afc0
Author: Eric Anholt <eric at anholt.net>
Date: Thu Dec 28 15:12:20 2017 -0800
nir: Add a helper to get the uvec4 type.
I needed this in the vc5 compiler.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/compiler/nir_types.cpp | 6 ++++++
src/compiler/nir_types.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 377de0c9c7..cbdd452dc8 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -298,6 +298,12 @@ glsl_vec4_type(void)
}
const glsl_type *
+glsl_uvec4_type(void)
+{
+ return glsl_type::uvec4_type;
+}
+
+const glsl_type *
glsl_int_type(void)
{
return glsl_type::int_type;
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index daff973250..4397c2406f 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -136,6 +136,7 @@ const struct glsl_type *glsl_double_type(void);
const struct glsl_type *glsl_vec_type(unsigned n);
const struct glsl_type *glsl_dvec_type(unsigned n);
const struct glsl_type *glsl_vec4_type(void);
+const struct glsl_type *glsl_uvec4_type(void);
const struct glsl_type *glsl_int_type(void);
const struct glsl_type *glsl_uint_type(void);
const struct glsl_type *glsl_int64_t_type(void);
More information about the mesa-commit
mailing list