mesa/src/mesa
Gregory Hainaut 03d1de387e mesa: avoid NULL ptr in prog parameter name
Context: _mesa_add_parameter is sometimes[0] called with a
NULL name as a mean of an unnamed parameter.

Allowing NULL pointer as a name means that it must be NULL checked
each access. So far it isn't always[1] true.

Parameter name is only used for debug purpose (printf) and
to lookup the index/location of the program by the application.

Conclusion, there is no valid reason to use a NULL pointer instead of
an empty string. So it was decided to use an empty string which avoid all
issues related to NULL pointer

[0]: texture gather offsets glsl opcode and st_init_atifs_prog
[1]: at least shader cache, st_nir_lookup_parameter_index and some printfs

Issue found by piglit 'texturegatheroffsets' tests on Nouveau

v4: new patch based on Nicolai/Timothy/ilia discussion
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-04-12 14:30:28 +10:00
..
drivers i965/drm: Use bools for a few flags. 2017-04-11 21:07:45 -07:00
main mesa: use pre_hashed version of search for the mesa hash table 2017-04-12 12:00:35 +10:00
math mesa: Remove every double semi-colon 2016-04-26 14:36:29 -07:00
program mesa: avoid NULL ptr in prog parameter name 2017-04-12 14:30:28 +10:00
sparc
state_tracker mesa/st: remove _mesa_get_fallback_texture() calls 2017-04-12 12:00:35 +10:00
swrast swrast: take ownership rather than adding reference for new renderbuffers 2017-04-10 10:55:34 +10:00
swrast_setup
tnl tnl: remove unused var to silence warning 2017-03-31 13:30:54 -06:00
tnl_dd
vbo mesa/vbo: remove redundant _mesa_is_bufferobj() calls 2017-03-31 11:54:37 +11:00
x86 mesa: more unused linux/version.h include 2017-03-22 16:55:21 +00:00
x86-64 mesa: Use SSE prefetch instructions rather than 3DNow instructions 2016-02-04 22:02:31 +11:00
.gitignore
Android.gen.mk glapi: Generate GL API marshalling code from the XML. 2017-03-16 14:14:18 +11:00
Android.libmesa_dricore.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.libmesa_glsl_utils.mk mesa: Remove prog_hash_table.c 2016-09-12 10:48:35 +10:00
Android.libmesa_sse41.mk android: pass sse4.1 flag as appropriate 2017-03-30 08:02:49 +03:00
Android.libmesa_st_mesa.mk android: st/mesa: fix building error in libmesa_st_mesa 2017-01-11 10:16:19 +02:00
Android.mesa_gen_matypes.mk Android: fix build break from nir/glsl move to compiler/ 2016-02-29 10:51:44 +00:00
Android.mk Android: fix x86 gallium builds 2016-04-01 13:44:22 +01:00
gl.pc.in
Makefile.am autoconf: Make header install distinct for various APIs (v2) 2016-10-06 15:03:46 +01:00
Makefile.sources mesa: automake: add all headers to the tarball. 2017-03-17 13:10:09 +00:00
SConscript scons: Fix dependencies of marshal_generated.[ch]. 2017-03-26 21:30:34 +01:00