summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2013-01-08 11:35:25 (GMT)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2013-01-08 15:13:51 (GMT)
commit39fe03e2de655aee9939cb51d08cac8aa491bb6e (patch)
tree0dd2ee748539f3d120b8e7c26b4f705ff28eba99
parent48a45ec24ae74c00d1487552e94d9f824a428f58 (diff)
nouveau: increase max order of suballocated buffers by 1
This is really a hack to make TF2 (considerably, up to 20 -> 70 fps at low res) faster.
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c
index 6045af6..439c0fb 100644
--- a/src/gallium/drivers/nouveau/nouveau_mm.c
+++ b/src/gallium/drivers/nouveau/nouveau_mm.c
@@ -9,8 +9,15 @@
#include "nouveau_screen.h"
#include "nouveau_mm.h"
+/* TODO: Higher orders can waste a lot of space for npot size buffers, should
+ * add an extra cache for such buffer objects.
+ *
+ * HACK: Max order == 21 to accommodate TF2's 1.5 MiB, frequently reallocated
+ * vertex buffer (VM flush (?) decreases performance dramatically).
+ */
+
#define MM_MIN_ORDER 7 /* >= 6 to not violate ARB_map_buffer_alignment */
-#define MM_MAX_ORDER 20
+#define MM_MAX_ORDER 21
#define MM_NUM_BUCKETS (MM_MAX_ORDER - MM_MIN_ORDER + 1)
@@ -102,7 +109,7 @@ mm_default_slab_size(unsigned chunk_order)
{
static const int8_t slab_order[MM_MAX_ORDER - MM_MIN_ORDER + 1] =
{
- 12, 12, 13, 14, 14, 17, 17, 17, 17, 19, 19, 20, 21, 22
+ 12, 12, 13, 14, 14, 17, 17, 17, 17, 19, 19, 20, 21, 22, 22
};
assert(chunk_order <= MM_MAX_ORDER && chunk_order >= MM_MIN_ORDER);