diff options
author | Brian Paul <[email protected]> | 2009-01-14 11:58:45 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-14 11:58:45 -0700 |
commit | b5f89e5f17bdf718d1f1f29e7a10dee3809c9f29 (patch) | |
tree | abedcbb279e20649a56707f41c857f9891841bd1 /src/mesa/shader/slang/slang_ir.c | |
parent | c12d24b513a67648c30bf892964f887fad71e103 (diff) |
glsl: simplify IR storage for samplers
Don't overload the Size field with the texture target, to avoid confusion.
Diffstat (limited to 'src/mesa/shader/slang/slang_ir.c')
-rw-r--r-- | src/mesa/shader/slang/slang_ir.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index c33c80da999..e4c6e0ea516 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 7.1 * * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -216,6 +216,26 @@ _slang_new_ir_storage_indirect(enum register_file file, } +/** + * Allocate IR storage for a texture sampler. + * \param sampNum the sampler number/index + * \param texTarget one of TEXTURE_x_INDEX values + * \param size number of samplers (in case of sampler array) + */ +slang_ir_storage * +_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size) +{ + slang_ir_storage *st; + assert(texTarget < NUM_TEXTURE_TARGETS); + st = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, size); + if (st) { + st->TexTarget = texTarget; + } + return st; +} + + + /* XXX temporary function */ void _slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src) |