[Mesa-dev] [PATCH 35/41] intel: Enable HiZ for texture renderbuffers

Chad Versace chad.versace at linux.intel.com
Mon Nov 21 14:26:31 PST 2011


On 11/18/2011 05:36 PM, Eric Anholt wrote:
> On Thu, 17 Nov 2011 19:59:02 -0800, Chad Versace <chad.versace at linux.intel.com> wrote:
>> When a depth texture is first attached to framebuffer, allocate a HiZ
>> miptree for it.
>>
>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>> ---
>>  src/mesa/drivers/dri/intel/intel_fbo.c |    7 +++++++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
>> index 0b6b227..1842925 100644
>> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
>> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
>> @@ -1040,6 +1040,13 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
>>     } else {
>>        intel_miptree_reference(&irb->mt, mt);
>>        intel_renderbuffer_set_draw_offset(irb);
>> +
>> +      if (mt->hiz_mt == NULL &&
>> +	  intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
>> +	 intel_miptree_alloc_hiz(intel, mt);
>> +         if (!mt->hiz_mt)
>> +            return false;
>> +      }
> 
> Aha!  Here's the reason you needed that "initialize the hiz resolves"
> patch in intel_miptree_alloc_hiz.  Now that one makes sense to me --
> previously, intel_miptree_alloc_hiz was only called on uninitialized
> storage.  We can separate that out later, since it's just optimization.

Good!

I was writing a detailed reply to your complaint to that patch, but now it's not needed.

----
Chad Versace
chad.versace at linux.intel.com


More information about the mesa-dev mailing list