i965: Refactor brw_is_hiz_depth_format()
authorChad Versace <chad.versace@intel.com>
Mon, 6 Apr 2015 13:54:30 +0000 (06:54 -0700)
committerChad Versace <chad.versace@intel.com>
Mon, 13 Apr 2015 14:32:02 +0000 (07:32 -0700)
commite1338f267fa5670fc02a450774fa89b42e990883
treed26201655ec70580593207f52940cdcd6d3950eb
parent5776d65114b553643eea74c58699910cbdb29b55
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>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h