Image.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #pragma once
  9. #include <Atom/RHI/DeviceImagePool.h>
  10. #include <Atom/RHI/DeviceImageView.h>
  11. #include <AzCore/Memory/SystemAllocator.h>
  12. namespace UnitTest
  13. {
  14. class ImageView
  15. : public AZ::RHI::DeviceImageView
  16. {
  17. public:
  18. AZ_CLASS_ALLOCATOR(ImageView, AZ::SystemAllocator);
  19. private:
  20. AZ::RHI::ResultCode InitInternal(AZ::RHI::Device&, const AZ::RHI::DeviceResource&) override;
  21. AZ::RHI::ResultCode InvalidateInternal() override;
  22. void ShutdownInternal() override;
  23. };
  24. class Image
  25. : public AZ::RHI::DeviceImage
  26. {
  27. public:
  28. AZ_CLASS_ALLOCATOR(Image, AZ::SystemAllocator);
  29. private:
  30. void GetSubresourceLayoutsInternal(const AZ::RHI::ImageSubresourceRange&, AZ::RHI::DeviceImageSubresourceLayout*, size_t*) const override {}
  31. };
  32. class ImagePool
  33. : public AZ::RHI::DeviceImagePool
  34. {
  35. public:
  36. AZ_CLASS_ALLOCATOR(ImagePool, AZ::SystemAllocator);
  37. private:
  38. AZ::RHI::ResultCode InitInternal(AZ::RHI::Device&, const AZ::RHI::ImagePoolDescriptor&) override;
  39. void ShutdownInternal() override;
  40. AZ::RHI::ResultCode InitImageInternal(const AZ::RHI::DeviceImageInitRequest& request) override;
  41. AZ::RHI::ResultCode UpdateImageContentsInternal(const AZ::RHI::DeviceImageUpdateRequest&) override { return AZ::RHI::ResultCode::Success; }
  42. void ShutdownResourceInternal(AZ::RHI::DeviceResource& image) override;
  43. };
  44. }