summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTilman Sauerbeck <[email protected]>2006-06-23 16:47:08 +0000
committerTilman Sauerbeck <[email protected]>2006-06-23 16:47:08 +0000
commit0deb088cf070ef42a68b02952e755dda47d7c235 (patch)
tree53e42af6e10ecf6c24f4b131ec5fd65a9b373442
parent3cb56804cae3d719c51064f527bea80d06fb5959 (diff)
more cleanups
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertexprog.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c
index ee9c327cb76..c62a5863eb9 100644
--- a/src/mesa/drivers/dri/r300/r300_vertexprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c
@@ -44,7 +44,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
SWIZZLE_Z != VSF_IN_COMPONENT_Z || \
SWIZZLE_W != VSF_IN_COMPONENT_W || \
SWIZZLE_ZERO != VSF_IN_COMPONENT_ZERO || \
- SWIZZLE_ONE != VSF_IN_COMPONENT_ONE
+ SWIZZLE_ONE != VSF_IN_COMPONENT_ONE || \
+ WRITEMASK_X != VSF_FLAG_X || \
+ WRITEMASK_Y != VSF_FLAG_Y || \
+ WRITEMASK_Z != VSF_FLAG_Z || \
+ WRITEMASK_W != VSF_FLAG_W
#error Cannot change these!
#endif
@@ -142,14 +146,8 @@ int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, f
static unsigned long t_dst_mask(GLuint mask)
{
- unsigned long flags=0;
-
- if(mask & WRITEMASK_X) flags |= VSF_FLAG_X;
- if(mask & WRITEMASK_Y) flags |= VSF_FLAG_Y;
- if(mask & WRITEMASK_Z) flags |= VSF_FLAG_Z;
- if(mask & WRITEMASK_W) flags |= VSF_FLAG_W;
-
- return flags;
+ /* WRITEMASK_* is equivalent to VSF_FLAG_* */
+ return mask & VSF_FLAG_ALL;
}
static unsigned long t_dst_class(enum register_file file)