The library requires samplerAnisotropy for SamplerVulkan, which nothing uses any more #168
Labels
No labels
claude:blocked
claude:done
claude:failed
claude:in-progress
claude:ready
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Graphics#168
Loading…
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?
Summary
Device::InitializeputssamplerAnisotropyamong the library's own requirements because "SamplerVulkan turns anisotropic filtering on" (implementations/Crafter.Graphics-Device.cpp:977-978). Since6e94cc6replaced Sponza's sampler, nothing in the library, the tests or the examples usesSamplerVulkan, so the library requires a feature for a class that is only exported (interfaces/Crafter.Graphics.cppm:34). Few GPUs lack the feature, so this is mostly dead code and a needless requirement. Line numbers refer to670df31.Details
interfaces/Crafter.Graphics-SamplerVulkan.cppm:17-46: a template on a pixel type it does not use. Its constructor makes a linear, repeating sampler withanisotropyEnable = VK_TRUEandmaxAnisotropy = 16(:30-31), not clamped to the device'smaxSamplerAnisotropy.VkSampleris never released; the other handle owners release theirs throughDevice::EnqueueDeletion.maxAnisotropy = 1(implementations/Crafter.Graphics-UI.cpp:455,tests/UIFallbackParity/main.cpp:125).Suggested fix
Remove
SamplerVulkanand the requirement. Or keep the class, give it deferred deletion and the clamp, and move anisotropy to the features an application asks for, with the class falling back to no anisotropy where it is off.