[Mesa-dev] [PATCH 1/3] vl/dri3: handle the case of different GPU(v4)
Nayan Deshmukh
nayan26deshmukh at gmail.com
Fri Sep 16 12:54:54 UTC 2016
Hi Michel,
Thanks for the review.
On Fri, Sep 16, 2016 at 1:47 PM, Christian König <deathsimple at vodafone.de>
wrote:
> Am 16.09.2016 um 10:07 schrieb Michel Dänzer:
>
>> On 14/09/16 02:34 PM, Nayan Deshmukh wrote:
>>
>>> In case of prime when rendering is done on GPU other then the
>>> server GPU, use a seprate linear buffer for each back buffer
>>> which will be displayed using present extension.
>>>
>>> v2: Use a seprate linear buffer for each back buffer (Michel)
>>> v3: Change variable names and fix coding style (Leo and Emil)
>>> v4: Use PIPE_BIND_SAMPLER_VIEW for back buffer in case when
>>> a seprate linear buffer is used (Michel)
>>>
>>> Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
>>>
>> Looks mostly good to me, but Leo should probably also take a look.
>>
>> Acked-by: Michel Dänzer <michel.daenzer at amd.com>
>>
>
> I was just about to ping you guys for comments on this.
>
> Leo anything more you want to add or should I commit it? I'm not so deep
> into this code either.
>
> Christian.
>
>
>
>>
>> @@ -235,16 +240,35 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn)
>>> templ.height0 = scrn->height;
>>> templ.depth0 = 1;
>>> templ.array_size = 1;
>>> - buffer->texture = scrn->base.pscreen->resource_c
>>> reate(scrn->base.pscreen,
>>> - &templ);
>>> - if (!buffer->texture)
>>> - goto unmap_shm;
>>> + if (scrn->is_different_gpu) {
>>> + buffer->texture = scrn->base.pscreen->resource_c
>>> reate(scrn->base.pscreen,
>>> + &templ);
>>> + if (!buffer->texture)
>>> + goto unmap_shm;
>>> +
>>> + templ.bind |= PIPE_BIND_SCANOUT | PIPE_BIND_SHARED |
>>> + PIPE_BIND_LINEAR;
>>> + buffer->linear_texture = scrn->base.pscreen->resource_c
>>> reate(scrn->base.pscreen,
>>> +
>>> &templ);
>>> + pixmap_buffer_texture = buffer->linear_texture;
>>> +
>>> + if (!buffer->linear_texture)
>>> + goto no_linear_texture;
>>> +
>>> + } else {
>>>
>> Bonus points for not adding the empty line at the end of the block here.
>> :)
>>
>> I have submitted another patch without empty line for the bonus points.
:)
Regards,
Nayan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160916/de449259/attachment.html>
More information about the mesa-dev
mailing list