glamor_set_alu: Added GXclear support at glamor_solid.

We don't need to issue the glamor_fallback at the glamor_set_alu
routine, as the caller may support GXclear or other most frequent
Ops. Leave it to the caller to determine fallback or not.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Zhigang Gong 2012-04-06 21:17:46 +08:00 committed by Eric Anholt
parent 3b8b2c77fc
commit 49e3b44aa8
2 changed files with 8 additions and 6 deletions

View File

@ -190,8 +190,13 @@ glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
dispatch = glamor_get_dispatch(glamor_priv);
if (!glamor_set_alu(dispatch, alu)) {
glamor_put_dispatch(glamor_priv);
return FALSE;
if (alu == GXclear)
color[0] = color[1] = color[2] = color[3] = 0.0;
else {
glamor_fallback("unsupported alu %x\n", alu);
glamor_put_dispatch(glamor_priv);
return FALSE;
}
}
dispatch->glUseProgram(glamor_priv->solid_prog);

View File

@ -204,10 +204,8 @@ glamor_set_alu(struct glamor_gl_dispatch *dispatch, unsigned char alu)
return FALSE;
}
#else
if (alu != GXcopy) {
glamor_fallback("unsupported alu %x\n", alu);
if (alu != GXcopy)
return FALSE;
}
#endif
return TRUE;
}
@ -872,7 +870,6 @@ glamor_es2_pixmap_read_prepare(PixmapPtr source, GLenum format,
return temp_fbo;
}
/**
* Move a pixmap to CPU memory.
* The input data is the pixmap's fbo.