summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests/trivial
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-02-13 09:13:14 +0100
committerMarek Olšák <[email protected]>2011-02-15 22:44:21 +0100
commiteafb7f234d11a290b00dcaf5492b9bdad1cf5148 (patch)
tree6abe76f35f3dd25c9c3f537b4a4765ec9bb2e46f /src/gallium/tests/trivial
parent82a9794a35744d60adc38b5eee53153c73d07331 (diff)
gallium: add usage parameter to pipe_buffer_create
And set a reasonable buffer usage flag everywhere instead of just PIPE_USAGE_DEFAULT.
Diffstat (limited to 'src/gallium/tests/trivial')
-rw-r--r--src/gallium/tests/trivial/quad-tex.c3
-rw-r--r--src/gallium/tests/trivial/tri.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c
index 92c5b4dbb18..af93e09d8d4 100644
--- a/src/gallium/tests/trivial/quad-tex.c
+++ b/src/gallium/tests/trivial/quad-tex.c
@@ -129,7 +129,8 @@ static void init_prog(struct program *p)
}
};
- p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER, sizeof(vertices));
+ p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC, sizeof(vertices));
pipe_buffer_write(p->pipe, p->vbuf, 0, sizeof(vertices), vertices);
}
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index 37c1573051f..b89cfe0d989 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -120,7 +120,8 @@ static void init_prog(struct program *p)
}
};
- p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER, sizeof(vertices));
+ p->vbuf = pipe_buffer_create(p->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STATIC, sizeof(vertices));
pipe_buffer_write(p->pipe, p->vbuf, 0, sizeof(vertices), vertices);
}