ImageScopeAttachmentDescriptor.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/RHI.Reflect/ImageScopeAttachmentDescriptor.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. namespace AZ::RHI
  11. {
  12. void ImageScopeAttachmentDescriptor::Reflect(AZ::ReflectContext* context)
  13. {
  14. if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
  15. {
  16. serializeContext->Class<ImageScopeAttachmentDescriptor, ScopeAttachmentDescriptor>()
  17. ->Version(3)
  18. ->Field("ImageViewDescriptor", &ImageScopeAttachmentDescriptor::m_imageViewDescriptor)
  19. ;
  20. }
  21. }
  22. ImageScopeAttachmentDescriptor::ImageScopeAttachmentDescriptor(
  23. const AttachmentId& attachmentId,
  24. const ImageViewDescriptor& imageViewDescriptor,
  25. const AttachmentLoadStoreAction& imageScopeLoadStoreAction)
  26. : ScopeAttachmentDescriptor(attachmentId, imageScopeLoadStoreAction)
  27. , m_imageViewDescriptor{ imageViewDescriptor }
  28. {}
  29. const ImageViewDescriptor& ImageScopeAttachmentDescriptor::GetViewDescriptor() const
  30. {
  31. return m_imageViewDescriptor;
  32. }
  33. }