summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2009-01-14 00:28:58 -0500
committerYounes Manton <[email protected]>2009-01-18 21:40:11 -0500
commit3933d338f7fd1a7709d7971036671920f65fcd86 (patch)
tree2340cda31e908636198306fb5941cc213e5af968 /src
parent7309e8057844bc67a81ce01a99a9cb62d36eda0b (diff)
g3dvl: Mark all buffers for incoming frame data as discardable.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_basic_csc.c4
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_basic_csc.c b/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
index 3ce93cf49d1..c685bc9c700 100644
--- a/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
+++ b/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
@@ -157,7 +157,7 @@ static int vlPutPictureCSC
(
pipe->winsys,
basic_csc->vs_const_buf.buffer,
- PIPE_BUFFER_USAGE_CPU_WRITE
+ PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
);
vs_consts->dst_scale.x = destw / (float)basic_csc->framebuffer.cbufs[0]->width;
@@ -602,7 +602,7 @@ static int vlCreateDataBufs
(
pipe->winsys,
1,
- PIPE_BUFFER_USAGE_CONSTANT,
+ PIPE_BUFFER_USAGE_CONSTANT | PIPE_BUFFER_USAGE_DISCARD,
csc->vs_const_buf.size
);
diff --git a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
index c5a73b2bf2a..2e790bb3af1 100644
--- a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
+++ b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
@@ -603,7 +603,7 @@ static int vlFlush
(
mc->pipe->winsys,
mc->vertex_bufs.ycbcr.buffer,
- PIPE_BUFFER_USAGE_CPU_WRITE
+ PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
);
for (i = 0; i < 2; ++i)
@@ -611,7 +611,7 @@ static int vlFlush
(
mc->pipe->winsys,
mc->vertex_bufs.ref[i].buffer,
- PIPE_BUFFER_USAGE_CPU_WRITE
+ PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
);
for (i = 0; i < mc->num_macroblocks; ++i)
@@ -647,7 +647,7 @@ static int vlFlush
(
pipe->winsys,
mc->vs_const_buf.buffer,
- PIPE_BUFFER_USAGE_CPU_WRITE
+ PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
);
vs_consts->denorm.x = mc->buffered_surface->texture->width[0];
@@ -808,10 +808,10 @@ static int vlRenderMacroBlocksMpeg2R16SnormBuffered
(
mc->pipe->screen,
mc->textures.all[i],
- 0, 0, 0, PIPE_BUFFER_USAGE_CPU_WRITE
+ 0, 0, 0, PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD
);
- mc->texels[i] = pipe_surface_map(mc->tex_surface[i], PIPE_BUFFER_USAGE_CPU_WRITE);
+ mc->texels[i] = pipe_surface_map(mc->tex_surface[i], PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_DISCARD);
}
}
@@ -913,7 +913,7 @@ static int vlCreateDataBufs
(
pipe->winsys,
DEFAULT_BUF_ALIGNMENT,
- PIPE_BUFFER_USAGE_VERTEX,
+ PIPE_BUFFER_USAGE_VERTEX | PIPE_BUFFER_USAGE_DISCARD,
sizeof(struct vlVertex2f) * 4 * 24 * mc->macroblocks_per_picture
);
@@ -926,7 +926,7 @@ static int vlCreateDataBufs
(
pipe->winsys,
DEFAULT_BUF_ALIGNMENT,
- PIPE_BUFFER_USAGE_VERTEX,
+ PIPE_BUFFER_USAGE_VERTEX | PIPE_BUFFER_USAGE_DISCARD,
sizeof(struct vlVertex2f) * 2 * 24 * mc->macroblocks_per_picture
);
}
@@ -985,7 +985,7 @@ static int vlCreateDataBufs
(
pipe->winsys,
DEFAULT_BUF_ALIGNMENT,
- PIPE_BUFFER_USAGE_CONSTANT,
+ PIPE_BUFFER_USAGE_CONSTANT | PIPE_BUFFER_USAGE_DISCARD,
mc->vs_const_buf.size
);