WIP: Add GLSL_EXT_structured_descriptor_heap#299
WIP: Add GLSL_EXT_structured_descriptor_heap#299Tobski wants to merge 7 commits intoKhronosGroup:mainfrom
Conversation
|
Note: This is based on the branch in #298. Assuming that's going to be merged soon anyway, I haven't rebased this. |
|
ping - is there anyone assigned to this, we are having massive issues in validation due to the current GLSL limitations |
|
@spencer-lunarg Not necessarily right now, it's something we kind of wanted to have sit for a bit and see if anyone gave feedback on. But I mean LunarG giving feedback that you need it does in fact count so... we might be able to start moving it ahead again. Can you elaborate on what it is you want it for? |
The current GLSL to use untyped pointer is not a joy to use We just ran into yet-another issue yesterday because we are trying to hack everything around alignments from being at the heap starting address... (so basically the lack of |
|
@spencer-lunarg I think the first question is - is there anything in the spec that is unclear, or you would like to see work slightly differently, or that you think is missing? I need to do a pass over the spec before anyone starts implementing this again. If you could do a review pass of some kind to highlight any issues, I can go fix those, then we can see if we can find someone to implement it. |
|
@Tobski went through it again, this extension spec looks good to me... the lack of this extension being available today is my "real issue" |
|
So looking at this (thanks for bringing this up recently @spencer-lunarg ), what I'm currently trying to do: layout(descriptor_heap) uniform UBO {
mat4 projection;
mat4 view;
mat4 model;
} ubo;Doesn't seem to be possible without an extension like this. Above code actually throws an error when compiling with glslang. But e.g. this syntax compile just fine in current GLSL: layout(descriptor_heap) uniform UBO {
mat4 projection;
mat4 view;
mat4 model;
} ubo[2];But outright doesn't work, without any mention as to why. But looking at this extension I think I understand what's going on and feels like the current way of using heaps with untyped pointers is downright useless for uniform buffers. If so, that's prob. the reason I've been having all those issues with the untyped pointer way of accessing descriptor heaps. Would be a real bummer tbh. |
|
@Tobski : Any ETA on this? This has been causing me quite some trouble and it looks like other developers are starting to run into similar issues - not being able to use structured buffers with descriptor heaps. See e.g. KhronosGroup/glslang#4224 With the F2F discussion it would be worthwhile to make this available soon(ish), |
No ETA just yet but it's high on my todo list, it's just unfortunately a long todo list. Lots of Post-F2F follow up actions I need to churn through. In theory I just have to go through and figure out some of the spec details; then we should have someone available to implement, but it'll depend on their availability too. But we do want to get this done. |
|
@SaschaWillems just to check this is what you're actually looking for...
So I'm looking at the syntax above, and I'm guessing that you're trying to access a uniform buffer at offset zero in the heap? In GL_EXT_descriptor_heap we only allowed for arrays, which is why only the second of your examples works. If you want that to work as-is, that should probably be a separate bug against the existing extension. For this extension, expressing that, in the current extension, would be like: layout(heap_offset = 0) resourceheap {
uniform {
mat4 projection;
mat4 view;
mat4 model;
} ubo;
} myHeap;That syntax is unlikely to actually work as-is because of GLSL grammar, so it's probably to be something like: layout(buffer_type) uniform MyUbo {
mat4 projection;
mat4 view;
mat4 model;
};
layout(heap_offset = 0) resourceheap MyHeap {
MyUbo ubo;
} myHeap;Is this actually what you're after? |
Also allow buffer references in sampler heaps
|
Looking at my comment above I wasn't 100% clear. Sorry for that. So what I'm after is this: layout (set = 0, binding = 0) uniform UBO {
mat4 projection;
mat4 view;
mat4 model[2];
} ubo[2];Which is what I'm using in an actual descriptor heap sample that uses descriptor set mappings instead of untyped pointers:. This compiles just fine with the descriptor heap modifier: layout(descriptor_heap) uniform UBO {
mat4 projection;
mat4 view;
mat4 model[2];
} ubo[2];But does not work. |
|
@SaschaWillems if what you're compiling is not working that is a separate issue - that's supposed to work and access two UBOs at the bottom of the heap. This extension is very much separate. Have you got an issue filed against glslang we can look at? If not, could you file one? |
|
I've just realised you mentioned KhronosGroup/glslang#4224 which seems to cover it |
This extension is a work in progress, provided for comment.
#298 provides a basic interface for interacting with descriptor heaps; this extension is intended to enable applications to interact with descriptor heaps in a similar way to uniform buffers, such that descriptor data and POD can be mixed freely within the heaps.