From: Brian Paul Date: Thu, 31 Dec 2009 21:44:40 +0000 (-0700) Subject: gallium: pipe_context::render_condition() and mode flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0b4fb06b8b570b1999a0849797d3cb77f6ee5cd;p=mesa.git gallium: pipe_context::render_condition() and mode flags For conditional rendering predicated on results of an occlusion query. If this driver function is NULL, conditional rendering is not supported by the driver. --- diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 6c06fb90270..60fa9cef824 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -84,6 +84,14 @@ struct pipe_context { unsigned count); /*@}*/ + /** + * Predicate subsequent rendering on occlusion query result + * \param query the query predicate, or NULL if no predicate + * \param mode one of PIPE_COND_RENDER_x + */ + void (*render_condition)( struct pipe_context *pipe, + struct pipe_query *query, + uint mode ); /** * Query objects diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 2cda408fecc..c3b1e634ffc 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -354,6 +354,15 @@ enum pipe_transfer_usage { #define PIPE_QUERY_TYPES 3 +/** + * Conditional rendering modes + */ +#define PIPE_RENDER_COND_WAIT 0 +#define PIPE_RENDER_COND_NO_WAIT 1 +#define PIPE_RENDER_COND_BY_REGION_WAIT 2 +#define PIPE_RENDER_COND_BY_REGION_NO_WAIT 3 + + /** * Point sprite coord modes */