Reuse allocated descriptor sets (#3002)

This commit is contained in:
Adrian Cojocaru
2024-11-12 22:19:20 +02:00
committed by GitHub
parent c613731e3d
commit b30397005c
11 changed files with 128 additions and 22 deletions

View File

@@ -50,6 +50,11 @@ Texture2D::~Texture2D() {
}
gfx::Texture2D& Texture2D::setSamplerConfiguration(const SamplerState& samplerState_) noexcept {
if (samplerState.filter == samplerState_.filter && samplerState.wrapU == samplerState_.wrapU &&
samplerState.wrapV == samplerState_.wrapV) {
return *this;
}
samplerState = samplerState_;
samplerStateDirty = true;
return *this;