summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
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/drivers/r300/r300_texture.c
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/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 067ec072f67..11442864c71 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -897,9 +897,6 @@ r300_texture_create_object(struct r300_screen *rscreen,
tex->tex.microtile = microtile;
tex->tex.macrotile[0] = macrotile;
tex->tex.stride_in_bytes_override = stride_in_bytes_override;
- tex->domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ?
- RADEON_DOMAIN_GTT :
- RADEON_DOMAIN_VRAM | RADEON_DOMAIN_GTT;
tex->buf = buffer;
if (!r300_resource_set_properties(&rscreen->screen, &tex->b.b.b, 0, base)) {
@@ -912,7 +909,7 @@ r300_texture_create_object(struct r300_screen *rscreen,
/* Create the backing buffer if needed. */
if (!tex->buf) {
tex->buf = rws->buffer_create(rws, tex->tex.size_in_bytes, 2048,
- base->bind, tex->domain);
+ base->bind, base->usage);
if (!tex->buf) {
FREE(tex);
@@ -1023,11 +1020,6 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
surface->buf = tex->buf;
surface->cs_buf = tex->cs_buf;
- /* Prefer VRAM if there are multiple domains to choose from. */
- surface->domain = tex->domain;
- if (surface->domain & RADEON_DOMAIN_VRAM)
- surface->domain &= ~RADEON_DOMAIN_GTT;
-
surface->offset = r300_texture_get_offset(tex, level,
surf_tmpl->u.tex.first_layer);
r300_texture_setup_fb_state(surface);