summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_utility.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2006-12-13 14:48:36 -0700
committerBrian <[email protected]>2006-12-13 14:48:36 -0700
commitaff8e204d205b5d424d2c39a5d9e004caaa1eab1 (patch)
tree91d06d422f8900af461233186bcc79351c3025f6 /src/mesa/shader/slang/slang_utility.c
parent5b35132b41427798e02a66a8e39583fffbe9d232 (diff)
Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions.
Diffstat (limited to 'src/mesa/shader/slang/slang_utility.c')
-rw-r--r--src/mesa/shader/slang/slang_utility.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c
index 256d52455db..314ecc8d759 100644
--- a/src/mesa/shader/slang/slang_utility.c
+++ b/src/mesa/shader/slang/slang_utility.c
@@ -220,3 +220,16 @@ slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom)
return (const char *) (atom);
}
+
+/**
+ * Generate a new, unique atom with given prefix.
+ */
+slang_atom
+slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix)
+{
+ char name[1000];
+ static int nextFree = 100;
+ sprintf(name, "%s%d", prefix, nextFree);
+ nextFree++;
+ return slang_atom_pool_atom(pool, name);
+}