diff options
author | Chia-I Wu <[email protected]> | 2014-01-14 13:50:12 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-01-14 15:43:20 +0800 |
commit | 18645d1533032e0ee64714731977e12ee16d959b (patch) | |
tree | fbbfe488ab1df2ab0e01fe4ea2991c2fa2848b96 /src/gallium/drivers/ilo/ilo_resource.h | |
parent | 1427c3f79faf3d502e5cc7d467c73e095bcd66de (diff) |
ilo: use a helper to determine if HiZ is enabled
Add ilo_texture_can_enable_hiz and replace all checks for tex->hiz.bo by calls
to ilo_texture_can_enable_hiz().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_resource.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.h b/src/gallium/drivers/ilo/ilo_resource.h index afb49ff48b4..125535a2771 100644 --- a/src/gallium/drivers/ilo/ilo_resource.h +++ b/src/gallium/drivers/ilo/ilo_resource.h @@ -157,4 +157,11 @@ ilo_texture_set_slice_flags(struct ilo_texture *tex, unsigned level, } } +static inline bool +ilo_texture_can_enable_hiz(const struct ilo_texture *tex, unsigned level, + unsigned first_slice, unsigned num_slices) +{ + return (tex->hiz.bo != NULL); +} + #endif /* ILO_RESOURCE_H */ |