11c131752c3e07ef91f49d4970dafca6d26585334Brian Paul/*
21c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * Mesa 3-D graphics library
31c131752c3e07ef91f49d4970dafca6d26585334Brian Paul *
41c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
51c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * Copyright (C) 2009-2010  VMware, Inc.  All Rights Reserved.
61c131752c3e07ef91f49d4970dafca6d26585334Brian Paul *
71c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * Permission is hereby granted, free of charge, to any person obtaining a
81c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * copy of this software and associated documentation files (the "Software"),
91c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * to deal in the Software without restriction, including without limitation
101c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * the rights to use, copy, modify, merge, publish, distribute, sublicense,
111c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * and/or sell copies of the Software, and to permit persons to whom the
121c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * Software is furnished to do so, subject to the following conditions:
131c131752c3e07ef91f49d4970dafca6d26585334Brian Paul *
141c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * The above copyright notice and this permission notice shall be included
151c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * in all copies or substantial portions of the Software.
161c131752c3e07ef91f49d4970dafca6d26585334Brian Paul *
171c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
181c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
191c131752c3e07ef91f49d4970dafca6d26585334Brian Paul * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
203d8d5b298a268b119d840bc9bae0ee9e0c9244a9Kenneth Graunke * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
213d8d5b298a268b119d840bc9bae0ee9e0c9244a9Kenneth Graunke * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
223d8d5b298a268b119d840bc9bae0ee9e0c9244a9Kenneth Graunke * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
233d8d5b298a268b119d840bc9bae0ee9e0c9244a9Kenneth Graunke * OTHER DEALINGS IN THE SOFTWARE.
241c131752c3e07ef91f49d4970dafca6d26585334Brian Paul */
251c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
261c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
271c131752c3e07ef91f49d4970dafca6d26585334Brian Paul#ifndef PIXELTRANSFER_H
281c131752c3e07ef91f49d4970dafca6d26585334Brian Paul#define PIXELTRANSFER_H
291c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
301c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
311c131752c3e07ef91f49d4970dafca6d26585334Brian Paul#include "mtypes.h"
321c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
331c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
341c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
351c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
361c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                          GLfloat rScale, GLfloat gScale,
371c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                          GLfloat bScale, GLfloat aScale,
381c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                          GLfloat rBias, GLfloat gBias,
391c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                          GLfloat bBias, GLfloat aBias);
401c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
411c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
421c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_map_rgba(const struct gl_context *ctx, GLuint n, GLfloat rgba[][4]);
431c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
441c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
451c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_map_ci_to_rgba(const struct gl_context *ctx,
461c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                     GLuint n, const GLuint index[], GLfloat rgba[][4]);
471c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
481c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
491c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
501c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
511c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                           GLfloat depthValues[]);
521c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
531c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
541c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
551c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                                GLuint depthValues[]);
561c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
571c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
581c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
591c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                              GLuint n, GLfloat rgba[][4]);
601c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
611c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
621c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_shift_and_offset_ci(const struct gl_context *ctx,
631c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                          GLuint n, GLuint indexes[]);
641c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
651c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
661c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
671c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                            GLbitfield transferOps,
681c131752c3e07ef91f49d4970dafca6d26585334Brian Paul                            GLuint n, GLuint indexes[]);
691c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
701c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
711c131752c3e07ef91f49d4970dafca6d26585334Brian Paulextern void
721c131752c3e07ef91f49d4970dafca6d26585334Brian Paul_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
736d68855df133bdd4891e8aa428787b520739e0feBrian Paul                                 GLubyte stencil[]);
741c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
751c131752c3e07ef91f49d4970dafca6d26585334Brian Paul
761c131752c3e07ef91f49d4970dafca6d26585334Brian Paul#endif
77