compiler/types: Use designated initializer syntax to specify builtins
authorCaio Oliveira <caio.oliveira@intel.com>
Fri, 1 Sep 2023 05:28:29 +0000 (22:28 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 13 Sep 2023 05:16:58 +0000 (05:16 +0000)
commit6bf0654f4a1eb02303fdd14514a1f8026e67560a
treeb4e7267ebb505a93d5ec61f4490f68440631478f
parent3a3318364bfb092d9ebcf532f9fc57dcb4c49bd6
compiler/types: Use designated initializer syntax to specify builtins

For now we use a temporary glsl_type_params struct, we will be able to
use the glsl_type directly once we make it a POD ("plain old data")
struct by getting rid of its constructors and destructors.

Note that since the name is statically allocated, there's no need to
strdup() it, deallocate it and also no need to have a mem_ctx.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25006>
src/compiler/builtin_type_macros.h
src/compiler/glsl_types.cpp
src/compiler/glsl_types.h