Skip to content

zink: compute shaders

Mike Blumenkrantz requested to merge zmike/mesa:zink-compute into master

This is the initial implementation for compute shaders, and it's very rough around the edges due to the current infrastructure as it relates to batch/queue usage.

Some notes:

  • there are no supported queries for compute shaders in this implementation (as per 4.3 spec), so no changes have been made there
  • shader keys and pipeline caching have been implemented for compute even though they are not (yet) used, but they will be in the future, so it makes sense to just have them in the base implementation for ease of reading and testing of the mechanisms
  • the structs for gfx and compute programs are separate now for ease of reading (and because they're different), and this will remain the case for a while longer until some further refactoring starts to be merged
  • compute batch is implemented separately with some primitive handling for a separate queue, and it is not feasible at this time to implement it in another way due to the significant bottlenecking that the fixed-size gfx batch array generates when all batches are in use

Overall, the point of this series should be viewed as providing a basic implementation of compute shaders along with the required infrastructure for it, but, as with many of my recent patches, I expect that I will (very) soon be putting up further patches to more or less completely rewrite this handling, so none of this should be expected to ship in a release or even be seen by anyone who rebuilds zink on a daily basis. To that end, it would be great if we could try to focus on any obviously wrong parts of the code rather than spending lots of time debating whether I've done various things in an optimal way, because, as stated above, an "optimal" way is currently impossible.

Merge request reports