mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Mesa: Fix the performance regression in an upstream conform way
This commit is contained in:
parent
92ada946a8
commit
a1cb92d9b6
@ -1,33 +0,0 @@
|
||||
From 2402ec06e7d968bfa2dd06d73d5d9a5096fcfbb5 Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Tue, 3 Feb 2015 10:10:48 +0100
|
||||
Subject: [PATCH 2/3] Revert "r600g,radeonsi: Always use GTT again for
|
||||
PIPE_USAGE_STREAM buffers"
|
||||
|
||||
This reverts commit 64c2bdc334ba472603b1e7cd2c3046cfbce285b6.
|
||||
---
|
||||
src/gallium/drivers/radeon/r600_buffer_common.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
|
||||
index acdabc0..ee05776 100644
|
||||
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
|
||||
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
|
||||
@@ -110,13 +110,11 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
|
||||
enum radeon_bo_flag flags = 0;
|
||||
|
||||
switch (res->b.b.usage) {
|
||||
- case PIPE_USAGE_STREAM:
|
||||
- flags = RADEON_FLAG_GTT_WC;
|
||||
- /* fall through */
|
||||
case PIPE_USAGE_STAGING:
|
||||
/* Transfers are likely to occur more often with these resources. */
|
||||
res->domains = RADEON_DOMAIN_GTT;
|
||||
break;
|
||||
+ case PIPE_USAGE_STREAM:
|
||||
case PIPE_USAGE_DYNAMIC:
|
||||
/* Older kernels didn't always flush the HDP cache before
|
||||
* CS execution
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
|
||||
index 55f3644..d68e1e9 100644
|
||||
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
|
||||
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
|
||||
@@ -256,8 +256,15 @@ st_bufferobj_data(struct gl_context *ctx,
|
||||
break;
|
||||
case GL_STREAM_DRAW:
|
||||
case GL_STREAM_COPY:
|
||||
- pipe_usage = PIPE_USAGE_STREAM;
|
||||
- break;
|
||||
+ /* XXX: Remove this test when we have PBO unpack acceleration. Right
|
||||
+ * now, PBO unpacking is done by the CPU, so we have to make sure
|
||||
+ * CPU reads are fast.
|
||||
+ */
|
||||
+ if (target != GL_PIXEL_UNPACK_BUFFER_ARB) {
|
||||
+ pipe_usage = PIPE_USAGE_STREAM;
|
||||
+ break;
|
||||
+ }
|
||||
+ /* fall through */
|
||||
case GL_STATIC_READ:
|
||||
case GL_DYNAMIC_READ:
|
||||
case GL_STREAM_READ:
|
Loading…
x
Reference in New Issue
Block a user