Module: Mesa
Branch: master
Commit: 26948ba761e04e74a5d15a3115117b9954a4fcbb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=26948ba761e04e74a5d15a3115117b9954a4fcbb

Author: Brian Paul <bri...@vmware.com>
Date:   Wed Feb  7 18:28:34 2018 -0700

gallium/util: s/uint/enum tgsi_semantic/ in simple shader code

Reviewed-by: Mathias Fröhlich <mathias.froehl...@web.de>
Reviewed-by: Roland Scheidegger <srol...@vmware.com>

---

 src/gallium/auxiliary/util/u_simple_shaders.c | 4 ++--
 src/gallium/auxiliary/util/u_simple_shaders.h | 4 ++--
 src/gallium/auxiliary/util/u_tests.c          | 2 +-
 src/gallium/tests/trivial/quad-tex.c          | 4 ++--
 src/gallium/tests/trivial/tri.c               | 8 ++++----
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c 
b/src/gallium/auxiliary/util/u_simple_shaders.c
index bd5a97f7bf..4046ab1202 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.c
+++ b/src/gallium/auxiliary/util/u_simple_shaders.c
@@ -59,7 +59,7 @@
 void *
 util_make_vertex_passthrough_shader(struct pipe_context *pipe,
                                     uint num_attribs,
-                                    const uint *semantic_names,
+                                    const enum tgsi_semantic *semantic_names,
                                     const uint *semantic_indexes,
                                     bool window_space)
 {
@@ -72,7 +72,7 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
 void *
 util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe,
                                     uint num_attribs,
-                                    const uint *semantic_names,
+                                    const enum tgsi_semantic *semantic_names,
                                     const uint *semantic_indexes,
                                     bool window_space, bool layered,
                                    const struct pipe_stream_output_info *so)
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h 
b/src/gallium/auxiliary/util/u_simple_shaders.h
index cec556f05c..3afe4cc050 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.h
+++ b/src/gallium/auxiliary/util/u_simple_shaders.h
@@ -47,14 +47,14 @@ extern "C" {
 extern void *
 util_make_vertex_passthrough_shader(struct pipe_context *pipe,
                                     uint num_attribs,
-                                    const uint *semantic_names,
+                                    const enum tgsi_semantic *semantic_names,
                                     const uint *semantic_indexes,
                                     bool window_space);
 
 extern void *
 util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe,
                                     uint num_attribs,
-                                    const uint *semantic_names,
+                                    const enum tgsi_semantic *semantic_names,
                                     const uint *semantic_indexes,
                                     bool window_space, bool layered,
                                     const struct pipe_stream_output_info *so);
diff --git a/src/gallium/auxiliary/util/u_tests.c 
b/src/gallium/auxiliary/util/u_tests.c
index e8599e3203..86eee6e68b 100644
--- a/src/gallium/auxiliary/util/u_tests.c
+++ b/src/gallium/auxiliary/util/u_tests.c
@@ -147,7 +147,7 @@ util_set_passthrough_vertex_shader(struct cso_context *cso,
                                    struct pipe_context *ctx,
                                    bool window_space)
 {
-   static const uint vs_attribs[] = {
+   static const enum tgsi_semantic vs_attribs[] = {
       TGSI_SEMANTIC_POSITION,
       TGSI_SEMANTIC_GENERIC
    };
diff --git a/src/gallium/tests/trivial/quad-tex.c 
b/src/gallium/tests/trivial/quad-tex.c
index 2ee544a412..df0e1301f5 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -263,8 +263,8 @@ static void init_prog(struct program *p)
 
        /* vertex shader */
        {
-               const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
-                                               TGSI_SEMANTIC_GENERIC };
+               const enum tgsi_semantic semantic_names[] =
+                   { TGSI_SEMANTIC_POSITION, TGSI_SEMANTIC_GENERIC };
                const uint semantic_indexes[] = { 0, 0 };
                p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, 
semantic_names, semantic_indexes, FALSE);
        }
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index a2031696f0..71e9702275 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -208,10 +208,10 @@ static void init_prog(struct program *p)
 
        /* vertex shader */
        {
-                       const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
-                                                       TGSI_SEMANTIC_COLOR };
-                       const uint semantic_indexes[] = { 0, 0 };
-                       p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, 
semantic_names, semantic_indexes, FALSE);
+               const enum tgsi_semantic semantic_names[] =
+                       { TGSI_SEMANTIC_POSITION, TGSI_SEMANTIC_COLOR };
+               const uint semantic_indexes[] = { 0, 0 };
+               p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, 
semantic_names, semantic_indexes, FALSE);
        }
 
        /* fragment shader */

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to