refactor(ui): remove the unused per-member item loaders
LoadImageItem, LoadGlpyhtem, LoadCircleItem and LoadQuadItem in ui-shared.glsl worked around NVIDIA losing the device when a whole struct is loaded from a descriptor-heap storage buffer. No kernel here calls them any more (they read members straight into shared memory), and NVIDIA 615.78.08 no longer has the fault: every UI kernel rewritten to whole-struct loads renders the same frame. Shaders that called them read the item directly instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
37fe0dc49f
commit
f7cfd53562
1 changed files with 0 additions and 43 deletions
|
|
@ -99,49 +99,6 @@ layout(UI_HEAP_BUFFERS, std430) readonly buffer UICircleBuf { CircleItem items[]
|
|||
layout(UI_HEAP_BUFFERS, std430) readonly buffer UIImageBuf { ImageItem items[]; } uiImageHeap[];
|
||||
layout(UI_HEAP_BUFFERS, std430) readonly buffer UIGlyphBuf { GlyphItem items[]; } uiGlyphHeap[];
|
||||
|
||||
|
||||
// ──── Driver workaround: per-member SSBO load ────────────────────────────
|
||||
// `UIItem it = itemHeap[idx].items[i]` emits an OpLoad of a composite type
|
||||
// from a descriptor-heap'd SSBO, which crashes the GPU on the NVIDIA
|
||||
// VK_EXT_descriptor_heap path (verified with a 1-float struct repro).
|
||||
// Reading individual members works (each becomes OpAccessChain + scalar
|
||||
// OpLoad). LoadItem reassembles the struct member-by-member into a local;
|
||||
// the rest of the shader then operates on a regular local var.
|
||||
|
||||
ImageItem LoadImageItem(uint heap, uint i) {
|
||||
ImageItem it;
|
||||
it.rect = uiImageHeap[heap].items[i].rect;
|
||||
it.uv = uiImageHeap[heap].items[i].uv;
|
||||
it.tint = uiImageHeap[heap].items[i].tint;
|
||||
it.slots = uiImageHeap[heap].items[i].slots;
|
||||
return it;
|
||||
}
|
||||
|
||||
GlyphItem LoadGlpyhtem(uint heap, uint i) {
|
||||
GlyphItem it;
|
||||
it.rect = uiGlyphHeap[heap].items[i].rect;
|
||||
it.uv = uiGlyphHeap[heap].items[i].uv;
|
||||
it.color = uiGlyphHeap[heap].items[i].color;
|
||||
return it;
|
||||
}
|
||||
|
||||
CircleItem LoadCircleItem(uint heap, uint i) {
|
||||
CircleItem it;
|
||||
it.centerRadius = uiCircleHeap[heap].items[i].centerRadius;
|
||||
it.color = uiCircleHeap[heap].items[i].color;
|
||||
it.outline = uiCircleHeap[heap].items[i].outline;
|
||||
return it;
|
||||
}
|
||||
|
||||
QuadItem LoadQuadItem(uint heap, uint i) {
|
||||
QuadItem it;
|
||||
it.rect = uiQuadHeap[heap].items[i].rect;
|
||||
it.color = uiQuadHeap[heap].items[i].color;
|
||||
it.corners = uiQuadHeap[heap].items[i].corners;
|
||||
it.outline = uiQuadHeap[heap].items[i].outline;
|
||||
return it;
|
||||
}
|
||||
|
||||
// ─── pixel-tile dispatch model ─────────────────────────────────────────
|
||||
// Standard shaders dispatch one workgroup per 8×8 screen tile. Each thread
|
||||
// owns ONE pixel and iterates ALL items in order, accumulating the result
|
||||
|
|
|
|||
Loading…
Reference in a new issue