[Piglit] [PATCH 0/7] New preemption test.

Rafael Antognolli rafael.antognolli at intel.com
Tue Oct 9 17:49:23 UTC 2018


On Tue, Oct 09, 2018 at 12:59:00PM +0300, Tapani Pälli wrote:
> Hi Rafael;
> 
> This looks very much along the lines of what thoughts I had when writing
> this test:
> 
> https://patchwork.freedesktop.org/patch/156779/

Oh, I think I missed that, otherwise I would definitely used it as a
starting point.

> I think I may have somewhere a GL_TIMESTAMP version attempt about that one
> :) but your test looks much more complete, thanks for doing this!

No problem :)

>From the description of your series, it looks like the tests would
compare how much time was given to each of the contexts, which might
still be a good thing to do too (my test doesn't do any of that). So it
might still be good to get it merged.

Is there any reason why it never landed?

And thanks a lot for the review!

> 
> On 10/4/18 6:35 PM, Rafael Antognolli wrote:
> > This series attempts to test that we get a fine grained preemption
> > level when using the EGL_IMG_context_priority extension. Particularly,
> > if the context priority is set to high in a given context, it should
> > preempt lower priority contexts if they are still executing when the
> > higher priority one is dispatch.
> > 
> > This test attemps to confirm that some preemption actually happened. It
> > does so by first starting a draw call that is supposed to take a long
> > time to finish, due to the size of the render buffer and instanced
> > rendering with a high number of instances. Then it starts a new thread
> > and creates a new, high priority context. This context then dispatch a
> > bunch of draw calls, and expects that the first one to start after the
> > main draw call (using GL_TIMESTAMP for that) should still finish before
> > that one too.
> > 
> > However, checking through the GL_TIMESTAMP is not always guaranteed, and
> > sometimes we get reports that the first high priority draw that started
> > after the medium priority one also finished earlier, even if preemption
> > is not supported. For that, we check the second high priority draw that
> > started after the main one, which apparently will not report finished
> > before the medium priority one.
> > 
> > Even though the method reported above might not be ideal for testing
> > preemption, hopefully this test provides a framework that can be tweaked
> > to test things correctly at some point.
> > 
> > Cc: Kenneth Graunke <kenneth at whitecape.org>
> > 
> > Rafael Antognolli (7):
> >    tests: Add base test for mid-command preemption.
> >    egl-context-preemption: Add check for high priority contexts.
> >    egl-context-preemption: Add a high priority thread/context.
> >    egl-context-preemption: check that preemption actually happened.
> >    egl-context-preemption: Add a subtest to reuse the same display.
> >    egl-context-preemption: Check that the rendering was correct.
> >    tests: Add preemption test to the opengl profile.
> > 
> >   tests/egl/CMakeLists.gl.txt        |   2 +
> >   tests/egl/egl-context-preemption.c | 799 +++++++++++++++++++++++++++++
> >   tests/opengl.py                    |   2 +
> >   3 files changed, 803 insertions(+)
> >   create mode 100644 tests/egl/egl-context-preemption.c
> > 


More information about the Piglit mailing list