From 01df5d59e56a1b060568f8cad2e89f7eea22fc70 Mon Sep 17 00:00:00 2001
From: marha
+Line width: the preferred width to fill comments and code in Mesa is 78 +columns. Exceptions are sometimes made for clarity (e.g. tabular data is +sometimes filled to a much larger width so that extraneous carriage returns +don't obscure the table). +
+Brace example:
@@ -81,10 +88,26 @@ Brace example: else { bar; } + + switch (condition) { + case 0: + foo(); + break; + + case 1: { + ... + break; + } + + default: + ... + break; + }Here's the GNU indent command which will best approximate my preferred style: +(Note that it won't format switch statements in the preferred way)
indent -br -i3 -npcs --no-tabs infile.c -o outfile.c @@ -114,6 +137,16 @@ Function name examples: _mesa_foo_bar() - an internal non-static Mesa function+
+Places that are not directly visible to the GL API should prefer the use +of bool, true, and +false over GLboolean, GL_TRUE, and +GL_FALSE. In C code, this may mean that +#include <stdbool.h> need to be added. The +try_emit_* methods in src/mesa/program/ir_to_mesa.cpp and +src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as an example. +
+