diff options
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_r300.c')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_r300.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index ecee1ee73db..4cf21ff72bf 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -31,6 +31,7 @@ static struct r300_winsys_buffer * radeon_r300_winsys_buffer_create(struct r300_winsys_screen *rws, unsigned alignment, unsigned usage, + enum r300_buffer_domain domain, unsigned size) { struct radeon_libdrm_winsys *ws = radeon_winsys_screen(rws); @@ -38,6 +39,14 @@ radeon_r300_winsys_buffer_create(struct r300_winsys_screen *rws, struct pb_manager *provider; struct pb_buffer *buffer; + /* XXX this is hackish, but it's the only way to pass these flags + * to the real create function. */ + usage &= ~(RADEON_USAGE_DOMAIN_GTT | RADEON_USAGE_DOMAIN_VRAM); + if (domain & R300_DOMAIN_GTT) + usage |= RADEON_USAGE_DOMAIN_GTT; + if (domain & R300_DOMAIN_VRAM) + usage |= RADEON_USAGE_DOMAIN_VRAM; + memset(&desc, 0, sizeof(desc)); desc.alignment = alignment; desc.usage = usage; |