In the game the text display is missing random characters, seems to be in blocks (ie you have runs of missing characters and runs of ones that actually show) bisection says it was introduced in this commit: b4cbd2b312d53a50603e2cda925711bc9def4517 is the first bad commit commit b4cbd2b312d53a50603e2cda925711bc9def4517 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Feb 22 11:19:32 2011 +0000 i965: Reinstate max-index paranoia Don't trust the applications not to reference beyond the end of the vertex buffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> :040000 040000 32271cda06fefdecdfd9df2a9938cd0582291e42 1b50b3eb11b7330dba025e97575488b755cebcf2 M src
Created attachment 44289 [details] Screenshot showing problem Added a screenshot showing the problem. Also noticed it actually flickers sometimes showing all the text.
Hmm, does this help? diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index e96c32a..da61e09 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -575,7 +575,7 @@ static void brw_emit_vertices(struct brw_context *brw) if (intel->gen >= 5) { OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->bo->size - 1); } else - OUT_BATCH(buffer->bo->size / buffer->stride); + OUT_BATCH((buffer->bo->size - buffer->offset) / buffer->stride); OUT_BATCH(0); /* Instance data step rate */ brw->vb.current_buffers[i].handle = buffer->bo->handle;
(In reply to comment #2) > Hmm, does this help? > > diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c > b/src/mesa/drivers/dri/i965/brw_draw_upload.c > index e96c32a..da61e09 100644 > --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c > +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c > @@ -575,7 +575,7 @@ static void brw_emit_vertices(struct brw_context *brw) > if (intel->gen >= 5) { > OUT_RELOC(buffer->bo, I915_GEM_DOMAIN_VERTEX, 0, buffer->bo->size - > 1); > } else > - OUT_BATCH(buffer->bo->size / buffer->stride); > + OUT_BATCH((buffer->bo->size - buffer->offset) / buffer->stride); > OUT_BATCH(0); /* Instance data step rate */ > > brw->vb.current_buffers[i].handle = buffer->bo->handle; Nope
And you verified that reverting b4cbd2b312d is sufficient?
(In reply to comment #4) > And you verified that reverting b4cbd2b312d is sufficient? Yes, sorry it took so long to respond, I missed the email.
Still in mesa master, and reverting b4cbd2b312d is still sufficient to fix it.
No worries, many thanks for testing! I just didn't want to push the revert without being sure that I had not caused further breakage. commit f703ba8c42e924ee6d5e4308c3888e434d8ba98c Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Apr 12 19:13:22 2011 +0100 Revert "i965: Reinstate max-index paranoia" This reverts commit b4cbd2b312d53a50603e2cda925711bc9def4517. It looked like a safe sanity check. It missed the issue of the start of the buffer not being at 0, but even that was not enough to explain why setting the max vertex index caused glyphs to be dropped from the game 'Achron'. Instead, the issue appears to be related to the use of the vertex bias and so we would need to re-emit the max-index every time we adjusted the bias, so re-emitting the relocations and defeating the original optimisation. Reported-and-tested-by: Thomas Jones <thomas.jones@utoronto.ca> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35163 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.