summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index dae173d1bd..1b0d760fae 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -63,7 +63,7 @@ static const struct gl_tex_env_combine_state default_combine_state = {
* Used by glXCopyContext to copy texture state from one context to another.
*/
void
-_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
+_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst )
{
GLuint u, tex;
@@ -119,7 +119,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
* For debugging
*/
void
-_mesa_print_texunit_state( GLcontext *ctx, GLuint unit )
+_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
{
const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
printf("Texture Unit %d\n", unit);
@@ -179,6 +179,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
break;
case GL_LUMINANCE:
+ case GL_RED:
+ case GL_RG:
case GL_RGB:
case GL_YCBCR_MESA:
case GL_DUDV_ATI:
@@ -219,6 +221,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
case GL_INTENSITY:
state->SourceRGB[0] = GL_PREVIOUS;
break;
+ case GL_RED:
+ case GL_RG:
case GL_RGB:
case GL_YCBCR_MESA:
case GL_DUDV_ATI:
@@ -244,6 +248,8 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
state->OperandA[2] = GL_SRC_ALPHA;
/* FALLTHROUGH */
case GL_LUMINANCE:
+ case GL_RED:
+ case GL_RG:
case GL_RGB:
case GL_LUMINANCE_ALPHA:
case GL_RGBA:
@@ -357,7 +363,7 @@ _mesa_ClientActiveTextureARB(GLenum texture)
* \param ctx GL context.
*/
static void
-update_texture_matrices( GLcontext *ctx )
+update_texture_matrices( struct gl_context *ctx )
{
GLuint u;
@@ -380,7 +386,7 @@ update_texture_matrices( GLcontext *ctx )
* Examine texture unit's combine/env state to update derived state.
*/
static void
-update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit)
+update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit)
{
struct gl_tex_env_combine_state *combine;
@@ -483,7 +489,7 @@ update_tex_combine(GLcontext *ctx, struct gl_texture_unit *texUnit)
* \param ctx GL context.
*/
static void
-update_texture_state( GLcontext *ctx )
+update_texture_state( struct gl_context *ctx )
{
GLuint unit;
struct gl_fragment_program *fprog = NULL;
@@ -647,7 +653,7 @@ update_texture_state( GLcontext *ctx )
* Update texture-related derived state.
*/
void
-_mesa_update_texture( GLcontext *ctx, GLuint new_state )
+_mesa_update_texture( struct gl_context *ctx, GLuint new_state )
{
if (new_state & _NEW_TEXTURE_MATRIX)
update_texture_matrices( ctx );
@@ -672,7 +678,7 @@ _mesa_update_texture( GLcontext *ctx, GLuint new_state )
* GL_FALSE.
*/
static GLboolean
-alloc_proxy_textures( GLcontext *ctx )
+alloc_proxy_textures( struct gl_context *ctx )
{
static const GLenum targets[] = {
GL_TEXTURE_1D,
@@ -710,7 +716,7 @@ alloc_proxy_textures( GLcontext *ctx )
* \param unit texture unit number to be initialized.
*/
static void
-init_texture_unit( GLcontext *ctx, GLuint unit )
+init_texture_unit( struct gl_context *ctx, GLuint unit )
{
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
GLuint tex;
@@ -758,7 +764,7 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
* Initialize texture state for the given context.
*/
GLboolean
-_mesa_init_texture(GLcontext *ctx)
+_mesa_init_texture(struct gl_context *ctx)
{
GLuint u;
@@ -790,7 +796,7 @@ _mesa_init_texture(GLcontext *ctx)
* Free dynamically-allocted texture data attached to the given context.
*/
void
-_mesa_free_texture_data(GLcontext *ctx)
+_mesa_free_texture_data(struct gl_context *ctx)
{
GLuint u, tgt;
@@ -819,7 +825,7 @@ _mesa_free_texture_data(GLcontext *ctx)
* shared state.
*/
void
-_mesa_update_default_objects_texture(GLcontext *ctx)
+_mesa_update_default_objects_texture(struct gl_context *ctx)
{
GLuint u, tex;