Mesa (master): glsl: Explain file naming convention
Ian Romanick
idr at kemper.freedesktop.org
Mon Sep 13 21:12:48 UTC 2010
Module: Mesa
Branch: master
Commit: e79a1bb02a0ce3c265c4a64c117018a9207064c9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e79a1bb02a0ce3c265c4a64c117018a9207064c9
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Sep 13 13:46:29 2010 -0700
glsl: Explain file naming convention
---
src/glsl/README | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/glsl/README b/src/glsl/README
index 62742bf..dd80a53 100644
--- a/src/glsl/README
+++ b/src/glsl/README
@@ -215,3 +215,15 @@ talloc_parent() call is expensive, so many passes will cache the
result of the first talloc_parent(). Cleaning up all the optimization
passes to take a context argument and not call talloc_parent() is left
as an exercise.
+
+Q: What is the file naming convention in this directory?
+
+Initially, there really wasn't one. We have since adopted one:
+
+ - Files that implement code lowering passes should be named lower_*
+ (e.g., lower_noise.cpp).
+ - Files that implement optimization passes should be named opt_*.
+ - Files that implement a class that is used throught the code should
+ take the name of that class (e.g., ir_hierarchical_visitor.cpp).
+ - Files that contain code not fitting in one of the previous
+ categories should have a sensible name (e.g., glsl_parser.ypp).
More information about the mesa-commit
mailing list