<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 8:31 PM, Leo Liu <span dir="ltr"><<a href="mailto:leo.liu@amd.com" target="_blank">leo.liu@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
On 11/05/2016 02:44 AM, Nayan Deshmukh wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Leo,<br>
<br>
Thanks for the reference patch.<br>
<br>
There are only a number of output surfaces taking turns as the<br>
mixer render targets, so we probably can use the same pixmap<br>
corresponding to each of output surface texture.<br>
<br>
The mixer renders to a VdpOutputSurface which is provided to it by the<br>
application, so we can't make any assumptions on the surface that will<br>
be provided it may or may not be the same. Instead we could have<br>
additional fields in vlVdpOutputSurface which stores the handle and<br>
pixamp of the texture.<br>
</blockquote>
<br></span>
What I meant is in vl dri3 to store certain numbers of pixmaps, and update them when texture, handle, size<br>
changed by calling "pixmap_from_buffer", if the same buffer got reused, and then we just can use the same pixmap<br>
for present.<br>
<br>
I just tried the mpv, if no resizing, there are only 3 textures in turn.<br>
<br>
I think we should avoid this "creating new pixmap frame by frame", what do you think?<br>
<br></blockquote><div>I agree this needs to be avoided.</div><div><br></div><div><span style="font-size:12.8px"> /* In case of a single gpu we need to get the</span></div><div><span style="font-size:12.8px"> * handle and pixmap for the texture that is set</span><br style="font-size:12.8px"><span style="font-size:12.8px"> */</span><br style="font-size:12.8px"><span style="font-size:12.8px"> if (buffer && scrn->output_texture &&</span><br style="font-size:12.8px"><span style="font-size:12.8px"> !scrn->is_different_gpu)</span><br style="font-size:12.8px"><span style="font-size:12.8px"> allocate_new_buffer = true;</span><br></div><div><br></div><div>For this case we can simply check if the texture is present among the available buffers and allocate a new </div><div>buffer in case it is not found, but avoid deleting the current buffer if the no. of buffers is less than a fixed</div><div>value like 3.</div><div><br></div><div>However I will be busy for 2 weeks so it going to take sometime to complete the patch.</div><div><br></div><div>Regards,</div><div>Nayan.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Regards,<br>
Leo<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Regards,<br>
Nayan<br>
</blockquote>
<br>
</blockquote></div><br></div></div>