From: Chris Wilson Date: Wed, 10 Jul 2019 18:10:25 +0000 (+0100) Subject: st/mesa: Map MESA_FORMAT_RGB_UNORM8 <-> PIPE_FORMAT_R8G8B8_UNORM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0899bf55;p=mesa.git 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 --- 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: