mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-04 04:03:52 +00:00
fix: VkTexture move/destroy ownsSampler_ flag, extract finalizeSampler
- Fix move constructor and move assignment: set other.ownsSampler_ to false after transfer (was incorrectly set to true, leaving moved-from object claiming ownership of a null sampler) - Fix destroy(): reset ownsSampler_ to false after clearing sampler handle (was set to true, inconsistent with null handle state) - Extract finalizeSampler() from 3 duplicated cache-or-create blocks in createSampler() overloads and createShadowSampler() (-24 lines) - Add SPIR-V alignment why-comment in vk_shader.cpp
This commit is contained in:
parent
28e5cd9281
commit
683e171fd1
3 changed files with 27 additions and 51 deletions
|
|
@ -68,6 +68,8 @@ public:
|
|||
|
||||
private:
|
||||
void generateMipmaps(VkContext& ctx, VkFormat format, uint32_t width, uint32_t height);
|
||||
// Shared sampler finalization: prefer the global cache, fall back to direct creation
|
||||
bool finalizeSampler(VkDevice device, const VkSamplerCreateInfo& samplerInfo);
|
||||
|
||||
AllocatedImage image_{};
|
||||
VkSampler sampler_ = VK_NULL_HANDLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue