aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-08-31 02:12:08 -0400
committerIlia Mirkin <[email protected]>2016-08-31 10:28:33 -0400
commit6118bcab4e9f57b834578afb34256d793efe83d0 (patch)
tree410ba2753d1119af163a87a59053ae06991ead3f /src
parent5505845945fb9bdd0c752b0f299a627591205dbd (diff)
nv30: set usage to staging so that the buffer is allocated in GART
The code a few lines below expects to migrate the bo in question to VRAM. Since we're filling the initial data via CPU, it's more efficient to create the temporary buffer in GART. There is no "push" method implemented, otherwise we'd use that instead. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_transfer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
index 5299b70d08d..e4b9497259f 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c
@@ -115,7 +115,8 @@ nv30_transfer_rect_fragprog(struct nv30_context *nv30)
struct pipe_context *pipe = &nv30->base.pipe;
if (!fp) {
- nv30->blit_fp = pipe_buffer_create(pipe->screen, 0, 0, 12 * 4);
+ nv30->blit_fp =
+ pipe_buffer_create(pipe->screen, 0, PIPE_USAGE_STAGING, 12 * 4);
if (nv30->blit_fp) {
struct pipe_transfer *transfer;
u32 *map = pipe_buffer_map(pipe, nv30->blit_fp,