Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored the handling of usage flags in the VulkanTexture constructor #8074

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

mdagois
Copy link
Contributor

@mdagois mdagois commented Aug 22, 2024

  • Removed the VK_IMAGE_USAGE_TRANSFER_SRC_BIT and VK_IMAGE_USAGE_TRANSFER_DST_BIT flags that were systematically added to all color and depth attachments.
  • Modified the behavior of TextureUsage::BLIT_SRC, TextureUsage::BLIT_DST, and TextureUsage::UPLOADABLE, so that they only raise the corresponding VkImage usage flags.
  • Note that I shied away from removing VK_IMAGE_USAGE_SAMPLED_BIT from depth texture with more than 1 sample, as I am not familiar enough with the custom shader-based resolve. I believe we could move the flag to where the depth sidecar is created (using TextureUsage::SAMPLEABLE), but I am not sure 100%.

@mdagois
Copy link
Contributor Author

mdagois commented Aug 22, 2024

NOTE: this PR is meant as a preliminary cleanup for the Support for transient attachments.

@poweifeng poweifeng added the internal Issue/PR does not affect clients label Aug 23, 2024
Copy link
Collaborator

@pixelflinger pixelflinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but would like @poweifeng to review as well

@pixelflinger pixelflinger merged commit 777f664 into google:main Aug 28, 2024
8 of 9 checks passed
@mdagois mdagois deleted the blittable branch October 3, 2024 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants