From b5f89e5f17bdf718d1f1f29e7a10dee3809c9f29 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Jan 2009 11:58:45 -0700 Subject: glsl: simplify IR storage for samplers Don't overload the Size field with the texture target, to avoid confusion. --- src/mesa/shader/slang/slang_ir.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa/shader/slang/slang_ir.h') diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h index a258e92e06..644269d491 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); -- cgit v1.2.3