summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-28 03:03:07 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-28 03:05:46 -0800
commit241a0b8cf34a2c688f59f33758446d95d29e8447 (patch)
treea5a4ee963f588917943317f63c5608c4398ae911 /src
parentf0a3f824acdce98b5ca1543ecb3d7a316cfdd108 (diff)
radeong: Slight improvement to buffer creation.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_buffer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index 421fda2b45..f484503e0e 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -55,6 +55,9 @@ static uint32_t radeon_domain_from_usage(unsigned usage)
{
uint32_t domain = 0;
+ if (usage & PIPE_BUFFER_USAGE_GPU_WRITE) {
+ domain |= RADEON_GEM_DOMAIN_VRAM;
+ }
if (usage & PIPE_BUFFER_USAGE_PIXEL) {
domain |= RADEON_GEM_DOMAIN_VRAM;
}
@@ -88,7 +91,7 @@ static struct pipe_buffer *radeon_buffer_create(struct pipe_winsys *ws,
radeon_buffer->base.usage = usage;
radeon_buffer->base.size = size;
- if (usage == PIPE_BUFFER_USAGE_CONSTANT && is_r3xx(radeon_ws->pci_id)) {
+ if (usage & PIPE_BUFFER_USAGE_CONSTANT && is_r3xx(radeon_ws->pci_id)) {
/* Don't bother allocating a BO, as it'll never get to the card. */
desc.alignment = alignment;
desc.usage = usage;