summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2011-06-04 00:21:29 +0200
committerAlex Deucher <[email protected]>2011-06-13 11:33:20 -0400
commit2f0b44f981d1715b62b189f465546d865b10d0f3 (patch)
treeb80172b91b5f341f086e005328612b0eceb84e7d /src/gallium/drivers/r600/r600_shader.c
parentb0f1767d776e2c80cab4343b4cd59553fbf5e48a (diff)
r600g: Put shaders into immutable buffers.
Put the shader programs into an immutable buffer object. Also make sure that those object can be taken from the user space buffer object pool.
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 39e6d85d7b4..d111caa6449 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -85,7 +85,8 @@ static int r600_pipe_shader(struct pipe_context *ctx, struct r600_pipe_shader *s
/* copy new shader */
if (shader->bo == NULL) {
- shader->bo = r600_bo(rctx->radeon, rshader->bc.ndw * 4, 4096, 0, 0);
+ /* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */
+ shader->bo = r600_bo(rctx->radeon, rshader->bc.ndw * 4, 4096, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE);
if (shader->bo == NULL) {
return -ENOMEM;
}