mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
vulkan: use SamplerState::toKey for caching
This commit is contained in:
@@ -152,7 +152,7 @@ bool Texture::loadVolatile()
|
||||
clear();
|
||||
|
||||
createTextureImageView();
|
||||
textureSampler = vgfx->getCachedSampler(samplerState);
|
||||
textureSampler = vgfx->getCachedSampler(samplerState.toKey());
|
||||
|
||||
if (!isPixelFormatDepthStencil(format) && mipmapCount > 1 && getMipmapsMode() != MIPMAPS_NONE)
|
||||
generateMipmaps();
|
||||
@@ -250,7 +250,8 @@ ptrdiff_t Texture::getHandle() const
|
||||
void Texture::setSamplerState(const SamplerState &s)
|
||||
{
|
||||
love::graphics::Texture::setSamplerState(s);
|
||||
textureSampler = vgfx->getCachedSampler(s);
|
||||
|
||||
textureSampler = vgfx->getCachedSampler(s.toKey());
|
||||
}
|
||||
|
||||
VkImageLayout Texture::getImageLayout() const
|
||||
|
||||
Reference in New Issue
Block a user