Skip to content

Commit

Permalink
GPUDevice: Typedef auto-recycled texture
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 6, 2024
1 parent 52feb1a commit 9c327af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/util/gpu_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ std::unique_ptr<GPUTexture> GPUDevice::FetchTexture(u32 width, u32 height, u32 l
return ret;
}

std::unique_ptr<GPUTexture, GPUDevice::PooledTextureDeleter>
GPUDevice::AutoRecycleTexture
GPUDevice::FetchAutoRecycleTexture(u32 width, u32 height, u32 layers, u32 levels, u32 samples, GPUTexture::Type type,
GPUTexture::Format format, GPUTexture::Flags flags, const void* data /* = nullptr */,
u32 data_stride /* = 0 */, Error* error /* = nullptr */)
Expand Down
8 changes: 4 additions & 4 deletions src/util/gpu_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ class GPUDevice
{
void operator()(GPUTexture* const tex);
};
using AutoRecycleTexture = std::unique_ptr<GPUTexture, PooledTextureDeleter>;

static constexpr u32 MAX_TEXTURE_SAMPLERS = 8;
static constexpr u32 MIN_TEXEL_BUFFER_ELEMENTS = 4 * 1024 * 512;
Expand Down Expand Up @@ -742,10 +743,9 @@ class GPUDevice
std::unique_ptr<GPUTexture> FetchTexture(u32 width, u32 height, u32 layers, u32 levels, u32 samples,
GPUTexture::Type type, GPUTexture::Format format, GPUTexture::Flags flags,
const void* data = nullptr, u32 data_stride = 0, Error* error = nullptr);
std::unique_ptr<GPUTexture, PooledTextureDeleter>
FetchAutoRecycleTexture(u32 width, u32 height, u32 layers, u32 levels, u32 samples, GPUTexture::Type type,
GPUTexture::Format format, GPUTexture::Flags flags, const void* data = nullptr,
u32 data_stride = 0, Error* error = nullptr);
AutoRecycleTexture FetchAutoRecycleTexture(u32 width, u32 height, u32 layers, u32 levels, u32 samples,
GPUTexture::Type type, GPUTexture::Format format, GPUTexture::Flags flags,
const void* data = nullptr, u32 data_stride = 0, Error* error = nullptr);
std::unique_ptr<GPUTexture> FetchAndUploadTextureImage(const Image& image,
GPUTexture::Flags flags = GPUTexture::Flags::None,
Error* error = nullptr);
Expand Down

0 comments on commit 9c327af

Please sign in to comment.