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.h | |
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.h')
-rw-r--r-- | src/mesa/shader/slang/slang_ir.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index a258e92e06f..644269d491c 100644 --- a/src/mesa/shader/slang/slang_ir.h +++ b/src/mesa/shader/slang/slang_ir.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 * - * Copyright (C) 2005-2007 Brian Paul All Rights Reserved. + * 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"), @@ -168,8 +168,8 @@ typedef enum struct slang_ir_storage_ { enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */ - GLint Index; /**< -1 means unallocated */ - GLint Size; /**< number of floats */ + GLint Index; /**< -1 means unallocated */ + GLint Size; /**< number of floats or ints */ GLuint Swizzle; /**< Swizzle AND writemask info */ GLint RefCount; /**< Used during IR tree delete */ @@ -179,6 +179,7 @@ struct slang_ir_storage_ enum register_file IndirectFile; GLint IndirectIndex; GLuint IndirectSwizzle; + GLuint TexTarget; /**< If File==PROGRAM_SAMPLER, one of TEXTURE_x_INDEX */ /** If Parent is non-null, Index is relative to parent. * The other fields are ignored. @@ -254,6 +255,10 @@ _slang_new_ir_storage_indirect(enum register_file file, GLint indirectIndex, GLuint indirectSwizzle); +extern slang_ir_storage * +_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size); + + extern void _slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src); |