Skip to content

Commit

Permalink
GPUDevice: Allow this-frame pooled textures when not uploading data
Browse files Browse the repository at this point in the history
It won't break the render pass.
  • Loading branch information
stenzek committed Jan 1, 2025
1 parent a08acdb commit f51dda3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/gpu_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ std::unique_ptr<GPUTexture> GPUDevice::FetchTexture(u32 width, u32 height, u32 l

TexturePool::iterator it;

if (is_texture && m_features.prefer_unused_textures)
if (is_texture && data && m_features.prefer_unused_textures)
{
// Try to find a texture that wasn't used this frame first.
for (it = m_texture_pool.begin(); it != m_texture_pool.end(); ++it)
Expand Down

0 comments on commit f51dda3

Please # to comment.