mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-14 17:20:42 +01:00
glsl: relax precision matching on unused uniforms ES
0886be09("glsl: Allow precision mismatch on dead data with GLSL ES 1.00") allowed precision mismatches on uniforms, however if you lower precision on 16-bit consts, then this error triggers instead. So here we relax the type matching and just make sure we match int vs float. Fixes:0886be09("glsl: Allow precision mismatch on dead data with GLSL ES 1.00") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5337 Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40107>
This commit is contained in:
parent
78e323c755
commit
73bc604128
10 changed files with 21 additions and 17 deletions
|
|
@ -401,7 +401,6 @@ spec@egl 1.4@eglterminate then unbind context,Fail
|
|||
spec@egl_khr_surfaceless_context@viewport,Fail
|
||||
spec@egl_mesa_configless_context@basic,Fail
|
||||
spec@ext_external_objects@vk-ping-pong-single-sem,Crash
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
|
|
|
|||
|
|
@ -71,5 +71,4 @@ program@run kernel with max work item sizes,Fail
|
|||
# uprev Piglit in Mesa
|
||||
spec@ext_external_objects@vk-semaphores,Crash
|
||||
spec@ext_external_objects@vk-semaphores-2,Crash
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SR
|
|||
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SRGB_S3TC_DXT1_EXT- swizzled- border color only,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency other,Fail
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gl srgb-fp,Fail
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ spec@egl_khr_surfaceless_context@viewport,Fail
|
|||
spec@ext_external_objects@vk-image-display,Crash
|
||||
spec@ext_external_objects@vk-semaphores,Crash
|
||||
spec@ext_external_objects@vk-semaphores-2,Crash
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
|
|
|
|||
|
|
@ -1684,12 +1684,27 @@ cross_validate_globals(void *mem_ctx, const struct gl_constants *consts,
|
|||
existing->data.mode == nir_var_mem_ssbo &&
|
||||
existing->data.from_ssbo_unsized_array &&
|
||||
glsl_get_gl_type(var->type) == glsl_get_gl_type(existing->type))) {
|
||||
linker_error(prog, "%s `%s' declared as type "
|
||||
"`%s' and type `%s'\n",
|
||||
gl_nir_mode_string(var),
|
||||
var->name, glsl_get_type_name(var->type),
|
||||
glsl_get_type_name(existing->type));
|
||||
return;
|
||||
|
||||
/* Relax precision matching on unused uniforms for early ES shaders */
|
||||
if (prog->IsES && !var->interface_type &&
|
||||
!(existing->data.used && var->data.used) &&
|
||||
glsl_base_type_is_integer(glsl_get_gl_type(var->type)) == glsl_base_type_is_integer(glsl_get_gl_type(existing->type)) &&
|
||||
glsl_base_type_is_float(glsl_get_gl_type(var->type)) == glsl_base_type_is_float(glsl_get_gl_type(existing->type)) &&
|
||||
prog->GLSL_Version < 300) {
|
||||
linker_warning(prog, "%s `%s' declared as type "
|
||||
"`%s' and type `%s'\n",
|
||||
gl_nir_mode_string(var),
|
||||
var->name, glsl_get_type_name(var->type),
|
||||
glsl_get_type_name(existing->type));
|
||||
|
||||
} else {
|
||||
linker_error(prog, "%s `%s' declared as type "
|
||||
"`%s' and type `%s'\n",
|
||||
gl_nir_mode_string(var),
|
||||
var->name, glsl_get_type_name(var->type),
|
||||
glsl_get_type_name(existing->type));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode ful
|
|||
spec@!opengl 1.0@rasterpos,Fail
|
||||
spec@!opengl 1.0@rasterpos@glsl_vs_gs_linked,Fail
|
||||
spec@!opengl 1.0@rasterpos@glsl_vs_tes_linked,Fail
|
||||
# This is caused by lowering mediump before linking:
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
|
||||
# See Khronos issue 5587: the test expects one-dimensional (array) texture to work while
|
||||
# it's explicitely marked as non-supported by EXT_sparse_texture2.
|
||||
|
|
|
|||
|
|
|
@ -22,8 +22,6 @@ spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail
|
|||
spec@!opengl 1.0@rasterpos,Fail
|
||||
spec@!opengl 1.0@rasterpos@glsl_vs_gs_linked,Fail
|
||||
spec@!opengl 1.0@rasterpos@glsl_vs_tes_linked,Fail
|
||||
# This is caused by lowering mediump before linking:
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
|
||||
# glcts failures
|
||||
## Test issue - https://github.com/KhronosGroup/VK-GL-CTS/issues/251
|
||||
|
|
|
|||
|
|
|
@ -124,7 +124,6 @@ spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SR
|
|||
spec@ext_texture_srgb@texwrap formats-s3tc bordercolor-swizzled@GL_COMPRESSED_SRGB_S3TC_DXT1_EXT- swizzled- border color only,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency other,Fail
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gl srgb-fp,Fail
|
||||
|
|
|
|||
|
|
|
@ -35,7 +35,6 @@ spec@glsl-4.00@compiler@built-in-functions@texturequerylod-sampler2darrayshadow.
|
|||
spec@glsl-4.00@compiler@built-in-functions@texturequerylod-sampler2dshadow.frag,Crash
|
||||
spec@glsl-4.00@compiler@built-in-functions@texturequerylod-samplercubearrayshadow.frag,Crash
|
||||
spec@glsl-4.00@compiler@built-in-functions@texturequerylod-samplercubeshadow.frag,Crash
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency ffs,Fail
|
||||
spec@glsl-1.50@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip_adjacency other,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
|
|
|
|||
|
|
|
@ -257,7 +257,6 @@ spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2d,Fail
|
|||
spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2d_projvec4,Fail
|
||||
spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 2dshadow,Fail
|
||||
spec@glsl-1.30@execution@tex-miplevel-selection textureprojgradoffset 3d,Fail
|
||||
spec@glsl-es-1.00@linker@glsl-mismatched-uniform-precision-unused,Fail
|
||||
spec@intel_blackhole_render@intel_blackhole-draw_gles2,Crash
|
||||
spec@intel_blackhole_render@intel_blackhole-draw_gles3,Crash
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue