diff options
author | José Fonseca <[email protected]> | 2009-01-08 12:31:14 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-01-08 12:31:14 +0000 |
commit | a3ee0aa1bb7c3f9dfc5b13b4e72522c10a22ad05 (patch) | |
tree | 8728f3cccc29ff993d551a90a590ff261da041d1 /src/gallium/auxiliary/draw | |
parent | 2d3953fd5ff91d9717d806a1fa3c8537efb8b67c (diff) | |
parent | f8f9a1b620d31d1a59855fd502caed325d4a324f (diff) |
Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_exec.c
src/gallium/drivers/cell/spu/spu_command.h
src/gallium/include/pipe/p_shader_tokens.h
src/mesa/main/config.h
src/mesa/main/mtypes.h
src/mesa/shader/prog_execute.c
src/mesa/shader/slang/slang_emit.c
src/mesa/state_tracker/st_program.c
src/mesa/state_tracker/wgl/stw_wgl.h
src/mesa/state_tracker/wgl/stw_wgl_pixelformat.h
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_validate.c | 21 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vbuf.h | 11 |
2 files changed, 28 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c index f34c68728ef..03e842ce082 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c @@ -33,6 +33,7 @@ #include "draw_private.h" #include "draw_pipe.h" #include "draw_context.h" +#include "draw_vbuf.h" static boolean points( unsigned prim ) { @@ -52,16 +53,28 @@ static boolean triangles( unsigned prim ) } /** - * Check if we need any special pipeline stages, or whether - * prims/verts can go through untouched. Don't test for bypass - * clipping or vs modes, this function is just about the primitive - * pipeline stages. + * Default version of a function to check if we need any special + * pipeline stages, or whether prims/verts can go through untouched. + * Don't test for bypass clipping or vs modes, this function is just + * about the primitive pipeline stages. + * + * This can be overridden by the driver. */ boolean draw_need_pipeline(const struct draw_context *draw, const struct pipe_rasterizer_state *rasterizer, unsigned int prim ) { + /* If the driver has overridden this, use that version: + */ + if (draw->render && + draw->render->need_pipeline) + { + return draw->render->need_pipeline( draw->render, + rasterizer, + prim ); + } + /* Don't have to worry about triangles turning into lines/points * and triggering the pipeline, because we have to trigger the * pipeline *anyway* if unfilled mode is active. diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h index b0aa2df3099..9ac068c47b8 100644 --- a/src/gallium/auxiliary/draw/draw_vbuf.h +++ b/src/gallium/auxiliary/draw/draw_vbuf.h @@ -55,6 +55,17 @@ struct vbuf_render { unsigned max_vertex_buffer_bytes; /** + * Query if the hardware driver needs assistance for a particular + * combination of rasterizer state and primitive. + * + * Currently optional. + */ + boolean (*need_pipeline)(const struct vbuf_render *render, + const struct pipe_rasterizer_state *rasterizer, + unsigned int prim ); + + + /** * Get the hardware vertex format. * * XXX: have this in draw_context instead? |