Build: Move tool snap grid not drawn on Vulkan #148
Labels
No labels
amd
avatars
bug
builder
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
rendering
rt
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
backspace119/Slipstream#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In build mode, the Move tool's snap grid (the ruled grid shown while dragging with snap) doesn't render on Vulkan. Needs an in-world check to confirm, but the code path can't work.
Why
LLManipTranslate::restoreGL()(llmaniptranslate.cpp~163) returns early under Vulkan, sosGridTexis never created. It built a 512x512 mip chain with raw GL uploads (bindManual+setManualImage), which crashed at world entry, so it was skipped.renderSnapGuidesbinds the grid by raw GL name:bindManual(TT_TEXTURE, getGridTexName()). Under VulkanbindManualis a no-op (a GL name resolves to nothing; see #144 for the same bug in the image upload preview). The grid is drawn untextured or not at all.Fix
LLImageRaw(white RGB, alpha = the grid lines, one image per mip level or let the backend generate mips) and create it withLLViewerTextureManager::getLocalTexture(raw, true)so the Vulkan UI backend can upload it.gGL.getTexUnit(0)->bind(sGridTex)instead ofbindManual(..., getGridTexName()).BF_ZERO, BF_ONE_MINUS_SOURCE_ALPHAfor the behind-objects pass, then alpha) and theGL_GREATERdepth test for the "behind objects" layer work in the VK world-overlay pass.Related: #144 (same
bindManualcause), #29-era builder view parity (#101 Highlight Transparent is done).