st/mesa: make 'st' const in st_mesa_format_to_pipe_format()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 30 Mar 2017 16:55:02 +0000 (18:55 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 3 Apr 2017 09:29:18 +0000 (11:29 +0200)
This avoids a compilation warning since st_convert_image()
requires 'st' to be const.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_format.c
src/mesa/state_tracker/st_format.h

index 99527b74bab0096aafed5f7cabcd964ebbf7361a..7901d50b71301b2c700d59e30d49e6df11d8f24c 100644 (file)
@@ -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:
index 6ba61df7e4e96380fbf6cbbcb1362631c45e13c8..3dd9c10341a04ac55345e37c353530f07257f3a1 100644 (file)
@@ -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);