diff --git a/src/freedreno/ci/freedreno-a618-fails.txt b/src/freedreno/ci/freedreno-a618-fails.txt index b1994996f8b..21975276eb9 100644 --- a/src/freedreno/ci/freedreno-a618-fails.txt +++ b/src/freedreno/ci/freedreno-a618-fails.txt @@ -218,9 +218,6 @@ KHR-GL46.texture_lod_bias.texture_lod_bias_all,Fail KHR-GL46.shading_language_420pack.binding_images_texture_type_1D,Fail KHR-GLES3.framebuffer_blit.multisampled_to_singlesampled_blit_depth_config_test,Fail -x11-dEQP-EGL.functional.image.modify.tex_rgb5_a1_renderbuffer_clear_color,Fail -wayland-dEQP-EGL.functional.image.modify.tex_rgb5_a1_renderbuffer_clear_color,Fail - # GL tests above, Vulkan tests below # New fails in 1.4.3.3 diff --git a/src/gallium/drivers/r300/ci/r300-rs740-fails.txt b/src/gallium/drivers/r300/ci/r300-rs740-fails.txt index f4d04b2a1df..29ad009a7d1 100644 --- a/src/gallium/drivers/r300/ci/r300-rs740-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-rs740-fails.txt @@ -34,10 +34,6 @@ dEQP-GLES2.functional.draw.random.8,Fail dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail -# Two regressions from 60e115dedfa29dd4353b2608b7f226f8f7cfa9bd -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev,Fail -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev,Fail - dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail diff --git a/src/gallium/drivers/r300/ci/r300-rv380-fails.txt b/src/gallium/drivers/r300/ci/r300-rv380-fails.txt index 534a1014645..b71fac13773 100644 --- a/src/gallium/drivers/r300/ci/r300-rv380-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-rv380-fails.txt @@ -5,10 +5,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail -# Two regressions from 60e115dedfa29dd4353b2608b7f226f8f7cfa9bd -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev,Fail -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev,Fail - dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail diff --git a/src/gallium/drivers/r300/ci/r300-rv410-fails.txt b/src/gallium/drivers/r300/ci/r300-rv410-fails.txt index 7060a29bb39..44d7e3dc8d5 100644 --- a/src/gallium/drivers/r300/ci/r300-rv410-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-rv410-fails.txt @@ -5,10 +5,6 @@ dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_center,Fail dEQP-GLES2.functional.clipping.point.wide_point_clip_viewport_corner,Fail dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail -# Two regressions from 60e115dedfa29dd4353b2608b7f226f8f7cfa9bd -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev,Fail -dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev,Fail - dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 145c3dc8c29..1d783c10558 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1222,28 +1222,6 @@ st_choose_format(struct st_context *st, GLenum internalFormat, } } - /* For an unsized GL_RGB but a 2_10_10_10 type, try to pick one of the - * 2_10_10_10 formats. This is important for - * GL_EXT_texture_type_2_10_10_10_REV support, which says that these - * formats are not color-renderable. Mesa's check for making those - * non-color-renderable is based on our chosen format being 2101010. - */ - if (type == GL_UNSIGNED_INT_2_10_10_10_REV || - type == GL_UNSIGNED_INT_10_10_10_2 || - type == GL_UNSIGNED_INT_10_10_10_2_OES) { - if (internalFormat == GL_RGB) - internalFormat = GL_RGB10; - else if (internalFormat == GL_RGBA) - internalFormat = GL_RGB10_A2; - } - - if (type == GL_UNSIGNED_SHORT_5_5_5_1) { - if (internalFormat == GL_RGB) - internalFormat = GL_RGB5; - else if (internalFormat == GL_RGBA) - internalFormat = GL_RGB5_A1; - } - /* search table for internalFormat */ for (i = 0; i < ARRAY_SIZE(format_map); i++) { const struct format_mapping *mapping = &format_map[i]; @@ -1400,6 +1378,28 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, } } + /* For an unsized GL_RGB but a 2_10_10_10 type, try to pick one of the + * 2_10_10_10 formats. This is important for + * GL_EXT_texture_type_2_10_10_10_REV support, which says that these + * formats are not color-renderable. Mesa's check for making those + * non-color-renderable is based on our chosen format being 2101010. + */ + if (type == GL_UNSIGNED_INT_2_10_10_10_REV || + type == GL_UNSIGNED_INT_10_10_10_2 || + type == GL_UNSIGNED_INT_10_10_10_2_OES) { + if (internalFormat == GL_RGB) + internalFormat = GL_RGB10; + else if (internalFormat == GL_RGBA) + internalFormat = GL_RGB10_A2; + } + + if (type == GL_UNSIGNED_SHORT_5_5_5_1) { + if (internalFormat == GL_RGB) + internalFormat = GL_RGB5; + else if (internalFormat == GL_RGBA) + internalFormat = GL_RGB5_A1; + } + if (target == GL_TEXTURE_1D || target == GL_TEXTURE_1D_ARRAY) { /* We don't do compression for these texture targets because of * difficulty with sub-texture updates on non-block boundaries, etc.