#define NAME flat_rgba_triangle
#define INTERP_Z 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define SETUP_CODE \
ASSERT(ctx->Texture._EnabledCoordUnits == 0);\
ASSERT(ctx->Light.ShadeModel==GL_FLAT); \
#define NAME smooth_rgba_triangle
#define INTERP_Z 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define INTERP_ALPHA 1
#define SETUP_CODE \
#define NAME affine_textured_triangle
#define INTERP_Z 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define INTERP_ALPHA 1
#define INTERP_INT_TEX 1
#define INTERP_Z 1
#define INTERP_W 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define INTERP_ALPHA 1
#define INTERP_TEX 1
#define INTERP_Z 1
#define INTERP_W 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define INTERP_SPEC 1
#define INTERP_ALPHA 1
#define INTERP_Z 1
#define INTERP_W 1
#define INTERP_FOG 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define INTERP_RGB 1
#define INTERP_ALPHA 1
#define INTERP_SPEC 1
#define NAME occlusion_zless_triangle
#define DO_OCCLUSION_TEST
#define INTERP_Z 1
-#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
#define SETUP_CODE \
+ ASSERT(ctx->Depth.Test); \
+ ASSERT(!ctx->Depth.Mask); \
+ ASSERT(ctx->Depth.Func == GL_LESS); \
if (ctx->OcclusionResult && !ctx->Occlusion.Active) { \
return; \
}
-#define RENDER_SPAN( span ) \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- GLdepth z = FixedToDepth(span.z); \
- if (z < zRow[i]) { \
- ctx->OcclusionResult = GL_TRUE; \
- ctx->Occlusion.PassedCounter++; \
- } \
- span.z += span.zStep; \
+#define RENDER_SPAN( span ) \
+ if (ctx->Visual.depthBits <= 16) { \
+ GLuint i; \
+ const GLushort *zRow = (const GLushort *) \
+ _swrast_zbuffer_address(ctx, span.x, span.y); \
+ for (i = 0; i < span.end; i++) { \
+ GLdepth z = FixedToDepth(span.z); \
+ if (z < zRow[i]) { \
+ ctx->OcclusionResult = GL_TRUE; \
+ ctx->Occlusion.PassedCounter++; \
+ } \
+ span.z += span.zStep; \
+ } \
+ } \
+ else { \
+ GLuint i; \
+ const GLuint *zRow = (const GLuint *) \
+ _swrast_zbuffer_address(ctx, span.x, span.y); \
+ for (i = 0; i < span.end; i++) { \
+ if (span.z < zRow[i]) { \
+ ctx->OcclusionResult = GL_TRUE; \
+ ctx->Occlusion.PassedCounter++; \
+ } \
+ span.z += span.zStep; \
+ } \
}
#include "s_tritemp.h"
envMode = ctx->Texture.Unit[0].EnvMode;
/* First see if we can use an optimized 2-D texture function */
- if (ctx->Texture._EnabledCoordUnits == 1
+ if (ctx->Texture._EnabledCoordUnits == 0x1
&& !ctx->FragmentProgram._Enabled
&& ctx->Texture.Unit[0]._ReallyEnabled == TEXTURE_2D_BIT
- && texObj2D->WrapS==GL_REPEAT
- && texObj2D->WrapT==GL_REPEAT
+ && texObj2D->WrapS == GL_REPEAT
+ && texObj2D->WrapT == GL_REPEAT
&& texObj2D->_IsPowerOfTwo
- && texImg->Border==0
+ && texImg->Border == 0
&& texImg->Width == texImg->RowStride
&& (format == MESA_FORMAT_RGB || format == MESA_FORMAT_RGBA)
&& minFilter == magFilter