sna: Assert that we never try to mix INPLACE / ASYNC hints for move-to-cpu

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-15 20:16:45 +00:00
parent 1287c3a24c
commit d70be85dc7
1 changed files with 6 additions and 4 deletions

View File

@ -1444,13 +1444,15 @@ static inline bool use_cpu_bo_for_upload(struct sna *sna,
static inline bool operate_inplace(struct sna_pixmap *priv, unsigned flags)
{
if ((priv->create & KGEM_CAN_CREATE_GTT) == 0) {
DBG(("%s: no, not accessible via GTT\n", __FUNCTION__));
if ((flags & MOVE_INPLACE_HINT) == 0) {
DBG(("%s: no, inplace operation not suitable\n", __FUNCTION__));
return false;
}
if ((flags & MOVE_INPLACE_HINT) == 0) {
DBG(("%s: no, inplace operation not suitable\n", __FUNCTION__));
assert((flags & MOVE_ASYNC_HINT) == 0);
if ((priv->create & KGEM_CAN_CREATE_GTT) == 0) {
DBG(("%s: no, not accessible via GTT\n", __FUNCTION__));
return false;
}