diff options
author | Nanley Chery <[email protected]> | 2017-01-09 19:24:44 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-01-12 20:52:20 -0800 |
commit | 3ac01ad2ac2aedee7e2515365d13c71a024878fb (patch) | |
tree | 973896767dcc18df4b258c149658feedad9667be /src/intel | |
parent | bcf880a9c89622bc7ab48da652eae4549207e6e8 (diff) |
anv: Add a helper to determine sampling with HiZ
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index aa1b6a81ccf..2342fcbfeb4 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1609,6 +1609,13 @@ struct anv_image { struct anv_surface aux_surface; }; +/* Returns true if a HiZ-enabled depth buffer can be sampled from. */ +static inline bool +anv_can_sample_with_hiz(uint8_t gen, uint32_t samples) +{ + return gen >= 8 && samples == 1; +} + void anv_gen8_hiz_op_resolve(struct anv_cmd_buffer *cmd_buffer, const struct anv_image *image, |