diff options
author | Marek Olšák <[email protected]> | 2011-09-27 01:10:20 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-30 23:19:52 +0200 |
commit | 363ff844753c46ac9c13866627e096b091ea81f8 (patch) | |
tree | 3f5a9adeda3243ea6724c55a2ba75f65be7e6cce /src/gallium/drivers/r300/r300_transfer.c | |
parent | af8eb5c851a9d566059ae9e37745614cd96b9a13 (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_transfer.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_transfer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index 65964020adc..57d60a0e0fe 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -130,8 +130,14 @@ r300_texture_get_transfer(struct pipe_context *ctx, base.array_size = 1; base.last_level = 0; base.nr_samples = 0; - base.usage = PIPE_USAGE_DYNAMIC; + base.usage = PIPE_USAGE_STAGING; base.bind = 0; + if (usage & PIPE_TRANSFER_READ) { + base.bind |= PIPE_BIND_SAMPLER_VIEW; + } + if (usage & PIPE_TRANSFER_WRITE) { + base.bind |= PIPE_BIND_RENDER_TARGET; + } base.flags = R300_RESOURCE_FLAG_TRANSFER; /* For texture reading, the temporary (detiled) texture is used as |