mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
Merge commit 'origin/gallium-draw-retval'
Conflicts: src/gallium/drivers/identity/id_context.c
This commit is contained in:
commit
c727fa6dbf
27 changed files with 235 additions and 265 deletions
|
|
@ -85,7 +85,7 @@ cell_unmap_constant_buffers(struct cell_context *sp)
|
||||||
*
|
*
|
||||||
* XXX should the element buffer be specified/bound with a separate function?
|
* XXX should the element buffer be specified/bound with a separate function?
|
||||||
*/
|
*/
|
||||||
static boolean
|
static void
|
||||||
cell_draw_range_elements(struct pipe_context *pipe,
|
cell_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -145,29 +145,27 @@ cell_draw_range_elements(struct pipe_context *pipe,
|
||||||
|
|
||||||
/* Note: leave drawing surfaces mapped */
|
/* Note: leave drawing surfaces mapped */
|
||||||
cell_unmap_constant_buffers(sp);
|
cell_unmap_constant_buffers(sp);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
cell_draw_elements(struct pipe_context *pipe,
|
cell_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return cell_draw_range_elements( pipe, indexBuffer,
|
cell_draw_range_elements( pipe, indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
0, 0xffffffff,
|
0, 0xffffffff,
|
||||||
mode, start, count );
|
mode, start, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
unsigned start, unsigned count)
|
unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return cell_draw_elements(pipe, NULL, 0, mode, start, count);
|
cell_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,19 @@ static void failover_destroy( struct pipe_context *pipe )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void failover_fail_over( struct failover_context *failover )
|
||||||
|
{
|
||||||
|
failover->dirty = TRUE;
|
||||||
|
failover->mode = FO_SW;
|
||||||
|
}
|
||||||
|
|
||||||
static boolean failover_draw_elements( struct pipe_context *pipe,
|
|
||||||
struct pipe_buffer *indexBuffer,
|
static void failover_draw_elements( struct pipe_context *pipe,
|
||||||
unsigned indexSize,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned indexSize,
|
||||||
|
unsigned prim,
|
||||||
|
unsigned start,
|
||||||
|
unsigned count)
|
||||||
{
|
{
|
||||||
struct failover_context *failover = failover_context( pipe );
|
struct failover_context *failover = failover_context( pipe );
|
||||||
|
|
||||||
|
|
@ -62,24 +70,22 @@ static boolean failover_draw_elements( struct pipe_context *pipe,
|
||||||
/* Try hardware:
|
/* Try hardware:
|
||||||
*/
|
*/
|
||||||
if (failover->mode == FO_HW) {
|
if (failover->mode == FO_HW) {
|
||||||
if (!failover->hw->draw_elements( failover->hw,
|
failover->hw->draw_elements( failover->hw,
|
||||||
indexBuffer,
|
indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
prim,
|
prim,
|
||||||
start,
|
start,
|
||||||
count )) {
|
count );
|
||||||
|
|
||||||
failover->hw->flush( failover->hw, ~0, NULL );
|
|
||||||
failover->mode = FO_SW;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Possibly try software:
|
/* Possibly try software:
|
||||||
*/
|
*/
|
||||||
if (failover->mode == FO_SW) {
|
if (failover->mode == FO_SW) {
|
||||||
|
|
||||||
if (failover->dirty)
|
if (failover->dirty) {
|
||||||
|
failover->hw->flush( failover->hw, ~0, NULL );
|
||||||
failover_state_emit( failover );
|
failover_state_emit( failover );
|
||||||
|
}
|
||||||
|
|
||||||
failover->sw->draw_elements( failover->sw,
|
failover->sw->draw_elements( failover->sw,
|
||||||
indexBuffer,
|
indexBuffer,
|
||||||
|
|
@ -94,15 +100,13 @@ static boolean failover_draw_elements( struct pipe_context *pipe,
|
||||||
*/
|
*/
|
||||||
failover->sw->flush( failover->sw, ~0, NULL );
|
failover->sw->flush( failover->sw, ~0, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static boolean failover_draw_arrays( struct pipe_context *pipe,
|
static void failover_draw_arrays( struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return failover_draw_elements(pipe, NULL, 0, prim, start, count);
|
failover_draw_elements(pipe, NULL, 0, prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,13 @@
|
||||||
|
|
||||||
|
|
||||||
struct pipe_context;
|
struct pipe_context;
|
||||||
|
struct failover_context;
|
||||||
|
|
||||||
|
|
||||||
struct pipe_context *failover_create( struct pipe_context *hw,
|
struct pipe_context *failover_create( struct pipe_context *hw,
|
||||||
struct pipe_context *sw );
|
struct pipe_context *sw );
|
||||||
|
|
||||||
|
|
||||||
|
void failover_fail_over( struct failover_context *failover );
|
||||||
|
|
||||||
#endif /* FO_WINSYS_H */
|
#endif /* FO_WINSYS_H */
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
i915_draw_range_elements(struct pipe_context *pipe,
|
i915_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -106,27 +106,25 @@ i915_draw_range_elements(struct pipe_context *pipe,
|
||||||
pipe_buffer_unmap(pipe->screen, indexBuffer);
|
pipe_buffer_unmap(pipe->screen, indexBuffer);
|
||||||
draw_set_mapped_element_buffer_range(draw, 0, start, start + count - 1, NULL);
|
draw_set_mapped_element_buffer_range(draw, 0, start, start + count - 1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
i915_draw_elements(struct pipe_context *pipe,
|
i915_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return i915_draw_range_elements(pipe, indexBuffer,
|
i915_draw_range_elements(pipe, indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
0, 0xffffffff,
|
0, 0xffffffff,
|
||||||
prim, start, count);
|
prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
i915_draw_arrays(struct pipe_context *pipe,
|
i915_draw_arrays(struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return i915_draw_elements(pipe, NULL, 0, prim, start, count);
|
i915_draw_elements(pipe, NULL, 0, prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ identity_destroy(struct pipe_context *_pipe)
|
||||||
free(id_pipe);
|
free(id_pipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
identity_draw_arrays(struct pipe_context *_pipe,
|
identity_draw_arrays(struct pipe_context *_pipe,
|
||||||
unsigned prim,
|
unsigned prim,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
|
|
@ -54,13 +54,13 @@ identity_draw_arrays(struct pipe_context *_pipe,
|
||||||
struct identity_context *id_pipe = identity_context(_pipe);
|
struct identity_context *id_pipe = identity_context(_pipe);
|
||||||
struct pipe_context *pipe = id_pipe->pipe;
|
struct pipe_context *pipe = id_pipe->pipe;
|
||||||
|
|
||||||
return pipe->draw_arrays(pipe,
|
pipe->draw_arrays(pipe,
|
||||||
prim,
|
prim,
|
||||||
start,
|
start,
|
||||||
count);
|
count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
identity_draw_elements(struct pipe_context *_pipe,
|
identity_draw_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_buffer *_indexBuffer,
|
struct pipe_buffer *_indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -73,15 +73,15 @@ identity_draw_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_context *pipe = id_pipe->pipe;
|
struct pipe_context *pipe = id_pipe->pipe;
|
||||||
struct pipe_buffer *indexBuffer = id_buffer->buffer;
|
struct pipe_buffer *indexBuffer = id_buffer->buffer;
|
||||||
|
|
||||||
return pipe->draw_elements(pipe,
|
pipe->draw_elements(pipe,
|
||||||
indexBuffer,
|
indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
prim,
|
prim,
|
||||||
start,
|
start,
|
||||||
count);
|
count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
identity_draw_range_elements(struct pipe_context *_pipe,
|
identity_draw_range_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_buffer *_indexBuffer,
|
struct pipe_buffer *_indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -96,14 +96,14 @@ identity_draw_range_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_context *pipe = id_pipe->pipe;
|
struct pipe_context *pipe = id_pipe->pipe;
|
||||||
struct pipe_buffer *indexBuffer = id_buffer->buffer;
|
struct pipe_buffer *indexBuffer = id_buffer->buffer;
|
||||||
|
|
||||||
return pipe->draw_range_elements(pipe,
|
pipe->draw_range_elements(pipe,
|
||||||
indexBuffer,
|
indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
minIndex,
|
minIndex,
|
||||||
maxIndex,
|
maxIndex,
|
||||||
mode,
|
mode,
|
||||||
start,
|
start,
|
||||||
count);
|
count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_query *
|
static struct pipe_query *
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
boolean
|
void
|
||||||
llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
unsigned start, unsigned count)
|
unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return llvmpipe_draw_elements(pipe, NULL, 0, mode, start, count);
|
llvmpipe_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -58,7 +58,7 @@ llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
* Basically, map the vertex buffers (and drawing surfaces), then hand off
|
* Basically, map the vertex buffers (and drawing surfaces), then hand off
|
||||||
* the drawing to the 'draw' module.
|
* the drawing to the 'draw' module.
|
||||||
*/
|
*/
|
||||||
boolean
|
void
|
||||||
llvmpipe_draw_range_elements(struct pipe_context *pipe,
|
llvmpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -122,20 +122,18 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
/* Note: leave drawing surfaces mapped */
|
/* Note: leave drawing surfaces mapped */
|
||||||
|
|
||||||
lp->dirty_render_cache = TRUE;
|
lp->dirty_render_cache = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean
|
void
|
||||||
llvmpipe_draw_elements(struct pipe_context *pipe,
|
llvmpipe_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return llvmpipe_draw_range_elements( pipe, indexBuffer,
|
llvmpipe_draw_range_elements( pipe, indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
0, 0xffffffff,
|
0, 0xffffffff,
|
||||||
mode, start, count );
|
mode, start, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,14 +197,14 @@ void llvmpipe_update_fs(struct llvmpipe_context *lp);
|
||||||
void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe );
|
void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe );
|
||||||
|
|
||||||
|
|
||||||
boolean llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
void llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
|
|
||||||
boolean llvmpipe_draw_elements(struct pipe_context *pipe,
|
void llvmpipe_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count);
|
unsigned mode, unsigned start, unsigned count);
|
||||||
boolean
|
void
|
||||||
llvmpipe_draw_range_elements(struct pipe_context *pipe,
|
llvmpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
|
||||||
|
|
@ -141,9 +141,9 @@ extern void nv04_emit_hw_state(struct nv04_context *nv04);
|
||||||
extern void nv04_state_tex_update(struct nv04_context *nv04);
|
extern void nv04_state_tex_update(struct nv04_context *nv04);
|
||||||
|
|
||||||
/* nv04_vbo.c */
|
/* nv04_vbo.c */
|
||||||
extern boolean nv04_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv04_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv04_draw_elements( struct pipe_context *pipe,
|
extern void nv04_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count);
|
unsigned prim, unsigned start, unsigned count);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include "nouveau/nouveau_channel.h"
|
#include "nouveau/nouveau_channel.h"
|
||||||
#include "nouveau/nouveau_pushbuf.h"
|
#include "nouveau/nouveau_pushbuf.h"
|
||||||
|
|
||||||
boolean nv04_draw_elements( struct pipe_context *pipe,
|
void nv04_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
|
|
@ -65,15 +65,13 @@ boolean nv04_draw_elements( struct pipe_context *pipe,
|
||||||
pipe_buffer_unmap(pscreen, indexBuffer);
|
pipe_buffer_unmap(pscreen, indexBuffer);
|
||||||
draw_set_mapped_element_buffer(draw, 0, NULL);
|
draw_set_mapped_element_buffer(draw, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean nv04_draw_arrays( struct pipe_context *pipe,
|
void nv04_draw_arrays( struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
printf("coucou in draw arrays\n");
|
printf("coucou in draw arrays\n");
|
||||||
return nv04_draw_elements(pipe, NULL, 0, prim, start, count);
|
nv04_draw_elements(pipe, NULL, 0, prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,9 @@ extern void nv10_emit_hw_state(struct nv10_context *nv10);
|
||||||
extern void nv10_state_tex_update(struct nv10_context *nv10);
|
extern void nv10_state_tex_update(struct nv10_context *nv10);
|
||||||
|
|
||||||
/* nv10_vbo.c */
|
/* nv10_vbo.c */
|
||||||
extern boolean nv10_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv10_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv10_draw_elements( struct pipe_context *pipe,
|
extern void nv10_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count);
|
unsigned prim, unsigned start, unsigned count);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include "nouveau/nouveau_channel.h"
|
#include "nouveau/nouveau_channel.h"
|
||||||
#include "nouveau/nouveau_pushbuf.h"
|
#include "nouveau/nouveau_pushbuf.h"
|
||||||
|
|
||||||
boolean nv10_draw_elements( struct pipe_context *pipe,
|
void nv10_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
|
|
@ -65,14 +65,12 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
|
||||||
pipe_buffer_unmap(pscreen, indexBuffer);
|
pipe_buffer_unmap(pscreen, indexBuffer);
|
||||||
draw_set_mapped_element_buffer(draw, 0, NULL);
|
draw_set_mapped_element_buffer(draw, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean nv10_draw_arrays( struct pipe_context *pipe,
|
void nv10_draw_arrays( struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return nv10_draw_elements(pipe, NULL, 0, prim, start, count);
|
nv10_draw_elements(pipe, NULL, 0, prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -143,9 +143,9 @@ extern void nv20_emit_hw_state(struct nv20_context *nv20);
|
||||||
extern void nv20_state_tex_update(struct nv20_context *nv20);
|
extern void nv20_state_tex_update(struct nv20_context *nv20);
|
||||||
|
|
||||||
/* nv20_vbo.c */
|
/* nv20_vbo.c */
|
||||||
extern boolean nv20_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv20_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv20_draw_elements( struct pipe_context *pipe,
|
extern void nv20_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count);
|
unsigned prim, unsigned start, unsigned count);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#include "nouveau/nouveau_channel.h"
|
#include "nouveau/nouveau_channel.h"
|
||||||
#include "nouveau/nouveau_pushbuf.h"
|
#include "nouveau/nouveau_pushbuf.h"
|
||||||
|
|
||||||
boolean nv20_draw_elements( struct pipe_context *pipe,
|
void nv20_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
|
|
@ -67,13 +67,12 @@ boolean nv20_draw_elements( struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_flush(nv20->draw);
|
draw_flush(nv20->draw);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean nv20_draw_arrays( struct pipe_context *pipe,
|
void nv20_draw_arrays( struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return nv20_draw_elements(pipe, NULL, 0, prim, start, count);
|
nv20_draw_elements(pipe, NULL, 0, prim, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,9 +198,9 @@ extern struct nv30_state_entry nv30_state_fragtex;
|
||||||
extern struct nv30_state_entry nv30_state_vbo;
|
extern struct nv30_state_entry nv30_state_vbo;
|
||||||
|
|
||||||
/* nv30_vbo.c */
|
/* nv30_vbo.c */
|
||||||
extern boolean nv30_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv30_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv30_draw_elements(struct pipe_context *pipe,
|
extern void nv30_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start,
|
unsigned mode, unsigned start,
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv30_draw_arrays(struct pipe_context *pipe,
|
nv30_draw_arrays(struct pipe_context *pipe,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
|
|
@ -175,7 +175,7 @@ nv30_draw_arrays(struct pipe_context *pipe,
|
||||||
if (FORCE_SWTNL || !nv30_state_validate(nv30)) {
|
if (FORCE_SWTNL || !nv30_state_validate(nv30)) {
|
||||||
/*return nv30_draw_elements_swtnl(pipe, NULL, 0,
|
/*return nv30_draw_elements_swtnl(pipe, NULL, 0,
|
||||||
mode, start, count);*/
|
mode, start, count);*/
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count) {
|
while (count) {
|
||||||
|
|
@ -362,7 +362,7 @@ nv30_draw_elements_u32(struct nv30_context *nv30, void *ib,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
nv30_draw_elements_inline(struct pipe_context *pipe,
|
nv30_draw_elements_inline(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *ib, unsigned ib_size,
|
struct pipe_buffer *ib, unsigned ib_size,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -393,10 +393,9 @@ nv30_draw_elements_inline(struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe_buffer_unmap(pscreen, ib);
|
pipe_buffer_unmap(pscreen, ib);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
nv30_draw_elements_vbo(struct pipe_context *pipe,
|
nv30_draw_elements_vbo(struct pipe_context *pipe,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
|
|
@ -445,11 +444,9 @@ nv30_draw_elements_vbo(struct pipe_context *pipe,
|
||||||
count -= vc;
|
count -= vc;
|
||||||
start = restart;
|
start = restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv30_draw_elements(struct pipe_context *pipe,
|
nv30_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -461,7 +458,7 @@ nv30_draw_elements(struct pipe_context *pipe,
|
||||||
if (FORCE_SWTNL || !nv30_state_validate(nv30)) {
|
if (FORCE_SWTNL || !nv30_state_validate(nv30)) {
|
||||||
/*return nv30_draw_elements_swtnl(pipe, NULL, 0,
|
/*return nv30_draw_elements_swtnl(pipe, NULL, 0,
|
||||||
mode, start, count);*/
|
mode, start, count);*/
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idxbuf) {
|
if (idxbuf) {
|
||||||
|
|
@ -472,7 +469,6 @@ nv30_draw_elements(struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe->flush(pipe, 0, NULL);
|
pipe->flush(pipe, 0, NULL);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ extern void nv40_screen_init_miptree_functions(struct pipe_screen *pscreen);
|
||||||
|
|
||||||
/* nv40_draw.c */
|
/* nv40_draw.c */
|
||||||
extern struct draw_stage *nv40_draw_render_stage(struct nv40_context *nv40);
|
extern struct draw_stage *nv40_draw_render_stage(struct nv40_context *nv40);
|
||||||
extern boolean nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
extern void nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *idxbuf,
|
struct pipe_buffer *idxbuf,
|
||||||
unsigned ib_size, unsigned mode,
|
unsigned ib_size, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
|
|
@ -219,9 +219,9 @@ extern struct nv40_state_entry nv40_state_vbo;
|
||||||
extern struct nv40_state_entry nv40_state_vtxfmt;
|
extern struct nv40_state_entry nv40_state_vtxfmt;
|
||||||
|
|
||||||
/* nv40_vbo.c */
|
/* nv40_vbo.c */
|
||||||
extern boolean nv40_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv40_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv40_draw_elements(struct pipe_context *pipe,
|
extern void nv40_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start,
|
unsigned mode, unsigned start,
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ nv40_draw_render_stage(struct nv40_context *nv40)
|
||||||
return &render->stage;
|
return &render->stage;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *idxbuf, unsigned idxbuf_size,
|
struct pipe_buffer *idxbuf, unsigned idxbuf_size,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -237,7 +237,7 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
||||||
void *map;
|
void *map;
|
||||||
|
|
||||||
if (!nv40_state_validate_swtnl(nv40))
|
if (!nv40_state_validate_swtnl(nv40))
|
||||||
return FALSE;
|
return;
|
||||||
nv40->state.dirty &= ~(1ULL << NV40_STATE_VTXBUF);
|
nv40->state.dirty &= ~(1ULL << NV40_STATE_VTXBUF);
|
||||||
nv40_state_emit(nv40);
|
nv40_state_emit(nv40);
|
||||||
|
|
||||||
|
|
@ -278,8 +278,6 @@ nv40_draw_elements_swtnl(struct pipe_context *pipe,
|
||||||
|
|
||||||
draw_flush(nv40->draw);
|
draw_flush(nv40->draw);
|
||||||
pipe->flush(pipe, 0, NULL);
|
pipe->flush(pipe, 0, NULL);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void
|
static INLINE void
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ nv40_vbo_static_attrib(struct nv40_context *nv40, struct nouveau_stateobj *so,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv40_draw_arrays(struct pipe_context *pipe,
|
nv40_draw_arrays(struct pipe_context *pipe,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
|
|
@ -174,8 +174,9 @@ nv40_draw_arrays(struct pipe_context *pipe,
|
||||||
|
|
||||||
nv40_vbo_set_idxbuf(nv40, NULL, 0);
|
nv40_vbo_set_idxbuf(nv40, NULL, 0);
|
||||||
if (FORCE_SWTNL || !nv40_state_validate(nv40)) {
|
if (FORCE_SWTNL || !nv40_state_validate(nv40)) {
|
||||||
return nv40_draw_elements_swtnl(pipe, NULL, 0,
|
nv40_draw_elements_swtnl(pipe, NULL, 0,
|
||||||
mode, start, count);
|
mode, start, count);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count) {
|
while (count) {
|
||||||
|
|
@ -221,7 +222,6 @@ nv40_draw_arrays(struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe->flush(pipe, 0, NULL);
|
pipe->flush(pipe, 0, NULL);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void
|
static INLINE void
|
||||||
|
|
@ -362,7 +362,7 @@ nv40_draw_elements_u32(struct nv40_context *nv40, void *ib,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
nv40_draw_elements_inline(struct pipe_context *pipe,
|
nv40_draw_elements_inline(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *ib, unsigned ib_size,
|
struct pipe_buffer *ib, unsigned ib_size,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -393,10 +393,9 @@ nv40_draw_elements_inline(struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe_buffer_unmap(pscreen, ib);
|
pipe_buffer_unmap(pscreen, ib);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
nv40_draw_elements_vbo(struct pipe_context *pipe,
|
nv40_draw_elements_vbo(struct pipe_context *pipe,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
|
|
@ -445,11 +444,9 @@ nv40_draw_elements_vbo(struct pipe_context *pipe,
|
||||||
count -= vc;
|
count -= vc;
|
||||||
start = restart;
|
start = restart;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv40_draw_elements(struct pipe_context *pipe,
|
nv40_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -459,8 +456,9 @@ nv40_draw_elements(struct pipe_context *pipe,
|
||||||
|
|
||||||
idxbuf = nv40_vbo_set_idxbuf(nv40, indexBuffer, indexSize);
|
idxbuf = nv40_vbo_set_idxbuf(nv40, indexBuffer, indexSize);
|
||||||
if (FORCE_SWTNL || !nv40_state_validate(nv40)) {
|
if (FORCE_SWTNL || !nv40_state_validate(nv40)) {
|
||||||
return nv40_draw_elements_swtnl(pipe, NULL, 0,
|
nv40_draw_elements_swtnl(pipe, NULL, 0,
|
||||||
mode, start, count);
|
mode, start, count);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idxbuf) {
|
if (idxbuf) {
|
||||||
|
|
@ -471,7 +469,6 @@ nv40_draw_elements(struct pipe_context *pipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
pipe->flush(pipe, 0, NULL);
|
pipe->flush(pipe, 0, NULL);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
|
|
|
||||||
|
|
@ -191,9 +191,9 @@ nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
|
||||||
extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
|
extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
|
||||||
|
|
||||||
/* nv50_vbo.c */
|
/* nv50_vbo.c */
|
||||||
extern boolean nv50_draw_arrays(struct pipe_context *, unsigned mode,
|
extern void nv50_draw_arrays(struct pipe_context *, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
extern boolean nv50_draw_elements(struct pipe_context *pipe,
|
extern void nv50_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start,
|
unsigned mode, unsigned start,
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ nv50_vbo_vtxelt_to_hw(struct pipe_vertex_element *ve)
|
||||||
return (hw_type | hw_size);
|
return (hw_type | hw_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
|
nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
|
||||||
unsigned count)
|
unsigned count)
|
||||||
{
|
{
|
||||||
|
|
@ -182,7 +182,9 @@ nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
|
||||||
BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
|
BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
|
||||||
OUT_RING (chan, 0);
|
OUT_RING (chan, 0);
|
||||||
|
|
||||||
return ret;
|
/* XXX: not sure what to do if ret != TRUE: flush and retry?
|
||||||
|
*/
|
||||||
|
assert(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE boolean
|
static INLINE boolean
|
||||||
|
|
@ -275,7 +277,7 @@ nv50_draw_elements_inline_u32(struct nv50_context *nv50, uint32_t *map,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
void
|
||||||
nv50_draw_elements(struct pipe_context *pipe,
|
nv50_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
struct pipe_buffer *indexBuffer, unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
|
|
@ -318,7 +320,9 @@ nv50_draw_elements(struct pipe_context *pipe,
|
||||||
|
|
||||||
pipe_buffer_unmap(pscreen, indexBuffer);
|
pipe_buffer_unmap(pscreen, indexBuffer);
|
||||||
|
|
||||||
return ret;
|
/* XXX: what to do if ret != TRUE? Flush and retry?
|
||||||
|
*/
|
||||||
|
assert(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE boolean
|
static INLINE boolean
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ validate:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the fast-path drawing & emission for HW TCL. */
|
/* This is the fast-path drawing & emission for HW TCL. */
|
||||||
boolean r300_draw_range_elements(struct pipe_context* pipe,
|
void r300_draw_range_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned minIndex,
|
unsigned minIndex,
|
||||||
|
|
@ -225,30 +225,33 @@ boolean r300_draw_range_elements(struct pipe_context* pipe,
|
||||||
struct r300_context* r300 = r300_context(pipe);
|
struct r300_context* r300 = r300_context(pipe);
|
||||||
|
|
||||||
if (!u_trim_pipe_prim(mode, &count)) {
|
if (!u_trim_pipe_prim(mode, &count)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > 65535) {
|
if (count > 65535) {
|
||||||
return FALSE;
|
/* XXX: use aux/indices functions to split this into smaller
|
||||||
|
* primitives.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r300_nothing_to_draw(r300)) {
|
if (r300_nothing_to_draw(r300)) {
|
||||||
return TRUE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r300_update_derived_state(r300);
|
r300_update_derived_state(r300);
|
||||||
|
|
||||||
if (!r300_setup_vertex_buffers(r300)) {
|
if (!r300_setup_vertex_buffers(r300)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r300->winsys->add_buffer(r300->winsys, indexBuffer,
|
if (!r300->winsys->add_buffer(r300->winsys, indexBuffer,
|
||||||
RADEON_GEM_DOMAIN_GTT, 0)) {
|
RADEON_GEM_DOMAIN_GTT, 0)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r300->winsys->validate(r300->winsys)) {
|
if (!r300->winsys->validate(r300->winsys)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r300_emit_dirty_state(r300);
|
r300_emit_dirty_state(r300);
|
||||||
|
|
@ -257,41 +260,42 @@ boolean r300_draw_range_elements(struct pipe_context* pipe,
|
||||||
|
|
||||||
r300_emit_draw_elements(r300, indexBuffer, indexSize, minIndex, maxIndex,
|
r300_emit_draw_elements(r300, indexBuffer, indexSize, minIndex, maxIndex,
|
||||||
mode, start, count);
|
mode, start, count);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Simple helpers for context setup. Should probably be moved to util. */
|
/* Simple helpers for context setup. Should probably be moved to util. */
|
||||||
boolean r300_draw_elements(struct pipe_context* pipe,
|
void r300_draw_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize, unsigned mode,
|
unsigned indexSize, unsigned mode,
|
||||||
unsigned start, unsigned count)
|
unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return pipe->draw_range_elements(pipe, indexBuffer, indexSize, 0, ~0,
|
pipe->draw_range_elements(pipe, indexBuffer, indexSize, 0, ~0,
|
||||||
mode, start, count);
|
mode, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
||||||
unsigned start, unsigned count)
|
unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
struct r300_context* r300 = r300_context(pipe);
|
struct r300_context* r300 = r300_context(pipe);
|
||||||
|
|
||||||
if (!u_trim_pipe_prim(mode, &count)) {
|
if (!u_trim_pipe_prim(mode, &count)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > 65535) {
|
if (count > 65535) {
|
||||||
return FALSE;
|
/* XXX: driver needs to handle this -- use the functions in
|
||||||
|
* aux/indices to split this into several smaller primitives.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r300_nothing_to_draw(r300)) {
|
if (r300_nothing_to_draw(r300)) {
|
||||||
return TRUE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r300_update_derived_state(r300);
|
r300_update_derived_state(r300);
|
||||||
|
|
||||||
if (!r300_setup_vertex_buffers(r300)) {
|
if (!r300_setup_vertex_buffers(r300)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
r300_emit_dirty_state(r300);
|
r300_emit_dirty_state(r300);
|
||||||
|
|
@ -299,8 +303,6 @@ boolean r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
||||||
r300_emit_aos(r300, start);
|
r300_emit_aos(r300, start);
|
||||||
|
|
||||||
r300_emit_draw_arrays(r300, mode, count);
|
r300_emit_draw_arrays(r300, mode, count);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
@ -309,7 +311,7 @@ boolean r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/* SW TCL arrays, using Draw. */
|
/* SW TCL arrays, using Draw. */
|
||||||
boolean r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
void r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
unsigned count)
|
unsigned count)
|
||||||
|
|
@ -318,11 +320,11 @@ boolean r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!u_trim_pipe_prim(mode, &count)) {
|
if (!u_trim_pipe_prim(mode, &count)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r300_nothing_to_draw(r300)) {
|
if (r300_nothing_to_draw(r300)) {
|
||||||
return TRUE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||||
|
|
@ -346,12 +348,10 @@ boolean r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
||||||
pipe_buffer_unmap(pipe->screen, r300->vertex_buffer[i].buffer);
|
pipe_buffer_unmap(pipe->screen, r300->vertex_buffer[i].buffer);
|
||||||
draw_set_mapped_vertex_buffer(r300->draw, i, NULL);
|
draw_set_mapped_vertex_buffer(r300->draw, i, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SW TCL elements, using Draw. */
|
/* SW TCL elements, using Draw. */
|
||||||
boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned minIndex,
|
unsigned minIndex,
|
||||||
|
|
@ -365,11 +365,11 @@ boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
||||||
void* indices;
|
void* indices;
|
||||||
|
|
||||||
if (!u_trim_pipe_prim(mode, &count)) {
|
if (!u_trim_pipe_prim(mode, &count)) {
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r300_nothing_to_draw(r300)) {
|
if (r300_nothing_to_draw(r300)) {
|
||||||
return TRUE;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||||
|
|
@ -400,8 +400,6 @@ boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
||||||
pipe_buffer_unmap(pipe->screen, indexBuffer);
|
pipe_buffer_unmap(pipe->screen, indexBuffer);
|
||||||
draw_set_mapped_element_buffer_range(r300->draw, 0, start,
|
draw_set_mapped_element_buffer_range(r300->draw, 0, start,
|
||||||
start + count - 1, NULL);
|
start + count - 1, NULL);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Object for rendering using Draw. */
|
/* Object for rendering using Draw. */
|
||||||
|
|
|
||||||
|
|
@ -25,35 +25,35 @@
|
||||||
|
|
||||||
uint32_t r300_translate_primitive(unsigned prim);
|
uint32_t r300_translate_primitive(unsigned prim);
|
||||||
|
|
||||||
boolean r300_draw_range_elements(struct pipe_context* pipe,
|
void r300_draw_range_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned minIndex,
|
unsigned minIndex,
|
||||||
unsigned maxIndex,
|
unsigned maxIndex,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
unsigned count);
|
unsigned count);
|
||||||
|
|
||||||
boolean r300_draw_elements(struct pipe_context* pipe,
|
void r300_draw_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize, unsigned mode,
|
unsigned indexSize, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
|
|
||||||
boolean r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
|
|
||||||
boolean r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
void r300_swtcl_draw_arrays(struct pipe_context* pipe,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
unsigned count);
|
unsigned count);
|
||||||
|
|
||||||
boolean r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
|
||||||
struct pipe_buffer* indexBuffer,
|
struct pipe_buffer* indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned minIndex,
|
unsigned minIndex,
|
||||||
unsigned maxIndex,
|
unsigned maxIndex,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
unsigned count);
|
unsigned count);
|
||||||
|
|
||||||
#endif /* R300_RENDER_H */
|
#endif /* R300_RENDER_H */
|
||||||
|
|
|
||||||
|
|
@ -98,11 +98,11 @@ softpipe_unmap_constant_buffers(struct softpipe_context *sp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean
|
void
|
||||||
softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
unsigned start, unsigned count)
|
unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return softpipe_draw_elements(pipe, NULL, 0, mode, start, count);
|
softpipe_draw_elements(pipe, NULL, 0, mode, start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
* Basically, map the vertex buffers (and drawing surfaces), then hand off
|
* Basically, map the vertex buffers (and drawing surfaces), then hand off
|
||||||
* the drawing to the 'draw' module.
|
* the drawing to the 'draw' module.
|
||||||
*/
|
*/
|
||||||
boolean
|
void
|
||||||
softpipe_draw_range_elements(struct pipe_context *pipe,
|
softpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -181,19 +181,17 @@ softpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
softpipe_unmap_constant_buffers(sp);
|
softpipe_unmap_constant_buffers(sp);
|
||||||
|
|
||||||
sp->dirty_render_cache = TRUE;
|
sp->dirty_render_cache = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean
|
void
|
||||||
softpipe_draw_elements(struct pipe_context *pipe,
|
softpipe_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return softpipe_draw_range_elements( pipe, indexBuffer,
|
softpipe_draw_range_elements( pipe, indexBuffer,
|
||||||
indexSize,
|
indexSize,
|
||||||
0, 0xffffffff,
|
0, 0xffffffff,
|
||||||
mode, start, count );
|
mode, start, count );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,14 +184,14 @@ void softpipe_set_vertex_buffers(struct pipe_context *,
|
||||||
void softpipe_update_derived( struct softpipe_context *softpipe );
|
void softpipe_update_derived( struct softpipe_context *softpipe );
|
||||||
|
|
||||||
|
|
||||||
boolean softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
void softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
|
||||||
unsigned start, unsigned count);
|
unsigned start, unsigned count);
|
||||||
|
|
||||||
boolean softpipe_draw_elements(struct pipe_context *pipe,
|
void softpipe_draw_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count);
|
unsigned mode, unsigned start, unsigned count);
|
||||||
boolean
|
void
|
||||||
softpipe_draw_range_elements(struct pipe_context *pipe,
|
softpipe_draw_range_elements(struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ retry:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
svga_draw_range_elements( struct pipe_context *pipe,
|
svga_draw_range_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *index_buffer,
|
struct pipe_buffer *index_buffer,
|
||||||
unsigned index_size,
|
unsigned index_size,
|
||||||
|
|
@ -162,7 +162,7 @@ svga_draw_range_elements( struct pipe_context *pipe,
|
||||||
enum pipe_error ret = 0;
|
enum pipe_error ret = 0;
|
||||||
|
|
||||||
if (!u_trim_pipe_prim( prim, &count ))
|
if (!u_trim_pipe_prim( prim, &count ))
|
||||||
return TRUE;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mark currently bound target surfaces as dirty
|
* Mark currently bound target surfaces as dirty
|
||||||
|
|
@ -183,7 +183,7 @@ svga_draw_range_elements( struct pipe_context *pipe,
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (svga->curr.vs->base.id == svga->debug.disable_shader ||
|
if (svga->curr.vs->base.id == svga->debug.disable_shader ||
|
||||||
svga->curr.fs->base.id == svga->debug.disable_shader)
|
svga->curr.fs->base.id == svga->debug.disable_shader)
|
||||||
return 0;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (svga->state.sw.need_swtnl)
|
if (svga->state.sw.need_swtnl)
|
||||||
|
|
@ -225,31 +225,29 @@ svga_draw_range_elements( struct pipe_context *pipe,
|
||||||
svga_hwtnl_flush_retry( svga );
|
svga_hwtnl_flush_retry( svga );
|
||||||
svga_context_flush(svga, NULL);
|
svga_context_flush(svga, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret == PIPE_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
svga_draw_elements( struct pipe_context *pipe,
|
svga_draw_elements( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *index_buffer,
|
struct pipe_buffer *index_buffer,
|
||||||
unsigned index_size,
|
unsigned index_size,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return svga_draw_range_elements( pipe, index_buffer,
|
svga_draw_range_elements( pipe, index_buffer,
|
||||||
index_size,
|
index_size,
|
||||||
0, 0xffffffff,
|
0, 0xffffffff,
|
||||||
prim, start, count );
|
prim, start, count );
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static void
|
||||||
svga_draw_arrays( struct pipe_context *pipe,
|
svga_draw_arrays( struct pipe_context *pipe,
|
||||||
unsigned prim, unsigned start, unsigned count)
|
unsigned prim, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
return svga_draw_range_elements(pipe, NULL, 0,
|
svga_draw_range_elements(pipe, NULL, 0,
|
||||||
start, start + count - 1,
|
start, start + count - 1,
|
||||||
prim,
|
prim,
|
||||||
start, count);
|
start, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,16 +161,15 @@ trace_context_draw_block(struct trace_context *tr_ctx, int flag)
|
||||||
pipe_mutex_unlock(tr_ctx->draw_mutex);
|
pipe_mutex_unlock(tr_ctx->draw_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE boolean
|
static INLINE void
|
||||||
trace_context_draw_arrays(struct pipe_context *_pipe,
|
trace_context_draw_arrays(struct pipe_context *_pipe,
|
||||||
unsigned mode, unsigned start, unsigned count)
|
unsigned mode, unsigned start, unsigned count)
|
||||||
{
|
{
|
||||||
struct trace_context *tr_ctx = trace_context(_pipe);
|
struct trace_context *tr_ctx = trace_context(_pipe);
|
||||||
struct pipe_context *pipe = tr_ctx->pipe;
|
struct pipe_context *pipe = tr_ctx->pipe;
|
||||||
boolean result;
|
|
||||||
|
|
||||||
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 1);
|
trace_context_draw_block(tr_ctx, 1);
|
||||||
|
|
||||||
|
|
@ -181,19 +180,15 @@ trace_context_draw_arrays(struct pipe_context *_pipe,
|
||||||
trace_dump_arg(uint, start);
|
trace_dump_arg(uint, start);
|
||||||
trace_dump_arg(uint, count);
|
trace_dump_arg(uint, count);
|
||||||
|
|
||||||
result = pipe->draw_arrays(pipe, mode, start, count);
|
pipe->draw_arrays(pipe, mode, start, count);
|
||||||
|
|
||||||
trace_dump_ret(bool, result);
|
|
||||||
|
|
||||||
trace_dump_call_end();
|
trace_dump_call_end();
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 2);
|
trace_context_draw_block(tr_ctx, 2);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static INLINE boolean
|
static INLINE void
|
||||||
trace_context_draw_elements(struct pipe_context *_pipe,
|
trace_context_draw_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_buffer *_indexBuffer,
|
struct pipe_buffer *_indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -203,10 +198,9 @@ trace_context_draw_elements(struct pipe_context *_pipe,
|
||||||
struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
|
struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
|
||||||
struct pipe_context *pipe = tr_ctx->pipe;
|
struct pipe_context *pipe = tr_ctx->pipe;
|
||||||
struct pipe_buffer *indexBuffer = tr_buf->buffer;
|
struct pipe_buffer *indexBuffer = tr_buf->buffer;
|
||||||
boolean result;
|
|
||||||
|
|
||||||
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 1);
|
trace_context_draw_block(tr_ctx, 1);
|
||||||
|
|
||||||
|
|
@ -221,19 +215,15 @@ trace_context_draw_elements(struct pipe_context *_pipe,
|
||||||
trace_dump_arg(uint, start);
|
trace_dump_arg(uint, start);
|
||||||
trace_dump_arg(uint, count);
|
trace_dump_arg(uint, count);
|
||||||
|
|
||||||
result = pipe->draw_elements(pipe, indexBuffer, indexSize, mode, start, count);
|
pipe->draw_elements(pipe, indexBuffer, indexSize, mode, start, count);
|
||||||
|
|
||||||
trace_dump_ret(bool, result);
|
|
||||||
|
|
||||||
trace_dump_call_end();
|
trace_dump_call_end();
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 2);
|
trace_context_draw_block(tr_ctx, 2);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static INLINE boolean
|
static INLINE void
|
||||||
trace_context_draw_range_elements(struct pipe_context *_pipe,
|
trace_context_draw_range_elements(struct pipe_context *_pipe,
|
||||||
struct pipe_buffer *_indexBuffer,
|
struct pipe_buffer *_indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
|
|
@ -247,10 +237,9 @@ trace_context_draw_range_elements(struct pipe_context *_pipe,
|
||||||
struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
|
struct trace_buffer *tr_buf = trace_buffer(_indexBuffer);
|
||||||
struct pipe_context *pipe = tr_ctx->pipe;
|
struct pipe_context *pipe = tr_ctx->pipe;
|
||||||
struct pipe_buffer *indexBuffer = tr_buf->buffer;
|
struct pipe_buffer *indexBuffer = tr_buf->buffer;
|
||||||
boolean result;
|
|
||||||
|
|
||||||
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
if (tr_ctx->curr.fs->disabled || tr_ctx->curr.vs->disabled)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 1);
|
trace_context_draw_block(tr_ctx, 1);
|
||||||
|
|
||||||
|
|
@ -267,18 +256,14 @@ trace_context_draw_range_elements(struct pipe_context *_pipe,
|
||||||
trace_dump_arg(uint, start);
|
trace_dump_arg(uint, start);
|
||||||
trace_dump_arg(uint, count);
|
trace_dump_arg(uint, count);
|
||||||
|
|
||||||
result = pipe->draw_range_elements(pipe,
|
pipe->draw_range_elements(pipe,
|
||||||
indexBuffer,
|
indexBuffer,
|
||||||
indexSize, minIndex, maxIndex,
|
indexSize, minIndex, maxIndex,
|
||||||
mode, start, count);
|
mode, start, count);
|
||||||
|
|
||||||
trace_dump_ret(bool, result);
|
|
||||||
|
|
||||||
trace_dump_call_end();
|
trace_dump_call_end();
|
||||||
|
|
||||||
trace_context_draw_block(tr_ctx, 2);
|
trace_context_draw_block(tr_ctx, 2);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,27 +61,27 @@ struct pipe_context {
|
||||||
* VBO drawing (return false on fallbacks (temporary??))
|
* VBO drawing (return false on fallbacks (temporary??))
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
boolean (*draw_arrays)( struct pipe_context *pipe,
|
void (*draw_arrays)( struct pipe_context *pipe,
|
||||||
unsigned mode, unsigned start, unsigned count);
|
unsigned mode, unsigned start, unsigned count);
|
||||||
|
|
||||||
boolean (*draw_elements)( struct pipe_context *pipe,
|
void (*draw_elements)( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned mode, unsigned start, unsigned count);
|
unsigned mode, unsigned start, unsigned count);
|
||||||
|
|
||||||
/* XXX: this is (probably) a temporary entrypoint, as the range
|
/* XXX: this is (probably) a temporary entrypoint, as the range
|
||||||
* information should be available from the vertex_buffer state.
|
* information should be available from the vertex_buffer state.
|
||||||
* Using this to quickly evaluate a specialized path in the draw
|
* Using this to quickly evaluate a specialized path in the draw
|
||||||
* module.
|
* module.
|
||||||
*/
|
*/
|
||||||
boolean (*draw_range_elements)( struct pipe_context *pipe,
|
void (*draw_range_elements)( struct pipe_context *pipe,
|
||||||
struct pipe_buffer *indexBuffer,
|
struct pipe_buffer *indexBuffer,
|
||||||
unsigned indexSize,
|
unsigned indexSize,
|
||||||
unsigned minIndex,
|
unsigned minIndex,
|
||||||
unsigned maxIndex,
|
unsigned maxIndex,
|
||||||
unsigned mode,
|
unsigned mode,
|
||||||
unsigned start,
|
unsigned start,
|
||||||
unsigned count);
|
unsigned count);
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue