kernel_ispc.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //
  2. // C:\Esenthel\ThirdPartyLibs\BC7\ispc_texcomp\kernel_ispc.h
  3. // (Header automatically generated by the ispc compiler.)
  4. // DO NOT EDIT THIS FILE.
  5. //
  6. #ifndef ISPC_C__ESENTHEL_THIRDPARTYLIBS_BC7_ISPC_TEXCOMP_KERNEL_ISPC_H
  7. #define ISPC_C__ESENTHEL_THIRDPARTYLIBS_BC7_ISPC_TEXCOMP_KERNEL_ISPC_H
  8. #include <stdint.h>
  9. #ifdef __cplusplus
  10. namespace ispc { /* namespace */
  11. #endif // __cplusplus
  12. #ifndef __ISPC_ALIGN__
  13. #if defined(__clang__) || !defined(_MSC_VER)
  14. // Clang, GCC, ICC
  15. #define __ISPC_ALIGN__(s) __attribute__((aligned(s)))
  16. #define __ISPC_ALIGNED_STRUCT__(s) struct __ISPC_ALIGN__(s)
  17. #else
  18. // Visual Studio
  19. #define __ISPC_ALIGN__(s) __declspec(align(s))
  20. #define __ISPC_ALIGNED_STRUCT__(s) __ISPC_ALIGN__(s) struct
  21. #endif
  22. #endif
  23. #ifndef __ISPC_STRUCT_rgba_surface__
  24. #define __ISPC_STRUCT_rgba_surface__
  25. struct rgba_surface {
  26. uint8_t * ptr;
  27. int32_t width;
  28. int32_t height;
  29. int32_t stride;
  30. };
  31. #endif
  32. #ifndef __ISPC_STRUCT_bc6h_enc_settings__
  33. #define __ISPC_STRUCT_bc6h_enc_settings__
  34. struct bc6h_enc_settings {
  35. bool slow_mode;
  36. bool fast_mode;
  37. int32_t refineIterations_1p;
  38. int32_t refineIterations_2p;
  39. int32_t fastSkipTreshold;
  40. };
  41. #endif
  42. #ifndef __ISPC_STRUCT_bc7_enc_settings__
  43. #define __ISPC_STRUCT_bc7_enc_settings__
  44. struct bc7_enc_settings {
  45. bool mode_selection[4];
  46. int32_t refineIterations[8];
  47. bool skip_mode2;
  48. int32_t fastSkipTreshold_mode1;
  49. int32_t fastSkipTreshold_mode3;
  50. int32_t fastSkipTreshold_mode7;
  51. int32_t mode45_channel0;
  52. int32_t refineIterations_channel;
  53. int32_t channels;
  54. };
  55. #endif
  56. #ifndef __ISPC_STRUCT_etc_enc_settings__
  57. #define __ISPC_STRUCT_etc_enc_settings__
  58. struct etc_enc_settings {
  59. int32_t fastSkipTreshold;
  60. };
  61. #endif
  62. ///////////////////////////////////////////////////////////////////////////
  63. // Functions exported from ispc code
  64. ///////////////////////////////////////////////////////////////////////////
  65. #if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
  66. extern "C" {
  67. #endif // __cplusplus
  68. extern void CompressBlocksBC1_ispc(struct rgba_surface * src, uint8_t * dst);
  69. extern void CompressBlocksBC3_ispc(struct rgba_surface * src, uint8_t * dst);
  70. extern void CompressBlocksBC6H_ispc(struct rgba_surface * src, uint8_t * dst, struct bc6h_enc_settings * settings);
  71. extern void CompressBlocksBC7_ispc(struct rgba_surface * src, uint8_t * dst, struct bc7_enc_settings * settings);
  72. extern void CompressBlocksETC1_ispc(struct rgba_surface * src, uint8_t * dst, struct etc_enc_settings * settings);
  73. #if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
  74. } /* end extern C */
  75. #endif // __cplusplus
  76. #ifndef __ISPC_ALIGN__
  77. #if defined(__clang__) || !defined(_MSC_VER)
  78. // Clang, GCC, ICC
  79. #define __ISPC_ALIGN__(s) __attribute__((aligned(s)))
  80. #define __ISPC_ALIGNED_STRUCT__(s) struct __ISPC_ALIGN__(s)
  81. #else
  82. // Visual Studio
  83. #define __ISPC_ALIGN__(s) __declspec(align(s))
  84. #define __ISPC_ALIGNED_STRUCT__(s) __ISPC_ALIGN__(s) struct
  85. #endif
  86. #endif
  87. #ifdef __cplusplus
  88. } /* namespace */
  89. #endif // __cplusplus
  90. #endif // ISPC_C__ESENTHEL_THIRDPARTYLIBS_BC7_ISPC_TEXCOMP_KERNEL_ISPC_H