intel_tex_2 0.5.0

Rust bindings for Intel's ISPC texture compressor.
Documentation
#[allow(non_camel_case_types,dead_code,non_upper_case_globals,non_snake_case,improper_ctypes)]
pub mod kernel {
/* automatically generated by rust-bindgen 0.71.1 */

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rgba_surface {
    pub ptr: *mut u8,
    pub width: i32,
    pub height: i32,
    pub stride: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of rgba_surface"][::std::mem::size_of::<rgba_surface>() - 24usize];
    ["Alignment of rgba_surface"][::std::mem::align_of::<rgba_surface>() - 8usize];
    ["Offset of field: rgba_surface::ptr"][::std::mem::offset_of!(rgba_surface, ptr) - 0usize];
    ["Offset of field: rgba_surface::width"][::std::mem::offset_of!(rgba_surface, width) - 8usize];
    ["Offset of field: rgba_surface::height"]
        [::std::mem::offset_of!(rgba_surface, height) - 12usize];
    ["Offset of field: rgba_surface::stride"]
        [::std::mem::offset_of!(rgba_surface, stride) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bc6h_enc_settings {
    pub slow_mode: bool,
    pub fast_mode: bool,
    pub refineIterations_1p: i32,
    pub refineIterations_2p: i32,
    pub fastSkipTreshold: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of bc6h_enc_settings"][::std::mem::size_of::<bc6h_enc_settings>() - 16usize];
    ["Alignment of bc6h_enc_settings"][::std::mem::align_of::<bc6h_enc_settings>() - 4usize];
    ["Offset of field: bc6h_enc_settings::slow_mode"]
        [::std::mem::offset_of!(bc6h_enc_settings, slow_mode) - 0usize];
    ["Offset of field: bc6h_enc_settings::fast_mode"]
        [::std::mem::offset_of!(bc6h_enc_settings, fast_mode) - 1usize];
    ["Offset of field: bc6h_enc_settings::refineIterations_1p"]
        [::std::mem::offset_of!(bc6h_enc_settings, refineIterations_1p) - 4usize];
    ["Offset of field: bc6h_enc_settings::refineIterations_2p"]
        [::std::mem::offset_of!(bc6h_enc_settings, refineIterations_2p) - 8usize];
    ["Offset of field: bc6h_enc_settings::fastSkipTreshold"]
        [::std::mem::offset_of!(bc6h_enc_settings, fastSkipTreshold) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bc7_enc_settings {
    pub mode_selection: [bool; 4usize],
    pub refineIterations: [i32; 8usize],
    pub skip_mode2: bool,
    pub fastSkipTreshold_mode1: i32,
    pub fastSkipTreshold_mode3: i32,
    pub fastSkipTreshold_mode7: i32,
    pub mode45_channel0: i32,
    pub refineIterations_channel: i32,
    pub channels: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of bc7_enc_settings"][::std::mem::size_of::<bc7_enc_settings>() - 64usize];
    ["Alignment of bc7_enc_settings"][::std::mem::align_of::<bc7_enc_settings>() - 4usize];
    ["Offset of field: bc7_enc_settings::mode_selection"]
        [::std::mem::offset_of!(bc7_enc_settings, mode_selection) - 0usize];
    ["Offset of field: bc7_enc_settings::refineIterations"]
        [::std::mem::offset_of!(bc7_enc_settings, refineIterations) - 4usize];
    ["Offset of field: bc7_enc_settings::skip_mode2"]
        [::std::mem::offset_of!(bc7_enc_settings, skip_mode2) - 36usize];
    ["Offset of field: bc7_enc_settings::fastSkipTreshold_mode1"]
        [::std::mem::offset_of!(bc7_enc_settings, fastSkipTreshold_mode1) - 40usize];
    ["Offset of field: bc7_enc_settings::fastSkipTreshold_mode3"]
        [::std::mem::offset_of!(bc7_enc_settings, fastSkipTreshold_mode3) - 44usize];
    ["Offset of field: bc7_enc_settings::fastSkipTreshold_mode7"]
        [::std::mem::offset_of!(bc7_enc_settings, fastSkipTreshold_mode7) - 48usize];
    ["Offset of field: bc7_enc_settings::mode45_channel0"]
        [::std::mem::offset_of!(bc7_enc_settings, mode45_channel0) - 52usize];
    ["Offset of field: bc7_enc_settings::refineIterations_channel"]
        [::std::mem::offset_of!(bc7_enc_settings, refineIterations_channel) - 56usize];
    ["Offset of field: bc7_enc_settings::channels"]
        [::std::mem::offset_of!(bc7_enc_settings, channels) - 60usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct etc_enc_settings {
    pub fastSkipTreshold: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of etc_enc_settings"][::std::mem::size_of::<etc_enc_settings>() - 4usize];
    ["Alignment of etc_enc_settings"][::std::mem::align_of::<etc_enc_settings>() - 4usize];
    ["Offset of field: etc_enc_settings::fastSkipTreshold"]
        [::std::mem::offset_of!(etc_enc_settings, fastSkipTreshold) - 0usize];
};
unsafe extern "C" {
    pub fn CompressBlocksBC1_ispc(src: *mut rgba_surface, dst: *mut u8);
}
unsafe extern "C" {
    pub fn CompressBlocksBC3_ispc(src: *mut rgba_surface, dst: *mut u8);
}
unsafe extern "C" {
    pub fn CompressBlocksBC4_ispc(src: *mut rgba_surface, dst: *mut u8);
}
unsafe extern "C" {
    pub fn CompressBlocksBC5_ispc(src: *mut rgba_surface, dst: *mut u8);
}
unsafe extern "C" {
    pub fn CompressBlocksBC6H_ispc(
        src: *mut rgba_surface,
        dst: *mut u8,
        settings: *mut bc6h_enc_settings,
    );
}
unsafe extern "C" {
    pub fn CompressBlocksBC7_ispc(
        src: *mut rgba_surface,
        dst: *mut u8,
        settings: *mut bc7_enc_settings,
    );
}
unsafe extern "C" {
    pub fn CompressBlocksETC1_ispc(
        src: *mut rgba_surface,
        dst: *mut u8,
        settings: *mut etc_enc_settings,
    );
}
}