diff options
author | Roland Scheidegger <[email protected]> | 2013-06-14 19:48:57 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-18 18:01:24 +0200 |
commit | 793e8e3d7ed816cc9a066245dde798afdcf8b581 (patch) | |
tree | b71d5597d0d8669df8ed896b989bc519c82659d2 /src/gallium/docs | |
parent | 443dc15cf77edcaa7804c4277f0cce5d7c1d6b25 (diff) |
gallium: add condition parameter to render_condition
For conditional rendering this makes it possible to skip rendering
if either the predicate is true or false, as supported by d3d10
(in fact previously it was sort of implied skip rendering if predicate
is false for occlusion predicate, and true for so_overflow predicate).
There's no cap bit for this as presumably all drivers could do it trivially
(but this patch does not implement it for the drivers using true
hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL
functionality).
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/docs')
-rw-r--r-- | src/gallium/docs/source/context.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst index 6a8238e7779..ede89be6ed6 100644 --- a/src/gallium/docs/source/context.rst +++ b/src/gallium/docs/source/context.rst @@ -382,15 +382,19 @@ Conditional Rendering ^^^^^^^^^^^^^^^^^^^^^ A drawing command can be skipped depending on the outcome of a query -(typically an occlusion query). The ``render_condition`` function specifies -the query which should be checked prior to rendering anything. +(typically an occlusion query, or streamout overflow predicate). +The ``render_condition`` function specifies the query which should be checked +prior to rendering anything. Functions honoring render_condition include +(and are limited to) draw_vbo, clear, clear_render_target, clear_depth_stencil. If ``render_condition`` is called with ``query`` = NULL, conditional rendering is disabled and drawing takes place normally. If ``render_condition`` is called with a non-null ``query`` subsequent -drawing commands will be predicated on the outcome of the query. If -the query result is zero subsequent drawing commands will be skipped. +drawing commands will be predicated on the outcome of the query. +Commands will be skipped if ``condition`` is equal to the predicate result +(for non-boolean queries such as OCCLUSION_QUERY, zero counts as FALSE, +non-zero as TRUE). If ``mode`` is PIPE_RENDER_COND_WAIT the driver will wait for the query to complete before deciding whether to render. @@ -401,7 +405,7 @@ has completed, drawing will be predicated on the outcome of the query. If ``mode`` is PIPE_RENDER_COND_BY_REGION_WAIT or PIPE_RENDER_COND_BY_REGION_NO_WAIT rendering will be predicated as above -for the non-REGION modes but in the case that an occulusion query returns +for the non-REGION modes but in the case that an occlusion query returns a non-zero result, regions which were occluded may be ommitted by subsequent drawing commands. This can result in better performance with some GPUs. Normally, if the occlusion query returned a non-zero result subsequent |