aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-27 01:10:20 +0200
committerMarek Olšák <[email protected]>2011-09-30 23:19:52 +0200
commit363ff844753c46ac9c13866627e096b091ea81f8 (patch)
tree3f5a9adeda3243ea6724c55a2ba75f65be7e6cce /src/gallium/winsys/r600
parentaf8eb5c851a9d566059ae9e37745614cd96b9a13 (diff)
winsys/radeon: move GEM domains out of the drivers into winsys
The drivers don't need to care about the domains. All they need to set are the bind and usage flags. This simplifies the winsys too. This also fixes on r600g: - fbo-depth-GL_DEPTH_COMPONENT32F-copypixels - fbo-depth-GL_DEPTH_COMPONENT16-copypixels - fbo-depth-GL_DEPTH_COMPONENT24-copypixels - fbo-depth-GL_DEPTH_COMPONENT32-copypixels - fbo-depth-GL_DEPTH24_STENCIL8-copypixels I can't explain it. Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index f1bbe38f0f7..1f18e0ee405 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -74,15 +74,11 @@ int r600_resource_init(struct r600_context *ctx, struct r600_range *range, unsig
static INLINE unsigned r600_context_bo_reloc(struct r600_context *ctx, struct r600_resource *rbo,
enum radeon_bo_usage usage)
{
- enum radeon_bo_domain rd = usage & RADEON_USAGE_READ ? rbo->domains : 0;
- enum radeon_bo_domain wd = usage & RADEON_USAGE_WRITE ? rbo->domains : 0;
+ unsigned reloc_index;
assert(usage);
- unsigned reloc_index =
- ctx->screen->ws->cs_add_reloc(ctx->cs, rbo->cs_buf,
- rd, wd);
-
+ reloc_index = ctx->screen->ws->cs_add_reloc(ctx->cs, rbo->cs_buf, usage);
if (reloc_index >= ctx->creloc)
ctx->creloc = reloc_index+1;