mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 03:00:11 +01:00
mesa/st: always override internal-format for 10-bit formats
We also need to do this in the GLES-only code-path, otherwise we'll end
up setting PIPE_BIND_RENDER_TARGET for these, which means we'll
incorrectly require these to be color-renderable.
Fixes: 60e115dedf ("mesa/st: do not drop binding prematurely")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38945>
This commit is contained in:
parent
0da350f879
commit
74b7b68628
5 changed files with 22 additions and 37 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue