gallium+mesa: fix tgsi_semantic array type
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 23 Jul 2019 09:01:44 +0000 (10:01 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 24 Jul 2019 08:33:29 +0000 (09:33 +0100)
Fixes: ed23335a313dfc9cec26 ("gallium: use enums in p_shader_tokens.h (v2)")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_blit.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_drawtex.c

index 15edf2f48dc1d6e0f717637028ff6ddf3290d1db..b6758fc2f9bc5def656145ba837f0325abf463a6 100644 (file)
@@ -213,8 +213,10 @@ set_vertex_shader(struct blit_state *ctx)
     * fragment shader input semantics and vertex_element/buffers.
     */
    if (!ctx->vs) {
-      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 };
       ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
                                                     semantic_names,
index 3a49bd4d6c1c65138533663345f5e3a864a46c4d..593d15331fd0c6987fb9e0cc3880eeb1be28578c 100644 (file)
@@ -176,8 +176,10 @@ set_vertex_shader(struct st_context *st)
       if (use_nir) {
          st->clear.vs = make_nir_clear_vertex_shader(st, false);
       } else {
-         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 };
          st->clear.vs = util_make_vertex_passthrough_shader(st->pipe, 2,
                                                             semantic_names,
index 26d3cc33e5cc47cd37a40aae71c9dc877ee12d93..d1042080e0fbcde7d79577c9e3d13e944c2da2fe 100644 (file)
@@ -324,10 +324,12 @@ st_make_passthrough_vertex_shader(struct st_context *st)
                                         MESA_SHADER_VERTEX, 3,
                                         inputs, outputs, NULL, 0);
    } else {
-      const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
-                                      TGSI_SEMANTIC_COLOR,
-        st->needs_texcoord_semantic ? TGSI_SEMANTIC_TEXCOORD :
-                                      TGSI_SEMANTIC_GENERIC };
+      const enum tgsi_semantic semantic_names[] = {
+         TGSI_SEMANTIC_POSITION,
+         TGSI_SEMANTIC_COLOR,
+         st->needs_texcoord_semantic ? TGSI_SEMANTIC_TEXCOORD :
+                                       TGSI_SEMANTIC_GENERIC
+      };
       const uint semantic_indexes[] = { 0, 0, 0 };
 
       st->passthrough_vs =
index f08ffde6b01fdc0e112b4d0763f8fb7d1280d7e4..bba1ce41376c63528863ef8f13eabf5b179ed630 100644 (file)
@@ -92,7 +92,7 @@ semantic_to_varying_slot(unsigned semantic)
 static void *
 lookup_shader(struct st_context *st,
               uint num_attribs,
-              const uint *semantic_names,
+              const enum tgsi_semantic *semantic_names,
               const uint *semantic_indexes)
 {
    struct pipe_context *pipe = st->pipe;
@@ -168,7 +168,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
    struct pipe_resource *vbuffer = NULL;
    GLuint i, numTexCoords, numAttribs;
    GLboolean emitColor;
-   uint semantic_names[2 + MAX_TEXTURE_UNITS];
+   enum tgsi_semantic semantic_names[2 + MAX_TEXTURE_UNITS];
    uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
    struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
    unsigned offset;