mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
mesa: fix RGBA_SIGNED_COMPONENTS for lowered signed luminance
Some drivers implement luminance as RGBA. Since the code checks the renderbuffer format instead of the internal format this can cause the query to incorrectly return "signed" on the Alpha component for signed luminance formats. Fixes the following Piglit test for various drivers (at least Panfrost and V3D): spec/ext_packed_float/query-rgba-signed-components Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33372>
This commit is contained in:
parent
a6dc8fa426
commit
886d720c19
7 changed files with 6 additions and 8 deletions
|
|
@ -205,7 +205,6 @@ spec@ext_packed_depth_stencil@texwrap formats offset,Fail
|
|||
spec@ext_packed_depth_stencil@texwrap formats offset@GL_DEPTH24_STENCIL8- NPOT,Fail
|
||||
spec@ext_packed_depth_stencil@texwrap formats,Fail
|
||||
spec@ext_packed_depth_stencil@texwrap formats@GL_DEPTH24_STENCIL8- NPOT,Fail
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
spec@ext_texture_integer@fbo-blending,Fail
|
||||
spec@ext_texture_integer@getteximage-clamping gl_arb_texture_rg,Fail
|
||||
spec@ext_texture_integer@getteximage-clamping,Fail
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ spec@ext_packed_depth_stencil@texwrap formats offset,Fail
|
|||
spec@ext_packed_depth_stencil@texwrap formats offset@GL_DEPTH24_STENCIL8- NPOT,Fail
|
||||
spec@ext_packed_depth_stencil@texwrap formats,Fail
|
||||
spec@ext_packed_depth_stencil@texwrap formats@GL_DEPTH24_STENCIL8- NPOT,Fail
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
spec@ext_texture_integer@fbo-blending,Fail
|
||||
spec@ext_texture_integer@getteximage-clamping gl_arb_texture_rg,Fail
|
||||
spec@ext_texture_integer@getteximage-clamping,Fail
|
||||
|
|
|
|||
|
|
@ -548,8 +548,6 @@ spec@ext_framebuffer_multisample@interpolation 8 centroid-disabled,Fail
|
|||
spec@ext_framebuffer_multisample@interpolation 8 non-centroid-deriv-disabled,Fail
|
||||
spec@ext_framebuffer_multisample@interpolation 8 non-centroid-disabled,Fail
|
||||
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
|
||||
spec@ext_transform_feedback@tessellation triangle_fan flat_first,Fail
|
||||
spec@ext_transform_feedback@tessellation quad_strip wireframe,Fail
|
||||
spec@ext_transform_feedback@tessellation quads wireframe,Fail
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_
|
|||
spec@egl_khr_gl_image@egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24,Fail
|
||||
spec@egl_khr_surfaceless_context@viewport,Fail
|
||||
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
|
||||
spec@glsl-1.10@execution@glsl-fs-inline-explosion,Crash
|
||||
spec@glsl-1.10@execution@glsl-vs-inline-explosion,Crash
|
||||
spec@glsl-1.10@execution@loops@glsl-fs-unroll-explosion,Crash
|
||||
|
|
|
|||
|
|
@ -1028,6 +1028,12 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
|
|||
GLint i_bits =
|
||||
_mesa_get_format_bits(rb->Format, GL_TEXTURE_INTENSITY_SIZE);
|
||||
|
||||
/* Fix the case where some drivers may implement signed luminance
|
||||
* as signed RGBA, which leads to reporting signed alpha.
|
||||
*/
|
||||
if (rb->_BaseFormat == GL_LUMINANCE)
|
||||
a_bits = 0;
|
||||
|
||||
v->value_int_4[0] = r_bits + l_bits + i_bits > 0;
|
||||
v->value_int_4[1] = g_bits + l_bits + i_bits > 0;
|
||||
v->value_int_4[2] = b_bits + l_bits + i_bits > 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ spec@ext_framebuffer_object@fbo-blending-formats@GL_LUMINANCE,Fail
|
|||
spec@ext_framebuffer_object@fbo-blending-snorm,Fail
|
||||
spec@ext_framebuffer_object@getteximage-formats init-by-clear-and-render,Fail
|
||||
spec@ext_framebuffer_object@getteximage-formats init-by-rendering,Fail
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
spec@ext_transform_feedback2@draw-auto,Fail
|
||||
spec@ext_transform_feedback@builtin-varyings gl_clipdistance,Fail
|
||||
spec@ext_transform_feedback@change-size base-shrink,Fail
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yuyv,Fail
|
|||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_yvu420,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-transcode-nv12-as-r8-gr88,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-unsupported_format,Fail
|
||||
spec@ext_packed_float@query-rgba-signed-components,Fail
|
||||
spec@ext_transform_feedback2@draw-auto,Fail
|
||||
spec@ext_transform_feedback@builtin-varyings gl_clipdistance,Fail
|
||||
spec@ext_transform_feedback@change-size base-shrink,Fail
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue