ttn: fix warning after 7bf76563e
[mesa.git] / src / gallium / auxiliary / util / u_tests.c
index e6998281bc9b037ddb8c4c7e848ea86df1eba15b..f22ffceb6bc53232f491f5c904e0744d7a8f6cf6 100644 (file)
@@ -129,7 +129,7 @@ static void
 util_set_interleaved_vertex_elements(struct cso_context *cso,
                                      unsigned num_elements)
 {
-   int i;
+   unsigned i;
    struct pipe_vertex_element *velem =
       calloc(1, num_elements * sizeof(struct pipe_vertex_element));
 
@@ -205,7 +205,7 @@ util_probe_rect_rgba_multi(struct pipe_context *ctx, struct pipe_resource *tex,
    struct pipe_transfer *transfer;
    void *map;
    float *pixels = malloc(w * h * 4 * sizeof(float));
-   int x,y,e,c;
+   unsigned x,y,e,c;
    bool pass = true;
 
    map = pipe_transfer_map(ctx, tex, 0, 0, PIPE_TRANSFER_READ,
@@ -422,13 +422,14 @@ null_constant_buffer(struct pipe_context *ctx)
             "MOV OUT[0], CONST[0]\n"
             "END\n";
       struct tgsi_token tokens[1000];
-      struct pipe_shader_state state = {tokens};
+      struct pipe_shader_state state;
 
       if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) {
          puts("Can't compile a fragment shader.");
          util_report_result(FAIL);
          return;
       }
+      pipe_shader_state_from_tgsi(&state, tokens);
       fs = ctx->create_fs_state(ctx, &state);
       cso_set_fragment_shader_handle(cso, fs);
    }