mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-26 08:08:09 +02:00
Leaving it until 'run' is bad as the primitive is pretty much state for some drivers and so needs to get set early. In some drivers this is used to determine things like vertex format, etc -- by the time we get to 'run', it's too late to change this. |
||
|---|---|---|
| .. | ||
| auxiliary | ||
| drivers | ||
| include/pipe | ||
| state_trackers | ||
| winsys | ||
| Makefile | ||
| Makefile.template | ||
| README.portability | ||
| SConscript | ||
CROSS-PLATFORM PORTABILITY GUIDELINES FOR GALLIUM3D = General Considerations = The state tracker and winsys driver support a rather limited number of platforms. However, the pipe drivers are meant to run in a wide number of platforms. Hence the pipe drivers, the auxiliary modules, and all public headers in general, should stricly follow these guidelines to ensure = Compiler Support = * Include the p_compiler.h. * Don't use the 'inline' keyword, use the INLINE macro in p_compiler.h instead. * Cast explicitly when converting to integer types of smaller sizes. * Cast explicitly when converting between float, double and integral types. * Don't use named struct initializers. * Don't use variable number of macro arguments. Use static inline functions instead. = Standard Library = * Avoid including standard library headers. Most standard library functions are not available in Windows Kernel Mode. Use the appropriate p_*.h include. == Memory Allocation == * Use MALLOC, CALLOC, FREE instead of the malloc, calloc, free functions. * Use align_pointer() function defined in p_util.h for aligning pointers in a portable way. == Debugging == * Use the functions/macros in p_debug.h. * Don't include assert.h, call abort, printf, etc.