On 11/07/2016 11:31 AM, Nayan Deshmukh wrote:


On Mon, Nov 7, 2016 at 8:31 PM, Leo Liu <leo....@amd.com <mailto:leo....@amd.com>> wrote:



    On 11/05/2016 02:44 AM, Nayan Deshmukh wrote:

        Hi Leo,

        Thanks for the reference patch.

              There are only a number of output surfaces taking turns
        as the
        mixer render targets, so we probably can use the same pixmap
              corresponding to each of output surface texture.

        The mixer renders to a VdpOutputSurface which is provided to
        it by the
        application, so we can't make any assumptions on the surface
        that will
        be provided it may or may not be the same. Instead we could have
        additional fields in vlVdpOutputSurface which stores the
        handle and
        pixamp of the texture.


    What I meant is in vl dri3 to store certain numbers of pixmaps,
    and update them when texture, handle, size
    changed by calling "pixmap_from_buffer", if the same buffer got
    reused, and then we just can use the same pixmap
    for present.

    I just tried the mpv, if no resizing, there are only 3 textures in
    turn.

    I think we should avoid this "creating new pixmap frame by frame",
    what do you think?

I agree this needs to be avoided.

   /* In case of a single gpu we need to get the
    * handle and pixmap for the texture that is set
    */
    if (buffer && scrn->output_texture &&
!scrn->is_different_gpu)
       allocate_new_buffer = true;

For this case we can simply check if the texture is present among the available buffers and allocate a new buffer in case it is not found, but avoid deleting the current buffer if the no. of buffers is less than a fixed
value like 3.

Exactly, and we could have a fixed number as 3 or more.


However I will be busy for 2 weeks so it going to take sometime to complete the patch.

I think that's okay, as an optimization work, it should be no rush, and we like it better.

Thank you for your effort. Appreciated!

Leo


Regards,
Nayan.

    Regards,
    Leo


        Regards,
        Nayan




_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to