kernel_astc_ispc_sse2.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. //
  2. // C:\Esenthel\ThirdPartyLibs\BC7\ispc_texcomp\kernel_astc_ispc_sse2.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_ASTC_ISPC_SSE2_H
  7. #define ISPC_C__ESENTHEL_THIRDPARTYLIBS_BC7_ISPC_TEXCOMP_KERNEL_ASTC_ISPC_SSE2_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_astc_enc_context__
  33. #define __ISPC_STRUCT_astc_enc_context__
  34. struct astc_enc_context {
  35. int32_t width;
  36. int32_t height;
  37. int32_t channels;
  38. bool dual_plane;
  39. int32_t partitions;
  40. int32_t color_endpoint_pairs;
  41. };
  42. #endif
  43. #ifndef __ISPC_STRUCT_astc_enc_settings__
  44. #define __ISPC_STRUCT_astc_enc_settings__
  45. struct astc_enc_settings {
  46. int32_t block_width;
  47. int32_t block_height;
  48. int32_t channels;
  49. int32_t fastSkipTreshold;
  50. int32_t refineIterations;
  51. };
  52. #endif
  53. #ifndef __ISPC_STRUCT_astc_block__
  54. #define __ISPC_STRUCT_astc_block__
  55. struct astc_block {
  56. int32_t width;
  57. int32_t height;
  58. bool dual_plane;
  59. int32_t weight_range;
  60. uint8_t weights[64];
  61. int32_t color_component_selector;
  62. int32_t partitions;
  63. int32_t partition_id;
  64. int32_t color_endpoint_pairs;
  65. int32_t channels;
  66. int32_t color_endpoint_modes[4];
  67. int32_t endpoint_range;
  68. uint8_t endpoints[18];
  69. };
  70. #endif
  71. ///////////////////////////////////////////////////////////////////////////
  72. // Functions exported from ispc code
  73. ///////////////////////////////////////////////////////////////////////////
  74. #if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
  75. extern "C" {
  76. #endif // __cplusplus
  77. extern void astc_encode_ispc(struct rgba_surface * src, float * block_scores, uint8_t * dst, uint64_t * list, struct astc_enc_context * list_context, struct astc_enc_settings * settings);
  78. extern void astc_rank_ispc(struct rgba_surface * src, int32_t xx, int32_t yy, uint32_t * mode_buffer, struct astc_enc_settings * settings);
  79. extern int32_t get_programCount();
  80. #if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
  81. } /* end extern C */
  82. #endif // __cplusplus
  83. #ifdef __cplusplus
  84. } /* namespace */
  85. #endif // __cplusplus
  86. #endif // ISPC_C__ESENTHEL_THIRDPARTYLIBS_BC7_ISPC_TEXCOMP_KERNEL_ASTC_ISPC_SSE2_H