__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)
{
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)
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) {