123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- /*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
- #include <Tests/Factory.h>
- #include <Atom/RHI/DeviceDispatchRaysIndirectBuffer.h>
- #include <Atom/RHI/DeviceFence.h>
- #include <Atom/RHI/DeviceRayTracingAccelerationStructure.h>
- #include <Atom/RHI/DeviceRayTracingPipelineState.h>
- #include <Atom/RHI/DeviceRayTracingShaderTable.h>
- #include <Atom/RHI/DeviceRayTracingBufferPools.h>
- #include <Atom/RHI/DeviceStreamingImagePool.h>
- #include <Atom/RHI/DeviceSwapChain.h>
- #include <Tests/Device.h>
- #include <Tests/ShaderResourceGroup.h>
- #include <Tests/PipelineState.h>
- #include <Tests/Query.h>
- #include <Tests/IndirectBuffer.h>
- namespace UnitTest
- {
- using namespace AZ;
- Factory::Factory()
- {
- RHI::Factory::Register(this);
- }
- Factory::~Factory()
- {
- RHI::Factory::Unregister(this);
- RHI::ResourceInvalidateBus::AllowFunctionQueuing(false);
- RHI::ResourceInvalidateBus::ClearQueuedEvents();
- }
- Name Factory::GetName()
- {
- return m_platformName;
- }
- RHI::APIPriority Factory::GetDefaultPriority()
- {
- return RHI::APIMiddlePriority;
- }
- RHI::APIType Factory::GetType()
- {
- return RHI::APIType(m_platformName.GetStringView());
- }
- bool Factory::SupportsXR() const
- {
- return false;
- }
- RHI::PhysicalDeviceList Factory::EnumeratePhysicalDevices()
- {
- return PhysicalDevice::Enumerate();
- }
- RHI::Ptr<RHI::Device> Factory::CreateDevice()
- {
- return aznew Device;
- }
- RHI::Ptr<RHI::DeviceSwapChain> Factory::CreateSwapChain()
- {
- return nullptr;
- }
- RHI::Ptr<RHI::DeviceFence> Factory::CreateFence()
- {
- return nullptr;
- }
- RHI::Ptr<RHI::DeviceBuffer> Factory::CreateBuffer()
- {
- return aznew Buffer;
- }
- RHI::Ptr<RHI::DeviceBufferView> Factory::CreateBufferView()
- {
- return aznew BufferView;
- }
- RHI::Ptr<RHI::DeviceBufferPool> Factory::CreateBufferPool()
- {
- return aznew BufferPool;
- }
- RHI::Ptr<RHI::DeviceImage> Factory::CreateImage()
- {
- return aznew Image;
- }
- RHI::Ptr<RHI::DeviceImageView> Factory::CreateImageView()
- {
- return aznew ImageView;
- }
- RHI::Ptr<RHI::DeviceImagePool> Factory::CreateImagePool()
- {
- return aznew ImagePool;
- }
- RHI::Ptr<RHI::DeviceStreamingImagePool> Factory::CreateStreamingImagePool()
- {
- return nullptr;
- }
- RHI::Ptr<RHI::DeviceShaderResourceGroupPool> Factory::CreateShaderResourceGroupPool()
- {
- return aznew ShaderResourceGroupPool;
- }
- RHI::Ptr<RHI::DeviceShaderResourceGroup> Factory::CreateShaderResourceGroup()
- {
- return aznew ShaderResourceGroup;
- }
- RHI::Ptr<RHI::DevicePipelineLibrary> Factory::CreatePipelineLibrary()
- {
- return aznew PipelineLibrary;
- }
- RHI::Ptr<RHI::DevicePipelineState> Factory::CreatePipelineState()
- {
- return aznew PipelineState;
- }
- RHI::Ptr<RHI::Scope> Factory::CreateScope()
- {
- return aznew Scope;
- }
- RHI::Ptr<RHI::FrameGraphCompiler> Factory::CreateFrameGraphCompiler()
- {
- return aznew FrameGraphCompiler;
- }
- RHI::Ptr<RHI::FrameGraphExecuter> Factory::CreateFrameGraphExecuter()
- {
- return aznew FrameGraphExecuter;
- }
- RHI::Ptr<RHI::DeviceTransientAttachmentPool> Factory::CreateTransientAttachmentPool()
- {
- return aznew TransientAttachmentPool;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceQueryPool> Factory::CreateQueryPool()
- {
- return aznew QueryPool;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceQuery> Factory::CreateQuery()
- {
- return aznew Query;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceIndirectBufferSignature> Factory::CreateIndirectBufferSignature()
- {
- return aznew NiceIndirectBufferSignature;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceIndirectBufferWriter> Factory::CreateIndirectBufferWriter()
- {
- return aznew NiceIndirectBufferWriter;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceRayTracingBufferPools> Factory::CreateRayTracingBufferPools()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceRayTracingBlas> Factory::CreateRayTracingBlas()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceRayTracingTlas> Factory::CreateRayTracingTlas()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceRayTracingPipelineState> Factory::CreateRayTracingPipelineState()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- AZ::RHI::Ptr<AZ::RHI::DeviceRayTracingShaderTable> Factory::CreateRayTracingShaderTable()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- RHI::Ptr<RHI::DeviceDispatchRaysIndirectBuffer> Factory::CreateDispatchRaysIndirectBuffer()
- {
- AZ_Assert(false, "Not implemented");
- return nullptr;
- }
- }
|