Skip to content

Commit

Permalink
Remove the boolean to select transient
Browse files Browse the repository at this point in the history
  • Loading branch information
mdagois committed Sep 5, 2024
1 parent f280b89 commit 13bbf9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions filament/backend/src/vulkan/VulkanHandles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ VulkanRenderTarget::VulkanRenderTarget(VkDevice device, VkPhysicalDevice physica
msTexture = new VulkanTexture(device, physicalDevice, context, allocator, commands,
texture->target, ((VulkanTexture const*) texture)->levels, texture->format,
samples, texture->width, texture->height, texture->depth, usage,
stagePool, true /* heap allocated */, {} /* swizzle */,
true /* preferTransientAttachment */);
stagePool, true /* heap allocated */);
texture->setSidecar(msTexture);
}
mMsaaAttachments[index] = {.texture = msTexture};
Expand Down
4 changes: 1 addition & 3 deletions filament/backend/src/vulkan/VulkanTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ VulkanTexture::VulkanTexture(VkDevice device, VkPhysicalDevice physicalDevice,
VulkanContext const& context, VmaAllocator allocator, VulkanCommands* commands,
SamplerType target, uint8_t levels, TextureFormat tformat, uint8_t samples, uint32_t w,
uint32_t h, uint32_t depth, TextureUsage tusage, VulkanStagePool& stagePool,
bool heapAllocated, VkComponentMapping swizzle, bool preferTransientAttachment)
bool heapAllocated, VkComponentMapping swizzle)
: HwTexture(target, levels, samples, w, h, depth, tformat, tusage),
VulkanResource(
heapAllocated ? VulkanResourceType::HEAP_ALLOCATED : VulkanResourceType::TEXTURE),
Expand Down Expand Up @@ -106,8 +106,6 @@ VulkanTexture::VulkanTexture(VkDevice device, VkPhysicalDevice physicalDevice,

// Determine if we can use the transient usage flag combined with lazily allocated memory.
const bool useTransientAttachment =
// Transient attachment is requested.
preferTransientAttachment &&
// Lazily allocated memory is available.
context.isLazilyAllocatedMemorySupported() &&
// Usage consists of attachment flags only.
Expand Down
2 changes: 1 addition & 1 deletion filament/backend/src/vulkan/VulkanTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct VulkanTexture : public HwTexture, VulkanResource {
VmaAllocator allocator, VulkanCommands* commands, SamplerType target, uint8_t levels,
TextureFormat tformat, uint8_t samples, uint32_t w, uint32_t h, uint32_t depth,
TextureUsage tusage, VulkanStagePool& stagePool, bool heapAllocated = false,
VkComponentMapping swizzle = {}, bool preferTransientAttachment = false);
VkComponentMapping swizzle = {});

// Specialized constructor for internally created textures (e.g. from a swap chain)
// The texture will never destroy the given VkImage, but it does manages its subresources.
Expand Down

0 comments on commit 13bbf9a

Please sign in to comment.