shader_info.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <array>
  6. #include "common/common_types.h"
  7. #include <boost/container/static_vector.hpp>
  8. namespace Shader {
  9. struct Info {
  10. static constexpr size_t MAX_CBUFS{18};
  11. static constexpr size_t MAX_SSBOS{16};
  12. struct ConstantBufferDescriptor {
  13. u32 index;
  14. u32 count;
  15. };
  16. struct StorageBufferDescriptor {
  17. u32 cbuf_index;
  18. u32 cbuf_offset;
  19. u32 count;
  20. };
  21. bool uses_workgroup_id{};
  22. bool uses_local_invocation_id{};
  23. bool uses_fp16{};
  24. bool uses_fp64{};
  25. u32 constant_buffer_mask{};
  26. std::array<ConstantBufferDescriptor*, MAX_CBUFS> constant_buffers{};
  27. boost::container::static_vector<ConstantBufferDescriptor, MAX_CBUFS>
  28. constant_buffer_descriptors;
  29. std::array<StorageBufferDescriptor*, MAX_SSBOS> storage_buffers{};
  30. boost::container::static_vector<StorageBufferDescriptor, MAX_SSBOS> storage_buffers_descriptors;
  31. };
  32. } // namespace Shader