ShaderVariantStatisticData.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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/RPI.Reflect/Shader/ShaderOptionGroup.h>
  10. #include <AzCore/RTTI/ReflectContext.h>
  11. #include <AzCore/Asset/AssetCommon.h>
  12. namespace ShaderManagementConsole
  13. {
  14. struct ShaderVariantInfo
  15. {
  16. AZ_TYPE_INFO(ShaderVariantInfo, "{FF831BC7-CEA3-4525-B55E-6204D3B75ADD}");
  17. AZ_CLASS_ALLOCATOR(ShaderVariantInfo, AZ::SystemAllocator);
  18. AZ::RPI::ShaderOptionGroup m_shaderOptionGroup;
  19. int m_count;
  20. };
  21. struct ShaderVariantStatisticData
  22. {
  23. AZ_TYPE_INFO(ShaderVariantStatisticData, "{1A36910A-5FB5-4001-9C4E-FD6238A133E2}");
  24. AZ_CLASS_ALLOCATOR(ShaderVariantStatisticData, AZ::SystemAllocator);
  25. static void Reflect(AZ::ReflectContext* context);
  26. AZStd::map<AZ::RPI::ShaderVariantId, ShaderVariantInfo> m_shaderVariantUsage;
  27. AZStd::unordered_map<AZ::Name, AZStd::unordered_map<AZ::Name, int>> m_shaderOptionUsage;
  28. };
  29. }