summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c1
-rw-r--r--src/mesa/drivers/dri/sis/sis_dd.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_state.c34
3 files changed, 27 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index a9b791f101..0d15bfa5e9 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -65,6 +65,7 @@ static const char * const card_extensions[] =
{
"GL_ARB_multitexture",
"GL_EXT_texture_lod_bias",
+ "GL_NV_blend_square",
NULL
};
diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c
index 010e1c5739..4049a106b6 100644
--- a/src/mesa/drivers/dri/sis/sis_dd.c
+++ b/src/mesa/drivers/dri/sis/sis_dd.c
@@ -44,7 +44,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "utils.h"
-#define DRIVER_DATE "20040925"
+#define DRIVER_DATE "20041008"
/* Return the width and height of the given buffer.
*/
diff --git a/src/mesa/drivers/dri/sis/sis_state.c b/src/mesa/drivers/dri/sis/sis_state.c
index 422059b86b..2cca1611df 100644
--- a/src/mesa/drivers/dri/sis/sis_state.c
+++ b/src/mesa/drivers/dri/sis/sis_state.c
@@ -107,9 +107,7 @@ sisDDBlendFuncSeparate( GLcontext *ctx,
__GLSiSHardware *prev = &smesa->prev;
__GLSiSHardware *current = &smesa->current;
- /* TODO: in ICD, if no blend, it will reset these value */
- /* blending enable */
- current->hwDstSrcBlend = 0x10000; /* Default destination alpha */
+ current->hwDstSrcBlend = 0;
switch (dfactorRGB)
{
@@ -131,12 +129,21 @@ sisDDBlendFuncSeparate( GLcontext *ctx,
case GL_ONE_MINUS_SRC_ALPHA:
current->hwDstSrcBlend |= SiS_D_ONE_MINUS_SRC_ALPHA;
break;
+ case GL_DST_COLOR:
+ current->hwDstSrcBlend |= SiS_D_DST_COLOR;
+ break;
+ case GL_ONE_MINUS_DST_COLOR:
+ current->hwDstSrcBlend |= SiS_D_ONE_MINUS_DST_COLOR;
+ break;
case GL_DST_ALPHA:
current->hwDstSrcBlend |= SiS_D_DST_ALPHA;
break;
case GL_ONE_MINUS_DST_ALPHA:
current->hwDstSrcBlend |= SiS_D_ONE_MINUS_DST_ALPHA;
break;
+ default:
+ fprintf(stderr, "Unknown dst blend function 0x%x\n", dfactorRGB);
+ break;
}
switch (sfactorRGB)
@@ -147,27 +154,36 @@ sisDDBlendFuncSeparate( GLcontext *ctx,
case GL_ONE:
current->hwDstSrcBlend |= SiS_S_ONE;
break;
+ case GL_SRC_COLOR:
+ current->hwDstSrcBlend |= SiS_S_SRC_COLOR;
+ break;
+ case GL_ONE_MINUS_SRC_COLOR:
+ current->hwDstSrcBlend |= SiS_S_ONE_MINUS_SRC_COLOR;
+ break;
case GL_SRC_ALPHA:
current->hwDstSrcBlend |= SiS_S_SRC_ALPHA;
break;
case GL_ONE_MINUS_SRC_ALPHA:
current->hwDstSrcBlend |= SiS_S_ONE_MINUS_SRC_ALPHA;
break;
- case GL_DST_ALPHA:
- current->hwDstSrcBlend |= SiS_S_DST_ALPHA;
- break;
- case GL_ONE_MINUS_DST_ALPHA:
- current->hwDstSrcBlend |= SiS_S_ONE_MINUS_DST_ALPHA;
- break;
case GL_DST_COLOR:
current->hwDstSrcBlend |= SiS_S_DST_COLOR;
break;
case GL_ONE_MINUS_DST_COLOR:
current->hwDstSrcBlend |= SiS_S_ONE_MINUS_DST_COLOR;
break;
+ case GL_DST_ALPHA:
+ current->hwDstSrcBlend |= SiS_S_DST_ALPHA;
+ break;
+ case GL_ONE_MINUS_DST_ALPHA:
+ current->hwDstSrcBlend |= SiS_S_ONE_MINUS_DST_ALPHA;
+ break;
case GL_SRC_ALPHA_SATURATE:
current->hwDstSrcBlend |= SiS_S_SRC_ALPHA_SATURATE;
break;
+ default:
+ fprintf(stderr, "Unknown src blend function 0x%x\n", sfactorRGB);
+ break;
}
if (current->hwDstSrcBlend != prev->hwDstSrcBlend) {