[Mesa-dev] [PATCH 11/18] i965: Replace the region in DRIimage with just a BO pointer and stride.
Eric Anholt
eric at anholt.net
Wed Apr 30 12:48:51 PDT 2014
Kenneth Graunke <kenneth at whitecape.org> writes:
> On 04/29/2014 04:34 PM, Eric Anholt wrote:
> [snip]
>> @@ -558,12 +572,8 @@ intel_dup_image(__DRIimage *orig_image, void *loaderPrivate)
>> if (image == NULL)
>> return NULL;
>>
>> - intel_region_reference(&image->region, orig_image->region);
>> - if (image->region == NULL) {
>> - free(image);
>> - return NULL;
>> - }
>> -
>> + drm_intel_bo_reference(orig_image->bo);
>> + image->bo = orig_image->bo
>
> I noticed you dropped this NULL check, rather than checking image->bo !=
> NULL. Presumably in intel_dup_image, you know that the orig_image BO
> actually exists? If so, this seems fine.
Yeah, we only return an image if it's got a BO attached.
(We also only returned images when they had regions attached, so even
the old code was doing a pointless check)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140430/a6699d0d/attachment.sig>
More information about the mesa-dev
mailing list