<div dir="ltr">Hi Michel,<div><br></div><div>Sorry for the bad patch. I'll fix the coding style in the next patch.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 9:03 AM, Michel Dänzer <span dir="ltr"><<a href="mailto:michel@daenzer.net" target="_blank">michel@daenzer.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/09/16 02:48 AM, Nayan Deshmukh wrote:<br>
> use a linear buffer in case of back buffer<br>
><br>
> Signed-off-by: Nayan Deshmukh <<a href="mailto:nayan26deshmukh@gmail.com">nayan26deshmukh@gmail.com</a>><br>
<br>
</span>[...]<br>
<span class=""><br>
> @@ -226,8 +227,13 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn)<br>
> goto close_fd;<br>
><br>
> memset(&templ, 0, sizeof(templ));<br>
> + if (scrn->is_different_gpu)<br>
> + templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |<br>
> + PIPE_BIND_SCANOUT | PIPE_BIND_SHARED | PIPE_BIND_LINEAR;<br>
> + else<br>
> templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |<br>
> PIPE_BIND_SCANOUT | PIPE_BIND_SHARED;<br>
<br>
</span>The indentation is wrong. Also, it would be better to make it something<br>
like this:<br>
<span class=""><br>
templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW |<br>
PIPE_BIND_SCANOUT | PIPE_BIND_SHARED;<br>
</span> if (scrn->is_different_gpu)<br>
templ.bind |= PIPE_BIND_LINEAR;<br>
<br>
<br>
However, as we discussed before, for various reasons it would probably<br>
be better to create separate linear buffers instead of making all<br>
buffers linear.<br>
<span class=""><br></span></blockquote><div>So should I maintain a single linear buffer and copy the back buffer to it before</div><div>sending it via the present extension? </div><div><br></div><div>For this I need to have a linear buffer field in vl_dri3_buffer, right?</div><div><br></div><div>Regards,</div><div>Nayan.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
> @@ -248,6 +254,7 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn)<br>
> usage);<br>
> buffer_fd = whandle.handle;<br>
> buffer->pitch = whandle.stride;<br>
> +<br>
> xcb_dri3_pixmap_from_buffer(<wbr>scrn->conn,<br>
> (pixmap = xcb_generate_id(scrn->conn)),<br>
> scrn->drawable,<br>
<br>
</span>Please remove this kind of pointless whitespace-only change from patches<br>
before sending them for review.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br>
</font></span></blockquote></div><br></div></div>