On Tuesday, August 25, 2020 10:26 PM, Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx> wrote: > > I don't think we can do this in a system-agnostic way. What I'd like to > > see is an API for the kernel to expose opaque constraints for each > > Please, take into consideration that constraints can also come from > userspace. These days, there exist things we may want to do using the > CPU, but the SIMD instructions and the associated algorithm will > introduce constraints too. If these constraints comes too opaque, but > you will also potentially limit some valid CPU interaction with HW in > term of buffer access. CPU constraints todays are fairly small and one > should be able to express them I believe. Of course, these are not > media agnostic, some constraints may depends on the media (like an > image buffer, a matrix buffer or audio buffer) and the associated > algorithm to be used. > > An example would be an image buffers produced or modified on CPU but > encoded with HW. Actually, in the proposal we're working on, constraints may come from user-space too. Rendering APIs (ie. mesa) will need to expose constraints for buffers they can render on or texture from. Constraints would be opaque for users like compositors (ie. programs that merely pass constraints around and merge them don't need to understand them), but not for user-space drivers.