[Piglit] [PATCH] Add test for concurrent shader compiler use. v3

Mathias Fröhlich Mathias.Froehlich at gmx.net
Wed Apr 24 12:08:36 PDT 2013


Hi,

On Wednesday, April 24, 2013 13:09:53 Ken Phillis Jr wrote:
> I think this is a good start, however it does have a few issues I can see.
> 
> 1) Two threads may not be enough to truly find the race conditions. I
> know that an increasing number of systems have 4 or more processor
> cores available and that not all of the cores run at the same speed.
> That said, It may be a good idea to have the thread creation be
> dynamic and set at runtime. I would suggest having the count be either
> equal to the number of cores, or two times the number of cores.
> However, this change may make it to where the iteration count needs to
> be increased to cope with the additional cpu cores.

So, in general you are very right. Feel free to extend this may be even to an 
infrastructure to make this run with multiple threads.
I am sure you could put this into the basic piglit infrastructure so that you 
can run basically *all* tests also in parallel.

The test itself was initialy more a point test for r600g having problems with 
llvm initialization. The lack of an appropriate infrastructure made me at 
least just do something that reproduces the problem I had with a few lines 
instead of a whole application. This particular problem could be reproduced by 
just setting up the llvm backend in r600g which is triggered by compiling a 
shader.
By not having better tests for this area, better have one partial test than no 
test at all.

> 2)A major problem is that this test does not have any safe guards in
> case features are missing. As the test is currently written, The test
> Implicitly requires either of the following requirements be met:
> Requirement 1: The following extensions be available and enabled:
> GL_ARB_shader_objects, GL_ARB_vertex_shader, and
> GL_ARB_fragment_shader
> Requirement 2: The system is capable of running OpenGL 2.0 ( and GLSL
> 1.10 ), OpenGL 2.1 ( and GLSL 1.20), or OpenGL 3.x ( w/ compatibility
> profile )
I will fix this ASAP.

> 3) While not needing to be tested against in this test, but it would
> be a good idea to also have tests against Geometry Shaders, and
> Tessellation Shaders. These Have been gaining steam in the LLVM pipe
> also so it may be useful to test against these so that race conditions
> can be caught early on.
That would be sensible. Sure.

Greetings

Mathias

-- 
Mathias Fröhlich


More information about the Piglit mailing list