3
0

ShaderPlatformInterfaceRequest.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <AzCore/EBus/EBus.h>
  10. namespace AssetBuilderSDK
  11. {
  12. struct PlatformInfo;
  13. }
  14. namespace AZ
  15. {
  16. namespace RHI
  17. {
  18. class ShaderPlatformInterface;
  19. }
  20. namespace ShaderBuilder
  21. {
  22. /**
  23. * A request to get the registered shader platform interfaces.
  24. */
  25. class ShaderPlatformInterfaceRequest
  26. : public AZ::EBusTraits
  27. {
  28. public:
  29. virtual ~ShaderPlatformInterfaceRequest() = default;
  30. /**
  31. * Get the list of registered shader platform interfaces for a specific platform.
  32. *
  33. * @param platformInfo The target platform.
  34. */
  35. virtual AZStd::vector<RHI::ShaderPlatformInterface*> GetShaderPlatformInterface(const AssetBuilderSDK::PlatformInfo& platformInfo) = 0;
  36. public:
  37. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  38. };
  39. /// EBus for requesting the ShaderPlatformInterfaces for a platform.
  40. using ShaderPlatformInterfaceRequestBus = AZ::EBus<ShaderPlatformInterfaceRequest>;
  41. }
  42. }