[Mesa-dev] [PATCH 02/12] intel: Create intel_miptree_get_region() to prepare for fast color clear.

Paul Berry stereotype441 at gmail.com
Thu May 23 11:43:07 PDT 2013


On 22 May 2013 12:21, Ian Romanick <idr at freedesktop.org> wrote:

> On 05/21/2013 04:52 PM, Paul Berry wrote:
>
>> diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c
>> b/src/mesa/drivers/dri/i915/i830_vtbl.c
>> index b30f45e..a35f58b 100644
>> --- a/src/mesa/drivers/dri/i915/**i830_vtbl.c
>> +++ b/src/mesa/drivers/dri/i915/**i830_vtbl.c
>> @@ -760,7 +760,13 @@ i830_update_draw_buffer(struct intel_context *intel)
>>
>>          for (i = 0; i < fb->_NumColorDrawBuffers; i++) {
>>              irb = intel_renderbuffer(fb->_**ColorDrawBuffers[i]);
>> -           colorRegions[i] = (irb && irb->mt) ? irb->mt->region : NULL;
>> +           if (irb && irb->mt) {
>> +              colorRegions[i] =
>> +                 intel_miptree_get_region(**intel, irb->mt,
>> +                                          INTEL_MIPTREE_ACCESS_RENDER);
>> +           } else {
>> +              colorRegions[i] = NULL;
>> +           }
>>
>
> This idiom appears several places.  Would it be better to pass irb and let
> intel_miptree_get_region return NULL?  Or have a wrapper function? Just
> thinking out loud...
>

I'm not convinced it would be a benefit.  But considering the discussion I
just had with Eric, Ken, and Chad (see my other reply with the same subject
line from a few minutes ago), the question is probably moot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130523/ef880d02/attachment.html>


More information about the mesa-dev mailing list