summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_defines.h5
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c2
-rw-r--r--src/gallium/drivers/r300/r300_texture.c4
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h3
4 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_defines.h b/src/gallium/drivers/r300/r300_defines.h
index 4b1c3707268..83c9ec7e399 100644
--- a/src/gallium/drivers/r300/r300_defines.h
+++ b/src/gallium/drivers/r300/r300_defines.h
@@ -45,4 +45,9 @@ enum r300_buffer_tiling {
R300_BUFFER_SQUARETILED
};
+enum r300_buffer_domain { /* bitfield */
+ R300_DOMAIN_GTT = 1,
+ R300_DOMAIN_VRAM = 2
+};
+
#endif
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 3e2b5afe6f4..de89f51f3eb 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -125,7 +125,7 @@ r300_winsys_buffer_create(struct r300_screen *r300screen,
struct r300_winsys_screen *rws = r300screen->rws;
struct r300_winsys_buffer *buf;
- buf = rws->buffer_create(rws, alignment, usage, size);
+ buf = rws->buffer_create(rws, alignment, usage, R300_DOMAIN_GTT, size);
return buf;
}
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index a4b5d34ce1f..8572334f912 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -959,9 +959,9 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen,
base->width0, base->height0, base->depth0, base->last_level,
util_format_short_name(base->format));
- tex->buffer = rws->buffer_create(rws, 2048,
- base->bind,
+ tex->buffer = rws->buffer_create(rws, 2048, base->bind, R300_DOMAIN_VRAM,
tex->size);
+
rws->buffer_set_tiling(rws, tex->buffer,
tex->pitch[0] * util_format_get_blocksize(tex->b.b.format),
tex->microtile,
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index f7cbbde410a..d59a45a00a9 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -74,8 +74,9 @@ struct r300_winsys_screen {
struct r300_winsys_buffer *(*buffer_create)(struct r300_winsys_screen *ws,
unsigned alignment,
unsigned usage,
+ enum r300_buffer_domain domain,
unsigned size);
-
+
/**
* Map the entire data store of a buffer object into the client's address.
* flags is bitmask of R300_WINSYS_BUFFER_USAGE_CPU_READ/WRITE flags.