From 90534e9dba5895c74bcd328a3e5248d06503c8b3 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 30 Mar 2017 18:55:02 +0200 Subject: [PATCH] st/mesa: make 'st' const in st_mesa_format_to_pipe_format() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This avoids a compilation warning since st_convert_image() requires 'st' to be const. Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_format.c | 2 +- src/mesa/state_tracker/st_format.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 99527b7..7901d50 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -58,7 +58,7 @@ * Translate Mesa format to Gallium format. */ enum pipe_format -st_mesa_format_to_pipe_format(struct st_context *st, mesa_format mesaFormat) +st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaFormat) { switch (mesaFormat) { case MESA_FORMAT_A8B8G8R8_UNORM: diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index 6ba61df..3dd9c10 100644 --- a/src/mesa/state_tracker/st_format.h +++ b/src/mesa/state_tracker/st_format.h @@ -45,7 +45,7 @@ struct pipe_screen; extern enum pipe_format -st_mesa_format_to_pipe_format(struct st_context *st, mesa_format mesaFormat); +st_mesa_format_to_pipe_format(const struct st_context *st, mesa_format mesaFormat); extern mesa_format st_pipe_format_to_mesa_format(enum pipe_format pipeFormat); -- 2.7.4