radeonsi: silent a compiler warning
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 May 2017 10:20:41 +0000 (12:20 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 May 2017 12:02:17 +0000 (14:02 +0200)
This fixes:

si_shader.c: In function ‘si_shader_dump_stats’:
si_shader.c:6704:31: warning: passing argument 1 of ‘si_get_max_workgroup_size’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     si_get_max_workgroup_size(shader);
                               ^~~~~~
si_shader.c:5832:17: note: expected ‘struct si_shader *’ but argument is of type ‘const struct si_shader *’
 static unsigned si_get_max_workgroup_size(struct si_shader *shader)

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c

index 08055007ca35693130b07baff8431b0b72b4af47..b969376e9d2a7ad1ea0b332663be280f2eaa6626 100644 (file)
@@ -5829,7 +5829,7 @@ static void declare_lds_as_pointer(struct si_shader_context *ctx)
                "lds");
 }
 
-static unsigned si_get_max_workgroup_size(struct si_shader *shader)
+static unsigned si_get_max_workgroup_size(const struct si_shader *shader)
 {
        switch (shader->selector->type) {
        case PIPE_SHADER_TESS_CTRL: