ShaderCompiler.cpp 605 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2009-2020, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <anki/gr/ShaderCompiler.h>
  6. #include <tests/framework/Framework.h>
  7. ANKI_TEST(Gr, ShaderCompiler)
  8. {
  9. HeapAllocator<U8> alloc(allocAligned, nullptr);
  10. ShaderCompilerCache cache(alloc, "./");
  11. const char* SRC = R"(
  12. void main()
  13. {
  14. })";
  15. DynamicArrayAuto<U8> bin(alloc);
  16. ShaderCompilerOptions options;
  17. options.m_outLanguage = ShaderLanguage::SPIRV;
  18. ANKI_TEST_EXPECT_NO_ERR(cache.compile(SRC, nullptr, options, bin));
  19. }