From aff8e204d205b5d424d2c39a5d9e004caaa1eab1 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:48:36 -0700 Subject: Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions. --- src/mesa/shader/slang/slang_utility.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/shader/slang/slang_utility.c') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 256d52455d..314ecc8d75 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); +} -- cgit v1.2.3