mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 00:18:29 +02:00
r300g: Bind constantbuf to Draw immediately, don't wait for render.
Doesn't hurt, and reduces code duplication.
This commit is contained in:
parent
c1a392ac4c
commit
587c5ef01f
2 changed files with 6 additions and 16 deletions
|
|
@ -569,13 +569,6 @@ void r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
|||
|
||||
draw_set_mapped_element_buffer(r300->draw, 0, NULL);
|
||||
|
||||
draw_set_mapped_constant_buffer(r300->draw,
|
||||
PIPE_SHADER_VERTEX,
|
||||
0,
|
||||
r300->shader_constants[PIPE_SHADER_VERTEX].constants,
|
||||
r300->shader_constants[PIPE_SHADER_VERTEX].count *
|
||||
(sizeof(float) * 4));
|
||||
|
||||
draw_arrays(r300->draw, mode, start, count);
|
||||
|
||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||
|
|
@ -614,13 +607,6 @@ void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
|||
draw_set_mapped_element_buffer_range(r300->draw, indexSize,
|
||||
minIndex, maxIndex, indices);
|
||||
|
||||
draw_set_mapped_constant_buffer(r300->draw,
|
||||
PIPE_SHADER_VERTEX,
|
||||
0,
|
||||
r300->shader_constants[PIPE_SHADER_VERTEX].constants,
|
||||
r300->shader_constants[PIPE_SHADER_VERTEX].count *
|
||||
(sizeof(float) * 4));
|
||||
|
||||
draw_arrays(r300->draw, mode, start, count);
|
||||
|
||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||
|
|
|
|||
|
|
@ -1365,10 +1365,14 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
|
|||
if (r300screen->caps->has_tcl) {
|
||||
r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS;
|
||||
r300->pvs_flush.dirty = TRUE;
|
||||
} else if (r300->draw) {
|
||||
draw_set_mapped_constant_buffer(r300->draw, PIPE_SHADER_VERTEX,
|
||||
0, r300->shader_constants[PIPE_SHADER_VERTEX].constants,
|
||||
buf->size);
|
||||
}
|
||||
}
|
||||
else if (shader == PIPE_SHADER_FRAGMENT)
|
||||
} else if (shader == PIPE_SHADER_FRAGMENT) {
|
||||
r300->dirty_state |= R300_NEW_FRAGMENT_SHADER_CONSTANTS;
|
||||
}
|
||||
}
|
||||
|
||||
void r300_init_state_functions(struct r300_context* r300)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue