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_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/r300/r300_state.c') diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 70df484199..c4945fb2fd 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1509,7 +1509,7 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, r300->any_user_vbs = any_user_buffer; r300->vertex_buffer_max_index = max_index; - + r300->aos_dirty = TRUE; } else { /* SW TCL. */ draw_set_vertex_buffers(r300->draw, count, buffers); @@ -1716,6 +1716,7 @@ static void r300_bind_vertex_elements_state(struct pipe_context *pipe, UPDATE_STATE(&velems->vertex_stream, r300->vertex_stream_state); r300->vertex_stream_state.size = (1 + velems->vertex_stream.count) * 2; + r300->aos_dirty = TRUE; } static void r300_delete_vertex_elements_state(struct pipe_context *pipe, void *state) -- cgit v1.2.3