summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fallback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fallback.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index 86464b2ec5..693f68f32a 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -39,38 +39,32 @@
#include "macros.h"
#include "mtypes.h"
-
-
-
-
-
+#define FILE_DEBUG_FLAG DEBUG_FALLBACKS
static GLboolean do_check_fallback(struct brw_context *brw)
{
GLcontext *ctx = &brw->intel.ctx;
GLuint i;
-
+
/* BRW_NEW_METAOPS
*/
if (brw->metaops.active)
return GL_FALSE;
- if (brw->intel.no_rast)
- return GL_TRUE;
-
- /* _NEW_BUFFERS
- */
- if (ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_FRONT_LEFT &&
- ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_BACK_LEFT)
+ if (brw->intel.no_rast) {
+ DBG("FALLBACK: rasterization disabled\n");
return GL_TRUE;
+ }
/* _NEW_RENDERMODE
*
* XXX: need to save/restore RenderMode in metaops state, or
* somehow move to a new attribs pointer:
*/
- if (ctx->RenderMode != GL_RENDER)
+ if (ctx->RenderMode != GL_RENDER) {
+ DBG("FALLBACK: render mode\n");
return GL_TRUE;
+ }
/* _NEW_TEXTURE:
*/
@@ -79,8 +73,13 @@ static GLboolean do_check_fallback(struct brw_context *brw)
if (texUnit->_ReallyEnabled) {
struct intel_texture_object *intelObj = intel_texture_object(texUnit->_Current);
struct gl_texture_image *texImage = intelObj->base.Image[0][intelObj->firstLevel];
- if (texImage->Border)
+ if (texImage->Border ||
+ ((texImage->_BaseFormat == GL_DEPTH_COMPONENT) &&
+ ((texImage->TexObject->WrapS == GL_CLAMP_TO_BORDER) ||
+ (texImage->TexObject->WrapT == GL_CLAMP_TO_BORDER)))) {
+ DBG("FALLBACK: texture border\n");
return GL_TRUE;
+ }
}
}
@@ -88,6 +87,7 @@ static GLboolean do_check_fallback(struct brw_context *brw)
*/
if (brw->attribs.Stencil->Enabled &&
!brw->intel.hw_stencil) {
+ DBG("FALLBACK: stencil\n");
return GL_TRUE;
}
@@ -106,7 +106,7 @@ const struct brw_tracked_state brw_check_fallback = {
.brw = BRW_NEW_METAOPS,
.cache = 0
},
- .update = check_fallback
+ .prepare = check_fallback
};