-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multithreaded rendering / rasterisation #8
Comments
The following is already implemented since at least: 32085e5 ### Queue fetches |
Memory fencingSafeQueues are in place but we use locks to prevent race conditions. Circular buffersSwitching from a Queue to a circular buffer seems like a good idea as it guarantees that there are no reallocations during pop and push. Memory allocations are also unnecessary during runtime. However buffer size is pretty static. Buffer stalls if write pointer just in front of read pointer (=> buffer is full). Other ideasUse of a stack which also eliminates reallocations but constant allocs and deallocs may degrade performance. |
Current statusThreading works pretty much (suspect race condition in VP if VP count > 1 though). See 016ed89 Performance results are bad as expected as currently every triangle fetch from the rasteriser requires a lock. |
Other possible improvementsProfiling is required but VertexProcessorObjs may slow things down as they all have shared contains pointing at one texture. Concurrent reference counting could have a significant influence on performance. |
SafeQueue was rewritten to be the only queue type required. Only issues left are in copying rasteriser textures back to the main thread and rendering them. |
Essentially two sections can be multithreaded: vertex shading and rasterisation (including pixel shading).
Listed below there a few multithreading concept proposals:
Vertex shader:
Rasterisation:
The text was updated successfully, but these errors were encountered: