mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
cell: Implement index bias.
This commit is contained in:
parent
2197fac47c
commit
150d12679d
1 changed files with 6 additions and 5 deletions
|
|
@ -59,6 +59,7 @@ static void
|
|||
cell_draw_range_elements(struct pipe_context *pipe,
|
||||
struct pipe_resource *indexBuffer,
|
||||
unsigned indexSize,
|
||||
int indexBias,
|
||||
unsigned min_index,
|
||||
unsigned max_index,
|
||||
unsigned mode, unsigned start, unsigned count)
|
||||
|
|
@ -84,11 +85,11 @@ cell_draw_range_elements(struct pipe_context *pipe,
|
|||
/* Map index buffer, if present */
|
||||
if (indexBuffer) {
|
||||
void *mapped_indexes = cell_resource(indexBuffer)->data;
|
||||
draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
|
||||
draw_set_mapped_element_buffer(draw, indexSize, indexBias, mapped_indexes);
|
||||
}
|
||||
else {
|
||||
/* no index/element buffer */
|
||||
draw_set_mapped_element_buffer(draw, 0, NULL);
|
||||
draw_set_mapped_element_buffer(draw, 0, 0, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -117,11 +118,11 @@ cell_draw_range_elements(struct pipe_context *pipe,
|
|||
static void
|
||||
cell_draw_elements(struct pipe_context *pipe,
|
||||
struct pipe_resource *indexBuffer,
|
||||
unsigned indexSize,
|
||||
unsigned indexSize, int indexBias,
|
||||
unsigned mode, unsigned start, unsigned count)
|
||||
{
|
||||
cell_draw_range_elements( pipe, indexBuffer,
|
||||
indexSize,
|
||||
indexSize, indeBias,
|
||||
0, 0xffffffff,
|
||||
mode, start, count );
|
||||
}
|
||||
|
|
@ -131,7 +132,7 @@ static void
|
|||
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||
unsigned start, unsigned count)
|
||||
{
|
||||
cell_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||
cell_draw_elements(pipe, NULL, 0, 0, mode, start, count);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue