diff options
author | Chad Versace <chad.versace@intel.com> | 2015-04-06 06:54:30 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@intel.com> | 2015-04-13 07:32:02 -0700 |
commit | e1338f267fa5670fc02a450774fa89b42e990883 (patch) | |
tree | d26201655ec70580593207f52940cdcd6d3950eb /src/mesa/drivers/dri/i965/intel_fbo.c | |
parent | 5776d65114b553643eea74c58699910cbdb29b55 (diff) | |
download | external_mesa3d-e1338f267fa5670fc02a450774fa89b42e990883.zip external_mesa3d-e1338f267fa5670fc02a450774fa89b42e990883.tar.gz external_mesa3d-e1338f267fa5670fc02a450774fa89b42e990883.tar.bz2 |
i965: Refactor brw_is_hiz_depth_format()
Every caller of this function uses it to determine if the current
miptree needs a hiz buffer to be allocated. Strangely, the function
doesn't take a miptree argument. So, this function effectively decides
if and when a miptree's hiz buffer gets allocated without inspecting the
miptree itself. Luckily, the driver behaves correctly despite the
brw_is_hiz_depth_format's quirk.
I will soon make some changes to the miptree that will require
inspecting the miptree to determine if it needs a hiz buffer. So this
patch renames
brw_is_hiz_depth_format -> intel_miptree_wants_hiz_buffer
and gives it a miptree parameter.
This patch shouldn't change any behavior.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_fbo.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_fbo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 2cf4771..7babd29 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -561,7 +561,7 @@ intel_renderbuffer_update_wrapper(struct brw_context *brw, intel_renderbuffer_set_draw_offset(irb); - if (mt->hiz_buf == NULL && brw_is_hiz_depth_format(brw, rb->Format)) { + if (intel_miptree_wants_hiz_buffer(brw, mt)) { intel_miptree_alloc_hiz(brw, mt); if (!mt->hiz_buf) return false; @@ -1032,7 +1032,7 @@ intel_renderbuffer_move_to_temp(struct brw_context *brw, INTEL_MIPTREE_TILING_ANY, false); - if (brw_is_hiz_depth_format(brw, new_mt->format)) { + if (intel_miptree_wants_hiz_buffer(brw, new_mt)) { intel_miptree_alloc_hiz(brw, new_mt); } |