<div dir="ltr">Hello, Kenneth.<div>Thanks for remarks.</div><div>Will update patch soon and also will try to look on <span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">3DSTATE_SO_BUFFER.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 14, 2018 at 8:39 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sergii,<br>
<br>
This patch causes 2,384 failures in CI. The issue is that we're<br>
apparently trying to allocate 0 size BOs in some places, which are<br>
getting rounded up to 4096 with the current code...but with your patch,<br>
we get ALIGN(0, 4096) == 0, and assert(bo_size) triggers.<br>
<br>
We might want to continue rounding up for now. Additionally, we<br>
probably ought to fix the callers to stop allocating 0 size BOs.<br>
It looks like most of them come from the 3DSTATE_SO_BUFFER code,<br>
where one stream has valid transform feedback info, and the other<br>
3 are empty. Whoops.<br>
<br>
Would you like to fix that, or should I?<br>
<br>
--Ken<br>
<div class="HOEnZb"><div class="h5"><br>
On Tuesday, August 14, 2018 4:28:35 AM PDT Sergii Romantsov wrote:<br>
> Hello,<br>
> seems some part of the World is still may waiting for a possibility to play<br>
> Dying Light... till pushed :)<br>
> <br>
> On Mon, Aug 6, 2018 at 4:26 PM, Lionel Landwerlin <<br>
> <a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a>> wrote:<br>
> <br>
> > On 06/08/18 13:41, Sergii Romantsov wrote:<br>
> ><br>
> >> Kernel (for ppgtt) requires memory address to be<br>
> >> aligned to page size (4096).<br>
> >><br>
> >> -v2: added marking that also fixes initial commit 01058a552294.<br>
> >> -v3: numbers replaced by PAGE_SIZE; buffer-object size is aligned<br>
> >> instead of alignment of offsets (Chris Wilson).<br>
> >> -v4: changes related to PAGE_SIZE moved to separate commit<br>
> >><br>
> >> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=106997" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=106997</a><br>
> >> Fixes: a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT<br>
> >> systems.)<br>
> >> Fixes: 01058a552294 (i965: Add virtual memory allocator infrastructure to<br>
> >> brw_bufmgr.)<br>
> >> Signed-off-by: Sergii Romantsov <<a href="mailto:sergii.romantsov@globallogic.com">sergii.romantsov@globallogic.<wbr>com</a>><br>
> >><br>
> ><br>
> > Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
> ><br>
> > Thanks!<br>
> ><br>
> ><br>
> > ---<br>
> >> src/mesa/drivers/dri/i965/brw_<wbr>bufmgr.c | 7 +++----<br>
> >> 1 file changed, 3 insertions(+), 4 deletions(-)<br>
> >><br>
> >> diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_bufmgr.c<br>
> >> b/src/mesa/drivers/dri/i965/<wbr>brw_bufmgr.c<br>
> >> index 09d45e3..8274c2e 100644<br>
> >> --- a/src/mesa/drivers/dri/i965/<wbr>brw_bufmgr.c<br>
> >> +++ b/src/mesa/drivers/dri/i965/<wbr>brw_bufmgr.c<br>
> >> @@ -496,7 +496,6 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr,<br>
> >> uint32_t stride)<br>
> >> {<br>
> >> struct brw_bo *bo;<br>
> >> - unsigned int page_size = getpagesize();<br>
> >> int ret;<br>
> >> struct bo_cache_bucket *bucket;<br>
> >> bool alloc_from_cache;<br>
> >> @@ -522,12 +521,12 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr,<br>
> >> * allocation up.<br>
> >> */<br>
> >> if (bucket == NULL) {<br>
> >> - bo_size = size;<br>
> >> - if (bo_size < page_size)<br>
> >> - bo_size = page_size;<br>
> >> + unsigned int page_size = getpagesize();<br>
> >> + bo_size = ALIGN(size, page_size);<br>
> >> } else {<br>
> >> bo_size = bucket->size;<br>
> >> }<br>
> >> + assert(bo_size);<br>
> >> mtx_lock(&bufmgr->lock);<br>
> >> /* Get a buffer out of the cache if available */<br>
> >><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > mesa-dev mailing list<br>
> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
> ><br>
> <br>
> <br>
> <br>
> <br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Sergii Romantsov<br></div><div dir="ltr"><div style="margin:0px;padding:0px;color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">GlobalLogic Inc.<br><a href="http://www.globallogic.com/" rel="nofollow" style="color:rgb(0,82,204)" target="_blank">www.globallogic.com</a><br></div></div></div></div></div></div>
</div>