const GLvoid *srcImage, GLvoid *dstImage );
fxMesaContext fxMesa = FX_CONTEXT(ctx);
/* [dBorca]
- * Ooooooook! Here's a(nother) long story.
- * We get here because we need to handle a texture larger
- * than hardware can support. Two cases:
+ * Fake textures larger than HW supports:
* 1) we have mipmaps. Then we just push up to the first supported
* LOD. A possible drawback is that Mesa will ignore the skipped
* LODs on further texture handling.
* once in TexImage2D to accomodate aspect ratio, and now we
* are rescaling again. The thing is, in TexImage2D we don't
* know whether we'll hit 1) or 2) by the time of validation.
- * NB: we could handle mml->[wh]Scale nicely, using (biased) shifts.
- *
- * Which brings me to another issue. How can we handle NPOT textures?
- * - rescaling NPOT to the next bigger POT (mml->[wh]Scale can't shift)
- * - upping the max LOD to the next power-of-two, in fxTexGetInfo; then
- * choosing non-power-of-two values for ti->[st]Scale... Anyhow, we
- * still need to align mipmaps correctly in texture memory!
*/
if ((tObj->MinFilter == GL_NEAREST) || (tObj->MinFilter == GL_LINEAR)) {
/* no mipmaps! */
else
FX_smallLodLog2(ti->info) = FX_largeLodLog2(ti->info);
- /* this is necessary because of fxDDCompressedTexImage2D */
+ /* [dBorca] this is necessary because of fxDDCompressedTexImage2D */
if (ti->padded) {
struct gl_texture_image *texImage = tObj->Image[0][minl];
tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage);
fprintf(stderr, "fxSetupSingleTMU_NoLock(%p (%d))\n", (void *)tObj, tObj->Name);
}
-#if 1 /* [dBorca] Good... bad... I'm the guy with the gun! */
ti->lastTimeUsed = fxMesa->texBindNumber;
-#endif
/* Make sure we're not loaded incorrectly */
if (ti->isInTM) {
tex1.FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL;
tex1.FactorAlpha = GR_COMBINE_FACTOR_NONE;
- /* [dBorca] Hack alert:
- * don't use GR_COMBINE_FUNCTION_SCALE_OTHER
- * such that Glide recognizes TMU0 in passthrough mode
- */
+ /* correct values to set TMU0 in passthrough mode */
tex0.FunctionRGB = GR_COMBINE_FUNCTION_BLEND;
tex0.FactorRGB = GR_COMBINE_FACTOR_ONE;
tex0.FunctionAlpha = GR_COMBINE_FUNCTION_BLEND;
colorComb.Factor = GR_COMBINE_FACTOR_TEXTURE_ALPHA;
colorComb.Other = GR_COMBINE_OTHER_CONSTANT;
} else {
- /* [dBorca] Hack alert:
- * only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB)
- * These settings assume that the TexEnv color is black
- * and incoming fragment color is white.
+ /* Only Voodoo^2 can GL_BLEND (GR_COMBINE_FACTOR_TEXTURE_RGB)
+ * These settings assume that the TexEnv color is black and
+ * incoming fragment color is white.
*/
colorComb.Function = GR_COMBINE_FUNCTION_SCALE_OTHER;
colorComb.Factor = GR_COMBINE_FACTOR_ONE;
GLboolean haveAlpha = fxMesa->haveHwAlpha;
GrAlphaBlendFnc_t sfact, dfact, asfact, adfact;
- /* [dBorca] Hack alert:
+ /*
* 15/16 BPP alpha channel alpha blending modes
* 0x0 AZERO Zero
* 0x4 AONE One
}
}
-static void
+void
fxSetupStencil (GLcontext * ctx)
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);