summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_tex.c4
-rw-r--r--src/mesa/drivers/dri/sis/sis_texstate.c30
3 files changed, 33 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index 642560a0d9..416ffdac69 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -81,7 +81,7 @@ struct dri_extension card_extensions[] =
{ "GL_EXT_texture_lod_bias", NULL },
{ "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
{ "GL_EXT_stencil_wrap", NULL },
- /*{ "GL_MESA_ycbcr_texture", NULL },*/ /* not working yet */
+ { "GL_MESA_ycbcr_texture", NULL },
{ "GL_NV_blend_square", NULL },
{ NULL, NULL }
};
diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c
index a97bed833a..be87f16e29 100644
--- a/src/mesa/drivers/dri/sis/sis_tex.c
+++ b/src/mesa/drivers/dri/sis/sis_tex.c
@@ -96,10 +96,10 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level,
t->hwformat = TEXEL_AL88;
break;
case MESA_FORMAT_YCBCR:
- t->hwformat = TEXEL_YVU422; /* Doesn't work? Extension disabled */
+ t->hwformat = TEXEL_YUV422;
break;
case MESA_FORMAT_YCBCR_REV:
- t->hwformat = TEXEL_YUV422; /* Doesn't work? Extension disabled */
+ t->hwformat = TEXEL_VUY422;
break;
default:
sis_fatal_error("Bad texture format 0x%x.\n",
diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c
index 2a9bd56bb2..b9942174fe 100644
--- a/src/mesa/drivers/dri/sis/sis_texstate.c
+++ b/src/mesa/drivers/dri/sis/sis_texstate.c
@@ -73,6 +73,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor0 = STAGE0_C_CS;
current->hwTexBlendAlpha0 = STAGE0_A_AF;
break;
@@ -82,6 +83,8 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor0 = STAGE0_C_CS;
current->hwTexBlendAlpha0 = STAGE0_A_AS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -94,6 +97,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor0 = STAGE0_C_CFCS;
current->hwTexBlendAlpha0 = STAGE0_A_AF;
break;
@@ -103,6 +107,8 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor0 = STAGE0_C_CFCS;
current->hwTexBlendAlpha0 = STAGE0_A_AFAS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -110,6 +116,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
switch (t->format)
{
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor0 = STAGE0_C_CS;
current->hwTexBlendAlpha0 = STAGE0_A_AF;
break;
@@ -117,6 +124,8 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor0 = STAGE0_C_CFOMAS_CSAS;
current->hwTexBlendAlpha0 = STAGE0_A_AF;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -134,6 +143,7 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor0 = STAGE0_C_CFOMCS_CCCS;
current->hwTexBlendAlpha0 = STAGE0_A_AF;
break;
@@ -146,8 +156,13 @@ sis_set_texture_env0( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor0 = STAGE0_C_CFOMCS_CCCS;
current->hwTexBlendAlpha0 = STAGE0_A_AFAS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
+
+ default:
+ sis_fatal_error("unknown env mode 0x%x\n", texture_unit->EnvMode);
}
if ((current->hwTexBlendColor0 != prev->hwTexBlendColor0) ||
@@ -187,6 +202,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor1 = STAGE1_C_CS;
current->hwTexBlendAlpha1 = STAGE1_A_AF;
break;
@@ -196,6 +212,8 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor1 = STAGE1_C_CS;
current->hwTexBlendAlpha1 = STAGE1_A_AS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -208,6 +226,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor1 = STAGE1_C_CFCS;
current->hwTexBlendAlpha1 = STAGE1_A_AF;
break;
@@ -217,6 +236,8 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor1 = STAGE1_C_CFCS;
current->hwTexBlendAlpha1 = STAGE1_A_AFAS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -224,6 +245,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
switch (t->format)
{
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor1 = STAGE1_C_CS;
current->hwTexBlendAlpha1 = STAGE1_A_AF;
break;
@@ -231,6 +253,8 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor1 = STAGE1_C_CFOMAS_CSAS;
current->hwTexBlendAlpha1 = STAGE1_A_AF;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
@@ -248,6 +272,7 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
break;
case GL_LUMINANCE:
case GL_RGB:
+ case GL_YCBCR_MESA:
current->hwTexBlendColor1 = STAGE1_C_CFOMCS_CCCS;
current->hwTexBlendAlpha1 = STAGE1_A_AF;
break;
@@ -260,8 +285,13 @@ sis_set_texture_env1( GLcontext *ctx, struct gl_texture_object *texObj,
current->hwTexBlendColor1 = STAGE1_C_CFOMCS_CCCS;
current->hwTexBlendAlpha1 = STAGE1_A_AFAS;
break;
+ default:
+ sis_fatal_error("unknown base format 0x%x\n", t->format);
}
break;
+
+ default:
+ sis_fatal_error("unknown env mode 0x%x\n", texture_unit->EnvMode);
}
if ((current->hwTexBlendColor1 != prev->hwTexBlendColor1) ||