<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 02.09.2016 um 16:10 schrieb Leo Liu:<br>
</div>
<blockquote cite="mid:57C98845.1050102@amd.com" type="cite">
<br>
<br>
On 09/02/2016 09:50 AM, Christian König wrote:
<br>
<blockquote type="cite">Am 02.09.2016 um 15:27 schrieb Leo Liu:
<br>
<blockquote type="cite">
<br>
<br>
On 09/02/2016 02:11 AM, Christian König wrote:
<br>
<blockquote type="cite">Am 02.09.2016 um 04:03 schrieb Michel
Dänzer:
<br>
<blockquote type="cite">On 02/09/16 10:17 AM, Michel Dänzer
wrote:
<br>
<blockquote type="cite">On 02/09/16 12:58 AM, Leo Liu
wrote:
<br>
<blockquote type="cite">On 09/01/2016 11:54 AM, Nayan
Deshmukh wrote:
<br>
<blockquote type="cite">I saw the code in dri3_glx.c
and I could somewhat relate some basic
<br>
code structure to the vl_winsys_dri3.c. But I am new
to this and not aware of the
<br>
terminology that you used about the buffers. Could
you please explain what needs
<br>
to be done in more detail or point me to where I can
read about it.
<br>
</blockquote>
I believe it's from loader_dri3_helper.c with
"is_different_gpu"
<br>
condition true, that will include back buffer and
front buffer case.
<br>
you could try only back buffer case for now.
<br>
</blockquote>
From a high level, PRIME mainly affects presentation,
not so much the
<br>
video decoding / rendering. The important thing is that
the buffer used
<br>
for presentation via the Present extension is linear,
not tiled. I'm not
<br>
sure whether it makes more sense to allocate a separate
linear buffer
<br>
for this purpose, as is done for GLX, or for the vl code
to make the
<br>
corresponding back (or front?) buffer linear in the
first place.
<br>
</blockquote>
A separate linear buffer is probably better, actually,
since it will
<br>
also be pinned to system memory while it's being shared
with another GPU.
<br>
</blockquote>
<br>
Yes, I agree. Nayan should also work on avoiding the extra
copy which currently occur because we can't allocate output
buffers directly in the format needed for presentation.
<br>
<br>
The general idea should be to to check during presentation
if the format in the output surface is displayable directly.
<br>
</blockquote>
<br>
Also we have to consider drawable resized case.
<br>
</blockquote>
<br>
Actually we don't. Take a look at the VDPAU spec the output
surface should be send for displaying without considering it's
size.
<br>
<br>
E.g. when the window is 256x256 pixels, but the application
allocated an output surface of 1024x768 we should still send the
whole surface to the X server.
<br>
<br>
It's the job of the application to resize the output surfaces
not the one of the VDPAU state tracker.
<br>
</blockquote>
<br>
I thought this get done by vl compositor from presentation,
scaling up or down from output surface to back buffer based on the
resize.
<br>
</blockquote>
<br>
No, that is incorrect. Take a look at the VDPAU spec:<br>
<br>
<blockquote type="cite">
<p>Applications may choose to allow resizing of the presentation
queue target (which may be e.g. a regular Window when using an
X11-based implementation).</p>
<p><b>clip_width</b> and <b>clip_height</b> may be used to limit
the size of the displayed region of a surface, in order to match
the specific region that was rendered to.</p>
<p>In turn, this allows the application to allocate over-sized
(e.g. screen-sized) surfaces, but render to a region that
matches the current size of the video window.</p>
<p>Using this technique, an application's response to window
resizing may simply be to render to, and display, a different
region of the surface, rather than de-/re-allocation of surfaces
to match the updated window size.</p>
</blockquote>
<br>
This means that we should send the original output surface size to
X, no matter what size it has or what size the window has it is
displayed in.<br>
<br>
That wasn't possible with DRI2, that's why we have that workaround
with the delayed rendering in the mixer.<br>
<br>
But no worry it's only a minor issue and a good task for Nayan to
get deeper into the graphics stack.<br>
<br>
Regards,<br>
Christian.<br>
<br>
<blockquote cite="mid:57C98845.1050102@amd.com" type="cite">
<br>
Regards,
<br>
Leo
<br>
<br>
<blockquote type="cite">
<br>
Regards,
<br>
Christian.
<br>
<br>
<blockquote type="cite">
<br>
Regards,
<br>
Leo
<br>
<br>
<blockquote type="cite">If that is the case then handle of
that surface should be send directly to X.
<br>
If that isn't the case we reallocate the backing buffer,
copy the content of the output surface into it and then send
the new handle to X.
<br>
<br>
Regards,
<br>
Christian.
<br>
</blockquote>
<br>
_______________________________________________
<br>
mesa-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote>
<p><br>
</p>
</body>
</html>