mesa/src/compiler/spirv
Charlie Turner 786fa3435c spirv_to_nir: Add environment variable to change default log level
During dEQP runs for radv, I see a lot of warnings like,

ERROR - dEQP error: SPIR-V WARNING:
ERROR - dEQP error:     In file ../src/compiler/spirv/spirv_to_nir.c:1073
ERROR - dEQP error:     Decoration not allowed on struct members: SpvDecorationRestrict
ERROR - dEQP error:     408 bytes into the SPIR-V binary

This fails jobs on Gitlab, due to,

Job's log exceeded limit of 4194304 bytes.
Job execution will continue but no more output will be collected.

Since it doesn't seem feasible right now to fix the many shaders in
the VK-CTS triggering this warning, add an environment toggle that
allows test runners to only see the level of commentary they want.

v2 from Martin:
 - Add my SoB

v3 from Martin:
 - fix the indentation (suggested by Eric)
 - put the declarations at the top of the function

v4 from Martin:
 - make vtn_default_log_level() static (Marcin)
 - cache the default level in vtn_log (Marcin)
 - move vtn_log_level_strings inside vtn_default_log_level()
 - Fix the build issue on MSC

Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
2021-06-22 13:59:43 +03:00
..
tests spirv: Initialize spirv_test member shader. 2020-09-09 22:24:09 +00:00
gl_spirv.c spirv: workaround setjmp/longjmp crash on MinGW 2020-11-18 13:53:36 +00:00
GLSL.ext.AMD.h spirv: import AMD extensions header from glslang 2018-03-07 23:09:58 +01:00
GLSL.std.450.h spirv: bump headers to SPIRV 1.1 2017-01-25 17:22:23 +00:00
meson.build spirv: add and use a generator id enum 2020-10-12 11:07:38 +00:00
nir_load_libclc.c nir_load_libclc: Mark libclc shader as internal 2020-11-18 04:05:37 +00:00
nir_lower_libclc.c spirv: Move nir_lower_libclc to src/compiler/spirv 2020-10-07 21:52:04 +00:00
nir_spirv.h spirv_to_nir: Add environment variable to change default log level 2021-06-22 13:59:43 +03:00
OpenCL.std.h spirv: Update the OpenCL.std.h header 2019-06-04 12:12:51 -07:00
spir-v.xml spirv: Update headers and metadata from latest Khronos commit 2021-03-18 00:13:40 +00:00
spirv.core.grammar.json spirv: Update headers and metadata from latest Khronos commit 2021-03-18 00:13:40 +00:00
spirv.h spirv: Update headers and metadata from latest Khronos commit 2021-03-18 00:13:40 +00:00
spirv2nir.c spirv2nir: Add --opengl (-g) argument for OpenGL SPIR-V 2020-12-22 09:34:00 -08:00
spirv_info.h spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_info_c.py spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_to_nir.c spirv_to_nir: Add environment variable to change default log level 2021-06-22 13:59:43 +03:00
vtn_alu.c spirv: handle NoContraction in GLSL450 alu ops 2021-01-23 01:39:09 +00:00
vtn_amd.c nir,amd: Suffix nir_op_cube_face_coord/index with _amd 2021-06-21 09:03:34 -05:00
vtn_cfg.c spirv: Fix handling of OpBranchConditional with same THEN and ELSE 2021-06-17 20:05:39 +00:00
vtn_gather_types_c.py spirv: Handle instruction aliases in vtn_gather_types 2020-04-24 05:56:05 +00:00
vtn_generator_ids_h.py android: fix SPIR-V -> NIR build 2020-10-12 22:26:05 +00:00
vtn_glsl450.c spirv: handle NoContraction in GLSL450 alu ops 2021-01-23 01:39:09 +00:00
vtn_opencl.c vtn: Use relaxed 24bit opcodes for CL 24bit math 2021-05-05 22:06:42 +00:00
vtn_private.h spirv: Fix handling of OpBranchConditional with same THEN and ELSE 2021-06-17 20:05:39 +00:00
vtn_subgroup.c spirv: Implement SpvCapabilitySubgroupShuffleINTEL from SPV_INTEL_subgroups 2020-11-04 20:24:48 +00:00
vtn_variables.c nir: Move zero_initialize_shared_memory into common shader_info 2021-06-08 09:23:55 -07:00