mesa/src/compiler
Danylo Piliaiev 600c91fed8 glsl/list: Fix undefined behaviour of foreach_* macros
These macros produced a lot of errors with ubsan preventing us from
expanding the ubsan coverage on CIs.

C++ spec has such clause:

 "If the prvalue of type "pointer to cv1 B" points to a B that is
  actually a subobject of an object of type D, the resulting pointer
  points to the enclosing object of type D. Otherwise, the result
  of the cast is undefined."

Ubsan error example:

 ../src/compiler/glsl/builtin_functions.cpp:4945:4: runtime error: downcast of address 0x559b926abb50 which does not point to an object of type 'ir_instruction'
 0x559b926abb50: note: object has invalid vptr
  9b 55 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  58 ba 6a 92 9b 55 00 00  01 00 00 00
               ^~~~~~~~~~~~~~~~~~~~~~~
               invalid vptr
     #0 0x559b914dbe1a in call ../src/compiler/glsl/builtin_functions.cpp:4945

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4129>
2020-04-14 19:29:38 +00:00
..
glsl glsl/list: Fix undefined behaviour of foreach_* macros 2020-04-14 19:29:38 +00:00
nir ir3: Plumb through bindless support 2020-04-09 15:56:55 +00:00
spirv Revert "spirv: Rewrite CFG construction" 2020-04-04 09:47:00 -05:00
Android.glsl.gen.mk mesa: android: Remove unnecessary dependency tracking rules 2019-05-06 11:29:25 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk nir: Add missing dependency in Android.nir.gen.mk 2019-08-19 09:53:18 +03:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
builtin_type_macros.h glsl_types: vec8/vec16 support 2018-03-25 10:42:54 -04:00
glsl_types.cpp glsl: fix race in instance getters 2020-03-30 20:17:43 +00:00
glsl_types.h glsl: Add type queries for fp16+float and fp16+float+double 2020-03-09 16:31:08 +00:00
Makefile.sources glsl: Inline builtins in a separate pass 2020-03-24 23:21:21 +00:00
meson.build meson: inline inc_common 2020-03-28 21:36:54 +01:00
nir_types.cpp nir/lower_amul: fix slot calculation 2020-04-06 18:00:17 +00:00
nir_types.h nir/lower_amul: fix slot calculation 2020-04-06 18:00:17 +00:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl Move compiler.h and imports.h/c from src/mesa/main into src/util 2020-03-27 21:00:09 +00:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c compiler: add new SYSTEM_VALUE_BARYCENTRIC_* 2020-01-29 09:49:50 +00:00
shader_enums.h compiler: add new SYSTEM_VALUE_BARYCENTRIC_* 2020-01-29 09:49:50 +00:00
shader_info.h intel/compiler: Add support for variable workgroup size 2020-04-09 19:23:12 -07:00