Rename `struct glsl_type`?
Here are a few suggestions that I'd like to get feedback from other developers working on Mesa:
-
Add and use a typedef for
struct glsl_type
and the related types. (DONE)WHY? Smaller type name when used for
const struct glsl_type *
, reduce noise ratio in code.LANDED typedef in !26708 (merged).
-
Rename
glsl_type
.WHY? They are not GLSL-specific anymore.
2A) Rename
glsl_type
tomc_type
. MC standing for Mesa Compiler.2B) Rename
glsl_type
tonir_type
. We would make the small amount of existing references to nir_type into nir_ssa_type.2C) Rename
glsl_type
tomesa_type
.2D) Some other suggestion?
-
Move C++ wrapper out. (DONE)
WHY? Avoid new code accidentally using it. Remove the need to write wrapping functions. Possibly remove the out-of-line C++ implementations.
3A) Delete it and start using the C functions in src/compiler/glsl. No wrapper or wrapping functions needed, same API along the entire codebase.
3B) Move it into src/compiler/glsl code, which is its main user. This is easier to do if we do the rename (as we can keep the name glsl_type for the C++ wrapper inside glsl). The other usages of the wrapping are in src/intel/compiler, I'll just apply option (3A) for those regardless.
LANDED option 3A in !26707 (merged)