diff options
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_state.c')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_state.c | 34 |
1 files changed, 25 insertions, 9 deletions
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) { |