-
Notifications
You must be signed in to change notification settings - Fork 12
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
Can we actually describe everything with positive capabilities and a few set constraints? #5
Comments
I'm going to attempt to list a set of atomic capabilities for us to use on Intel that describe everything we care about. Not all of them will apply to all image formats or dimensions. @chadversary, please check me on this:
I believe that those can be blindly intersected by an application or allocation library. As features get implemented that require additional capabilities, we can always add more. The thing that concerns me is if we suddenly discover a bug that requires some sort of capability negotiation to fix. In that case, I think we can handle it with the metadata versions. |
@jekstrand Take a look at the descriptor set idea in the current header if you haven't yet. I'm curious whether that helps bridge the gap between the larger capability structure you'd initially considered and the smaller capability atoms discussed. |
@cubanismo I must say, calling it a "descriptor set" makes me shudder a bit and think of other similarly named over-complicated solutions to not-that-complicated problems. :-) |
@jekstrand Agreed. And in fact, I censured myself when writing up the header. Currently it's called a "capability set", and I just realized it's missing the list of constraints I intended to include. I'll push a fix shortly. |
Though it took me about 3 long iterations to get the logic for capability intersection to a reasonable place, with the current (untested) intersection logic I've managed to convince myself this assertion holds up for simple RGB surfaces uses most of the painful capability and constraint cases we run into. I think this will get more interesting as we start trying to run things like YUV surfaces on those painful-sounding devices that need things like alternating memory banks for different planes or whatever it was. I was hoping someone with a better understanding of those corner cases could construct a prototype driver that exposes them as capabilities/constraints and run some trivial through them. |
Capbailities
My initial vision for memory allocation was to have independent blocks of capabilities where each block was fairly self-contained but could have complex interactions within it. This has the down-side that the driver has to be involved in the intersection process. The directions that @cubanismo was pushing was to have everything as small atomic capabilities. While this is less expressive, it's much simpler to perform an intersection operation. We need to double-check that everything needed is expressible this way.
Tentatively, we have said that the capabilities will be relative to the surface allocation parameters: width, weight, format, sample count, mip levels, array slices, etc. In other words, you don't have to worry about expressing every possible set of capabilities which could grow very large.
List of common capabilities (update as more common capabilities are found):
Constraints:
Constraints are a bit special because it will take more care to union them properly. We've determined that these constraints will have to be understood by the allocation library (and therefore common) so that they can be combined properly.
List of common constraints (update if more constraints are needed):
The text was updated successfully, but these errors were encountered: