#include "nouveau_buffer.h"
#include "nouveau_mm.h"
-#define NOUVEAU_TRANSFER_PUSHBUF_THRESHOLD 192
-
struct nouveau_transfer {
struct pipe_transfer base;
if (!nv->push_data)
permit_pb = false;
- if ((size <= NOUVEAU_TRANSFER_PUSHBUF_THRESHOLD) && permit_pb) {
+ if ((size <= nv->screen->transfer_pushbuf_threshold) && permit_pb) {
tx->map = align_malloc(size, NOUVEAU_MIN_BUFFER_MAP_ALIGN);
if (tx->map)
tx->map += adj;
nouveau_disk_cache_create(screen);
+ screen->transfer_pushbuf_threshold = 192;
screen->lowmem_bindings = PIPE_BIND_GLOBAL; /* gallium limit */
screen->vidmem_bindings =
PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL |
int refcount;
+ unsigned transfer_pushbuf_threshold;
+
unsigned vidmem_bindings; /* PIPE_BIND_* where VRAM placement is desired */
unsigned sysmem_bindings; /* PIPE_BIND_* where GART placement is desired */
unsigned lowmem_bindings; /* PIPE_BIND_* that require an address < 4 GiB */
push->user_priv = screen;
push->rsvd_kick = 5;
+ /* TODO: could this be higher on Kepler+? how does reclocking vs no
+ * reclocking affect performance?
+ * TODO: could this be higher on Fermi?
+ */
+ if (dev->chipset >= 0xe0)
+ screen->base.transfer_pushbuf_threshold = 1024;
+
screen->base.vidmem_bindings |= PIPE_BIND_CONSTANT_BUFFER |
PIPE_BIND_SHADER_BUFFER |
PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER |