winsys/radeon: simplify updating GEM domains for relocations

This commit is contained in:
Marek Olšák 2011-09-27 03:10:33 +02:00
parent bfa51dfeac
commit 798ebc91eb
1 changed files with 2 additions and 10 deletions

View File

@ -177,16 +177,8 @@ static INLINE void update_domains(struct drm_radeon_cs_reloc *reloc,
{
*added_domains = (rd | wd) & ~(reloc->read_domains | reloc->write_domain);
if (reloc->read_domains & wd) {
reloc->read_domains = rd;
reloc->write_domain = wd;
} else if (rd & reloc->write_domain) {
reloc->read_domains = rd;
reloc->write_domain |= wd;
} else {
reloc->read_domains |= rd;
reloc->write_domain |= wd;
}
reloc->read_domains |= rd;
reloc->write_domain |= wd;
}
int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo)