summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-10 05:14:26 +0200
committerMarek Olšák <[email protected]>2012-04-24 01:39:22 +0200
commit7fe3631a7a0ad7602b4e947ac87ef86875c8bb3f (patch)
treec526a63498a4b98f65ee02998b0e9655c52ae602 /src/gallium/drivers/r300/r300_context.c
parent978c1aa1d0f6fd9a188762a8534de33fc63eeea0 (diff)
u_vbuf: make use of the new CAPs to determine what to do
This adds the ability to initialize u_vbuf_caps before creating u_vbuf itself. It will be useful for determining if u_vbuf should be used or not. Also adapt r300g and r600g.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 74d5e8ed36c..fd464f32afd 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -428,13 +428,16 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.create_video_buffer = vl_video_buffer_create;
if (r300->screen->caps.has_tcl) {
- r300->vbuf_mgr = u_vbuf_create(&r300->context, 1024 * 1024, 4,
+ struct u_vbuf_caps caps;
+
+ u_vbuf_get_caps(screen, &caps);
+ caps.format_fixed32 = 0;
+
+ r300->vbuf_mgr = u_vbuf_create(&r300->context, &caps, 1024 * 1024, 4,
PIPE_BIND_VERTEX_BUFFER |
- PIPE_BIND_INDEX_BUFFER,
- U_VERTEX_FETCH_DWORD_ALIGNED);
+ PIPE_BIND_INDEX_BUFFER);
if (!r300->vbuf_mgr)
goto fail;
- r300->vbuf_mgr->caps.format_fixed32 = 0;
}
r300->blitter = util_blitter_create(&r300->context);