Mesa (master): st/mesa: Map MESA_FORMAT_RGB_UNORM8 <-> PIPE_FORMAT_R8G8B8_UNORM

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 22 22:46:32 UTC 2019


Module: Mesa
Branch: master
Commit: 0899bf55d41bb5764c76855b2b8c85e22b84d97c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0899bf55d41bb5764c76855b2b8c85e22b84d97c

Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jul 10 19:10:25 2019 +0100

st/mesa: Map MESA_FORMAT_RGB_UNORM8 <-> PIPE_FORMAT_R8G8B8_UNORM

This is useful for PBO texture upload with GL_RGB and GL_UNSIGNED_BYTE.

v2: Vasily Khoruzhick provided an update for the Lima CI expectations.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 .gitlab-ci/deqp-lima-fails.txt     | 34 +++++++++-------------------------
 src/mesa/state_tracker/st_format.c |  6 ++++++
 2 files changed, 15 insertions(+), 25 deletions(-)

diff --git a/.gitlab-ci/deqp-lima-fails.txt b/.gitlab-ci/deqp-lima-fails.txt
index a2082c0d2c3..f66150359ca 100644
--- a/.gitlab-ci/deqp-lima-fails.txt
+++ b/.gitlab-ci/deqp-lima-fails.txt
@@ -605,31 +605,15 @@ dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_format BadTerminat
 dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_type BadTerminate
 dEQP-GLES2.functional.negative_api.texture.teximage2d_inequal_width_height_cube BadTerminate
 dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_level_tex2d BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_level_cube BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_level_max_tex2d BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_level_max_cube BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_internalformat BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_tex2d BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_pos_x BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_pos_y BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_pos_z BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_neg_x BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_neg_y BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_neg_width_height_cube_neg_z BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_tex2d BadTerminatePass
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_pos_x BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_pos_y BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_pos_z BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_neg_x BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_neg_y BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_neg_z BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_border BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_format_mismatch BadTerminate
-dEQP-GLES2.functional.negative_api.texture.teximage2d_type_format_mismatch BadTerminate
-dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_target BadTerminate
-dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_format BadTerminate
-dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_type BadTerminate
-dEQP-GLES2.functional.negative_api.texture.texsubimage2d_neg_level_tex2d BadTerminate
+dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_neg_y BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.teximage2d_width_height_max_cube_neg_z BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.teximage2d_invalid_border BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.teximage2d_format_mismatch BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.teximage2d_type_format_mismatch BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_target BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_format BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.texsubimage2d_invalid_type BadTerminatePass
+dEQP-GLES2.functional.negative_api.texture.texsubimage2d_neg_level_tex2d BadTerminatePass
 dEQP-GLES2.functional.negative_api.texture.texsubimage2d_neg_level_cube BadTerminate
 dEQP-GLES2.functional.negative_api.texture.texsubimage2d_level_max_tex2d BadTerminate
 dEQP-GLES2.functional.negative_api.texture.texsubimage2d_level_max_cube BadTerminate
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 35d2e3bc915..a84905942ed 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -71,6 +71,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st,
    switch (mesaFormat) {
    case MESA_FORMAT_A8B8G8R8_UNORM:
       return PIPE_FORMAT_ABGR8888_UNORM;
+   case MESA_FORMAT_RGB_UNORM8:
+      return PIPE_FORMAT_R8G8B8_UNORM;
    case MESA_FORMAT_R8G8B8A8_UNORM:
       return PIPE_FORMAT_RGBA8888_UNORM;
    case MESA_FORMAT_B8G8R8A8_UNORM:
@@ -635,6 +637,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st,
       return PIPE_FORMAT_ATC_RGBA_INTERPOLATED;
 
    default:
+      debug_printf("%s(mesa_format=%s) -> NONE\n",
+                   __func__, _mesa_get_format_name(mesaFormat));
       return PIPE_FORMAT_NONE;
    }
 }
@@ -651,6 +655,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_A8B8G8R8_UNORM;
    case PIPE_FORMAT_RGBA8888_UNORM:
       return MESA_FORMAT_R8G8B8A8_UNORM;
+   case PIPE_FORMAT_R8G8B8_UNORM:
+      return MESA_FORMAT_RGB_UNORM8;
    case PIPE_FORMAT_BGRA8888_UNORM:
       return MESA_FORMAT_B8G8R8A8_UNORM;
    case PIPE_FORMAT_ARGB8888_UNORM:




More information about the mesa-commit mailing list