diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/rust/glslopt/src/bindings.rs | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/glslopt/src/bindings.rs')
-rw-r--r-- | third_party/rust/glslopt/src/bindings.rs | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/third_party/rust/glslopt/src/bindings.rs b/third_party/rust/glslopt/src/bindings.rs new file mode 100644 index 0000000000..f4e5bebd08 --- /dev/null +++ b/third_party/rust/glslopt/src/bindings.rs @@ -0,0 +1,135 @@ +/* automatically generated by rust-bindgen */ + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct glslopt_shader { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct glslopt_ctx { + _unused: [u8; 0], +} +pub const glslopt_shader_type_kGlslOptShaderVertex: glslopt_shader_type = 0; +pub const glslopt_shader_type_kGlslOptShaderFragment: glslopt_shader_type = 1; +pub type glslopt_shader_type = u32; +pub const glslopt_options_kGlslOptionSkipPreprocessor: glslopt_options = 1; +pub const glslopt_options_kGlslOptionNotFullShader: glslopt_options = 2; +pub type glslopt_options = u32; +pub const glslopt_target_kGlslTargetOpenGL: glslopt_target = 0; +pub const glslopt_target_kGlslTargetOpenGLES20: glslopt_target = 1; +pub const glslopt_target_kGlslTargetOpenGLES30: glslopt_target = 2; +pub const glslopt_target_kGlslTargetMetal: glslopt_target = 3; +pub type glslopt_target = u32; +pub const glslopt_basic_type_kGlslTypeFloat: glslopt_basic_type = 0; +pub const glslopt_basic_type_kGlslTypeInt: glslopt_basic_type = 1; +pub const glslopt_basic_type_kGlslTypeBool: glslopt_basic_type = 2; +pub const glslopt_basic_type_kGlslTypeTex2D: glslopt_basic_type = 3; +pub const glslopt_basic_type_kGlslTypeTex3D: glslopt_basic_type = 4; +pub const glslopt_basic_type_kGlslTypeTexCube: glslopt_basic_type = 5; +pub const glslopt_basic_type_kGlslTypeTex2DShadow: glslopt_basic_type = 6; +pub const glslopt_basic_type_kGlslTypeTex2DArray: glslopt_basic_type = 7; +pub const glslopt_basic_type_kGlslTypeOther: glslopt_basic_type = 8; +pub const glslopt_basic_type_kGlslTypeCount: glslopt_basic_type = 9; +pub type glslopt_basic_type = u32; +pub const glslopt_precision_kGlslPrecHigh: glslopt_precision = 0; +pub const glslopt_precision_kGlslPrecMedium: glslopt_precision = 1; +pub const glslopt_precision_kGlslPrecLow: glslopt_precision = 2; +pub const glslopt_precision_kGlslPrecCount: glslopt_precision = 3; +pub type glslopt_precision = u32; +extern "C" { + pub fn glslopt_initialize(target: glslopt_target) -> *mut glslopt_ctx; +} +extern "C" { + pub fn glslopt_cleanup(ctx: *mut glslopt_ctx); +} +extern "C" { + pub fn glslopt_set_max_unroll_iterations( + ctx: *mut glslopt_ctx, + iterations: ::std::os::raw::c_uint, + ); +} +extern "C" { + pub fn glslopt_optimize( + ctx: *mut glslopt_ctx, + type_: glslopt_shader_type, + shaderSource: *const ::std::os::raw::c_char, + options: ::std::os::raw::c_uint, + ) -> *mut glslopt_shader; +} +extern "C" { + pub fn glslopt_get_status(shader: *mut glslopt_shader) -> bool; +} +extern "C" { + pub fn glslopt_get_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn glslopt_get_raw_output(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn glslopt_get_log(shader: *mut glslopt_shader) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn glslopt_shader_delete(shader: *mut glslopt_shader); +} +extern "C" { + pub fn glslopt_shader_get_input_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn glslopt_shader_get_input_desc( + shader: *mut glslopt_shader, + index: ::std::os::raw::c_int, + outName: *mut *const ::std::os::raw::c_char, + outType: *mut glslopt_basic_type, + outPrec: *mut glslopt_precision, + outVecSize: *mut ::std::os::raw::c_int, + outMatSize: *mut ::std::os::raw::c_int, + outArraySize: *mut ::std::os::raw::c_int, + outLocation: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn glslopt_shader_get_uniform_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn glslopt_shader_get_uniform_total_size( + shader: *mut glslopt_shader, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn glslopt_shader_get_uniform_desc( + shader: *mut glslopt_shader, + index: ::std::os::raw::c_int, + outName: *mut *const ::std::os::raw::c_char, + outType: *mut glslopt_basic_type, + outPrec: *mut glslopt_precision, + outVecSize: *mut ::std::os::raw::c_int, + outMatSize: *mut ::std::os::raw::c_int, + outArraySize: *mut ::std::os::raw::c_int, + outLocation: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn glslopt_shader_get_texture_count(shader: *mut glslopt_shader) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn glslopt_shader_get_texture_desc( + shader: *mut glslopt_shader, + index: ::std::os::raw::c_int, + outName: *mut *const ::std::os::raw::c_char, + outType: *mut glslopt_basic_type, + outPrec: *mut glslopt_precision, + outVecSize: *mut ::std::os::raw::c_int, + outMatSize: *mut ::std::os::raw::c_int, + outArraySize: *mut ::std::os::raw::c_int, + outLocation: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn glslopt_shader_get_stats( + shader: *mut glslopt_shader, + approxMath: *mut ::std::os::raw::c_int, + approxTex: *mut ::std::os::raw::c_int, + approxFlow: *mut ::std::os::raw::c_int, + ); +} |