UnifiedAttachmentDescriptor.cpp 925 B

1234567891011121314151617181920212223242526272829303132
  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 <AzCore/Utils/TypeHash.h>
  9. #include <Atom/RHI.Reflect/UnifiedAttachmentDescriptor.h>
  10. namespace AZ::RHI
  11. {
  12. UnifiedAttachmentDescriptor::UnifiedAttachmentDescriptor()
  13. { }
  14. UnifiedAttachmentDescriptor::UnifiedAttachmentDescriptor(const BufferDescriptor& bufferDescriptor)
  15. : m_buffer(bufferDescriptor)
  16. , m_type(AttachmentType::Buffer)
  17. { }
  18. UnifiedAttachmentDescriptor::UnifiedAttachmentDescriptor(const ImageDescriptor& imageDescriptor)
  19. : m_image(imageDescriptor)
  20. , m_type(AttachmentType::Image)
  21. { }
  22. HashValue64 UnifiedAttachmentDescriptor::GetHash(HashValue64 seed /* = 0 */) const
  23. {
  24. return TypeHash64(*this, seed);
  25. }
  26. }