diff options
author | Marek Olšák <[email protected]> | 2011-02-28 22:10:04 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-03-01 00:46:54 +0100 |
commit | ebf69f2c508e2cb6df1437ef0e31cbc8b808824d (patch) | |
tree | b9485072b4c7b63df61329f3fe28805d86f34632 /src/gallium/drivers/r300/r300_context.h | |
parent | d99ec708afbb785ce05031661222b38c9447059f (diff) |
r300g: disable HiZ permanently if the the depth function is inverted
Instead of temporarily.
The HiZ function (something like a depth function) is a property
of a HiZ buffer and can only be changed during HiZ clears.
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index e18f876fc2d..33d1390b070 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -102,7 +102,6 @@ struct r300_dsa_state { }; struct r300_hyperz_state { - int current_func; /* -1 after a clear before first op */ int flush; /* This is actually a command buffer with named dwords. */ uint32_t cb_flush_begin; @@ -414,6 +413,21 @@ struct r300_vertex_element_state { struct r300_vertex_stream_state vertex_stream; }; +enum r300_hiz_func { + HIZ_FUNC_NONE, + + /* The function, when determined, is set in stone + * until the next HiZ clear. */ + + /* MAX is written to the HiZ buffer. + * Used for LESS, LEQUAL. */ + HIZ_FUNC_MAX, + + /* MIN is written to the HiZ buffer. + * Used for GREATER, GEQUAL. */ + HIZ_FUNC_MIN, +}; + struct r300_context { /* Parent class */ struct pipe_context context; @@ -559,6 +573,8 @@ struct r300_context { struct pipe_surface *locked_zbuffer; /* Whether HIZ is enabled. */ boolean hiz_in_use; + /* HiZ function. Can be either MIN or MAX. */ + enum r300_hiz_func hiz_func; void *dsa_decompress_zmask; |