- remove tracking translation in VkHardwareTexture
- only reset the descriptors when recreating the samplers
This commit is contained in:
parent
2429eba8f6
commit
bf85ad4b6a
4 changed files with 13 additions and 3 deletions
|
|
@ -74,6 +74,11 @@ void VkHardwareTexture::Reset()
|
|||
mStagingBuffer.reset();
|
||||
}
|
||||
|
||||
void VkHardwareTexture::ResetDescriptors()
|
||||
{
|
||||
mDescriptorSets.clear();
|
||||
}
|
||||
|
||||
VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &state)
|
||||
{
|
||||
FMaterial *mat = state.mMaterial;
|
||||
|
|
@ -92,7 +97,6 @@ VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &s
|
|||
|
||||
DescriptorKey key;
|
||||
key.clampmode = clampmode;
|
||||
key.translation = translation;
|
||||
key.flags = flags;
|
||||
auto &descriptorSet = mDescriptorSets[key];
|
||||
if (!descriptorSet)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ public:
|
|||
~VkHardwareTexture();
|
||||
|
||||
void Reset();
|
||||
void ResetDescriptors();
|
||||
|
||||
VulkanDescriptorSet *GetDescriptorSet(const FMaterialState &state);
|
||||
|
||||
|
|
@ -52,7 +53,6 @@ private:
|
|||
struct DescriptorKey
|
||||
{
|
||||
int clampmode;
|
||||
int translation;
|
||||
int flags;
|
||||
|
||||
bool operator<(const DescriptorKey &other) const { return memcmp(this, &other, sizeof(DescriptorKey)) < 0; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue