resource_limits_c.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. BSD 2-Clause License
  3. Copyright (c) 2020, Travis Fort
  4. All rights reserved.
  5. Redistribution and use in source and binary forms, with or without
  6. modification, are permitted provided that the following conditions are met:
  7. 1. Redistributions of source code must retain the above copyright notice, this
  8. list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright notice,
  10. this list of conditions and the following disclaimer in the documentation
  11. and/or other materials provided with the distribution.
  12. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  13. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  14. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  15. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  16. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  17. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  18. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  19. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  21. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. **/
  23. #ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
  24. #define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_
  25. #include "../glslang/Include/glslang_c_interface.h"
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. // These are the default resources for TBuiltInResources, used for both
  30. // - parsing this string for the case where the user didn't supply one,
  31. // - dumping out a template for user construction of a config file.
  32. const glslang_resource_t* glslang_default_resource(void);
  33. // Returns the DefaultTBuiltInResource as a human-readable string.
  34. // NOTE: User is responsible for freeing this string.
  35. const char* glslang_default_resource_string();
  36. // Decodes the resource limits from |config| to |resources|.
  37. void glslang_decode_resource_limits(glslang_resource_t* resources, char* config);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif // _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_