summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorRichard Thier <[email protected]>2019-06-08 08:35:36 +0200
committerMarek Olšák <[email protected]>2019-06-11 20:45:27 -0400
commitffd2f948fee271cbbce93708fc508dab7cb5d14c (patch)
tree0f375bb2c36f4d23b63510208ed9d1cda4be7e23 /src/gallium/drivers/r300/r300_texture.c
parentec0956a19460896838127e4f596dc28465c9a24a (diff)
r300g: restore performance after RADEON_FLAG_NO_INTERPROCESS_SHARING was added
v1: Fix skipped slab allocators and the buffer cache. v2: Use only 1 domain for texture allocation v3: Added flag for the create_fence call too Based on Marek v1 and v2 proposed fixes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=1107812.patch Cc: 19.1 <[email protected]> Signed-off-by: Marek Olšák <[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, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 46d88b34638..21ade4022c5 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -1113,8 +1113,16 @@ r300_texture_create_object(struct r300_screen *rscreen,
/* Create the backing buffer if needed. */
if (!tex->buf) {
+ /* Only use the first domain for allocation. Multiple domains are not allowed. */
+ unsigned alloc_domain =
+ tex->domain & RADEON_DOMAIN_VRAM ? RADEON_DOMAIN_VRAM :
+ RADEON_DOMAIN_GTT;
+
tex->buf = rws->buffer_create(rws, tex->tex.size_in_bytes, 2048,
- tex->domain, RADEON_FLAG_NO_SUBALLOC);
+ alloc_domain,
+ RADEON_FLAG_NO_SUBALLOC |
+ /* Use the reusable pool: */
+ RADEON_FLAG_NO_INTERPROCESS_SHARING);
if (!tex->buf) {
goto fail;