From 78068a5fbfc21fb52b289a81142b4211628f845c Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 7 Dec 2010 06:24:06 +0100 Subject: r300g: cache packet dwords of 3D_LOAD_VBPNTR in a command buffer if possible It's not always possible to preprocess the content of 3D_LOAD_VBPNTR in a command buffer, because the offset to all vertex buffers (which the packet depends on) is derived from the "start" parameter of draw_arrays and the "indexBias" parameter of draw_elements, but we can at least lazily make a command buffer for the case when offset == 0, which should occur most of the time. --- src/gallium/drivers/r300/r300_context.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/r300/r300_context.h') diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index ba5e9bca40..8d50ea3a30 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -610,6 +610,10 @@ struct r300_context { /* const tracking for VS */ int vs_const_base; + + /* AOS (PACKET3_3D_LOAD_VBPNTR) command buffer for the case offset=0. */ + uint32_t aos_cb[(16 * 3 + 1) / 2]; + boolean aos_dirty; }; #define foreach_atom(r300, atom) \ -- cgit v1.2.3