Top Description Inners Fields Constructors Methods
org.lwjgl.util.spvc

public Class Spvc

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Native bindings to the C API of SPIRV-Cross.

SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.

SPIRV-Cross tries hard to emit readable and clean output from the SPIR-V. The goal is to emit GLSL or MSL that looks like it was written by a human and not awkward IR/assembly-like code.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Spvc.Functions

Contains the function pointers loaded from the spvc SharedLibrary.

Field Summary

Modifier and TypeField and Description
private static final SharedLibrary
public static final int
SPVC_BACKEND_CPP

spvc_backend Enum values:

public static final int
SPVC_BACKEND_GLSL

spvc_backend Enum values:

public static final int
SPVC_BACKEND_HLSL

spvc_backend Enum values:

public static final int
SPVC_BACKEND_JSON

spvc_backend Enum values:

public static final int
SPVC_BACKEND_MSL

spvc_backend Enum values:

public static final int
SPVC_BACKEND_NONE

spvc_backend Enum values:

public static final int
SPVC_BASETYPE_ACCELERATION_STRUCTURE

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_ATOMIC_COUNTER

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_BOOLEAN

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_FP16

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_FP32

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_FP64

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_IMAGE

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_INT16

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_INT32

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_INT64

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_INT8

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_SAMPLED_IMAGE

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_SAMPLER

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_STRUCT

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_UINT16

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_UINT32

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_UINT64

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_UINT8

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_UNKNOWN

Maps to spirv_cross::SPIRType::BaseType.

public static final int
SPVC_BASETYPE_VOID

Maps to spirv_cross::SPIRType::BaseType.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
SPVC_CAPTURE_MODE_COPY

spvc_capture_mode Enum values:

  • CAPTURE_MODE_COPY - The Parsed IR payload will be copied, and the handle can be reused to create other compiler instances.
  • CAPTURE_MODE_TAKE_OWNERSHIP - The payload will now be owned by the compiler. parsed_ir should now be considered a dead blob and must not be used further. This is optimal for performance and should be the go-to option.
public static final int
SPVC_CAPTURE_MODE_TAKE_OWNERSHIP

spvc_capture_mode Enum values:

  • CAPTURE_MODE_COPY - The Parsed IR payload will be copied, and the handle can be reused to create other compiler instances.
  • CAPTURE_MODE_TAKE_OWNERSHIP - The payload will now be owned by the compiler. parsed_ir should now be considered a dead blob and must not be used further. This is optimal for performance and should be the go-to option.
public static final int
public static final int
SPVC_COMPILER_OPTION_EMIT_LINE_DIRECTIVES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_ENABLE_STORAGE_IMAGE_QUALIFIER_DEDUCTION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
public static final int
SPVC_COMPILER_OPTION_FIXUP_DEPTH_CONVENTION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_FLATTEN_MULTIDIMENSIONAL_ARRAYS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_FLIP_VERTEX_Y

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_FORCE_TEMPORARY

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_FORCE_ZERO_INITIALIZED_VARIABLES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
public static final int
SPVC_COMPILER_OPTION_GLSL_EMIT_PUSH_CONSTANT_AS_UNIFORM_BUFFER

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_EMIT_UNIFORM_BUFFER_AS_PLAIN_UNIFORMS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_ENABLE_420PACK_EXTENSION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_ENABLE_ROW_MAJOR_LOAD_WORKAROUND

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_ES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_ES_DEFAULT_FLOAT_PRECISION_HIGHP

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_ES_DEFAULT_INT_PRECISION_HIGHP

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_FORCE_FLATTENED_IO_BLOCKS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_OVR_MULTIVIEW_VIEW_COUNT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_SEPARATE_SHADER_OBJECTS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_SUPPORT_NONZERO_BASE_INSTANCE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_VERSION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_GLSL_VULKAN_SEMANTICS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
public static final int
SPVC_COMPILER_OPTION_HLSL_ENABLE_16BIT_TYPES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_FLATTEN_MATRIX_VERTEX_INPUT_SEMANTICS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_FORCE_STORAGE_BUFFER_AS_UAV

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_NONWRITABLE_UAV_TEXTURE_AS_SRV

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_POINT_COORD_COMPAT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_POINT_SIZE_COMPAT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_SHADER_MODEL

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_HLSL_SUPPORT_NONZERO_BASE_VERTEX_BASE_INSTANCE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
public static final int
SPVC_COMPILER_OPTION_MSL_ARGUMENT_BUFFERS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ARGUMENT_BUFFERS_TIER

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ARRAYED_SUBPASS_INPUT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_AUX_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
public static final int
SPVC_COMPILER_OPTION_MSL_BUFFER_SIZE_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_CAPTURE_OUTPUT_TO_BUFFER

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_CHECK_DISCARDED_FRAG_STORES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_DEVICE_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_DISABLE_RASTERIZATION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_DISPATCH_BASE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_DYNAMIC_OFFSETS_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_EMULATE_CUBEMAP_ARRAY

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_EMULATE_SUBGROUPS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_BASE_INDEX_ZERO

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_CLIP_DISTANCE_USER_VARYING

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_DECORATION_BINDING

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_FRAG_DEPTH_BUILTIN

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_FRAG_OUTPUT_MASK

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_FRAG_STENCIL_REF_BUILTIN

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_ENABLE_POINT_SIZE_BUILTIN

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_FIXED_SUBGROUP_SIZE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_FORCE_ACTIVE_ARGUMENT_BUFFER_RESOURCES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_FORCE_NATIVE_ARRAYS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_FORCE_SAMPLE_RATE_SHADING

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_FRAMEBUFFER_FETCH_SUBPASS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_INDIRECT_PARAMS_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_INVARIANT_FP_MATH

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_IOS_FRAMEBUFFER_FETCH_SUBPASS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_IOS_SUPPORT_BASE_VERTEX_INSTANCE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_IOS_USE_SIMDGROUP_FUNCTIONS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_MANUAL_HELPER_INVOCATION_UPDATES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_MULTI_PATCH_WORKGROUP

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_MULTIVIEW

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_MULTIVIEW_LAYERED_RENDERING

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_PAD_FRAGMENT_OUTPUT_COMPONENTS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_PLATFORM

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_R32UI_ALIGNMENT_CONSTANT_ID

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_R32UI_LINEAR_TEXTURE_ALIGNMENT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_RAW_BUFFER_TESE_INPUT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SAMPLE_DREF_LOD_ARRAY_AS_GRAD

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_INDEX_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_INPUT_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_INPUT_WORKGROUP_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_OUTPUT_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_PATCH_INPUT_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_PATCH_OUTPUT_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SHADER_TESS_FACTOR_OUTPUT_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SWIZZLE_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_SWIZZLE_TEXTURE_SAMPLES

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_TESS_DOMAIN_ORIGIN_LOWER_LEFT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_TEXEL_BUFFER_TEXTURE_WIDTH

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_TEXTURE_1D_AS_2D

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_TEXTURE_BUFFER_NATIVE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_VERSION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_VERTEX_FOR_TESSELLATION

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_VERTEX_INDEX_TYPE

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_VIEW_INDEX_FROM_DEVICE_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_MSL_VIEW_MASK_BUFFER_INDEX

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_RELAX_NAN_CHECKS

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_COMPILER_OPTION_UNKNOWN

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_ERROR_INVALID_ARGUMENT

spvc_result Enum values:

public static final int
SPVC_ERROR_INVALID_SPIRV

spvc_result Enum values:

public static final int
SPVC_ERROR_OUT_OF_MEMORY

spvc_result Enum values:

public static final int
SPVC_ERROR_UNSUPPORTED_SPIRV

spvc_result Enum values:

public static final int
SPVC_HLSL_BINDING_AUTO_ALL

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_CBV_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_NONE_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_PUSH_CONSTANT_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_SAMPLER_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_SRV_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_BINDING_AUTO_UAV_BIT

Maps to the various spirv_cross::Compiler*::Option structures.

public static final int
SPVC_HLSL_PUSH_CONSTANT_BINDING

Special constant used in an HLSL ResourceBinding binding element to indicate the bindings for the push constants.

public static final int
SPVC_HLSL_PUSH_CONSTANT_DESC_SET

Special constant used in an HLSL ResourceBinding desc_set element to indicate the bindings for the push constants.

public static final int
SPVC_MSL_ARGUMENT_BUFFER_BINDING

Special constant used in a MSLResourceBinding binding element to indicate the buffer binding used for the argument buffer itself.

public static final int
public static final int
SPVC_MSL_BUFFER_SIZE_BUFFER_BINDING

Special constant used in a MSLResourceBinding binding element to indicate the buffer binding for buffer size buffers to support OpArrayLength.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
SPVC_MSL_INDEX_TYPE_NONE

The type of index in the index buffer, if present.

public static final int
SPVC_MSL_INDEX_TYPE_UINT16

The type of index in the index buffer, if present.

public static final int
SPVC_MSL_INDEX_TYPE_UINT32

The type of index in the index buffer, if present.

public static final int
SPVC_MSL_PLATFORM_IOS

Maps to C++ API.

public static final int
SPVC_MSL_PLATFORM_MACOS

Maps to C++ API.

public static final int
SPVC_MSL_PUSH_CONSTANT_BINDING

Special constant used in a MSLResourceBinding binding element to indicate the bindings for the push constants.

public static final int
SPVC_MSL_PUSH_CONSTANT_DESC_SET

Special constant used in a MSLResourceBinding desc_set element to indicate the bindings for the push constants.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
SPVC_MSL_SHADER_VARIABLE_FORMAT_ANY16

Indicates the format of a shader input.

public static final int
SPVC_MSL_SHADER_VARIABLE_FORMAT_ANY32

Indicates the format of a shader input.

public static final int
SPVC_MSL_SHADER_VARIABLE_FORMAT_OTHER

Indicates the format of a shader input.

public static final int
SPVC_MSL_SHADER_VARIABLE_FORMAT_UINT16

Indicates the format of a shader input.

public static final int
SPVC_MSL_SHADER_VARIABLE_FORMAT_UINT8

Indicates the format of a shader input.

public static final int
public static final int
public static final int
public static final int
SPVC_MSL_SWIZZLE_BUFFER_BINDING

Special constant used in a MSLResourceBinding binding element to indicate the buffer binding for swizzle buffers.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
SPVC_SUCCESS

spvc_result Enum values:

Constructor Summary

AccessConstructor and Description
protected
Spvc()

Method Summary

Modifier and TypeMethod and Description
public static SharedLibrary
getLibrary()

Returns the spvc SharedLibrary.

public static int
nspvc_compiler_add_header_line(long compiler, long line)

Unsafe version of: compiler_add_header_line

public static boolean
nspvc_compiler_buffer_get_hlsl_counter_buffer(long compiler, int id, long counter_id)

public static int
public static int
nspvc_compiler_compile(long compiler, long source)

Unsafe version of: compiler_compile

public static int
nspvc_compiler_create_compiler_options(long compiler, long options)

Unsafe version of: compiler_create_compiler_options

public static int
nspvc_compiler_create_shader_resources(long compiler, long resources)

public static int
nspvc_compiler_create_shader_resources_for_active_variables(long compiler, long resources, long active)

public static int
nspvc_compiler_get_active_buffer_ranges(long compiler, int id, long ranges, long num_ranges)

Unsafe version of: compiler_get_active_buffer_ranges

public static int
public static boolean
nspvc_compiler_get_binary_offset_for_decoration(long compiler, int id, int decoration, long word_offset)

Unsafe version of: compiler_get_binary_offset_for_decoration

public static int
nspvc_compiler_get_buffer_block_decorations(long compiler, int id, long decorations, long num_decorations)

public static long
nspvc_compiler_get_cleansed_entry_point_name(long compiler, long name, int model)

public static int
nspvc_compiler_get_combined_image_samplers(long compiler, long samplers, long num_samplers)

public static int
nspvc_compiler_get_declared_capabilities(long compiler, long capabilities, long num_capabilities)

public static int
nspvc_compiler_get_declared_extensions(long compiler, long extensions, long num_extensions)

public static int
nspvc_compiler_get_declared_struct_member_size(long compiler, long type, int index, long size)

public static int
nspvc_compiler_get_declared_struct_size(long compiler, long struct_type, long size)

Unsafe version of: compiler_get_declared_struct_size

public static int
nspvc_compiler_get_declared_struct_size_runtime_array(long compiler, long struct_type, long array_size, long size)

public static long
nspvc_compiler_get_decoration_string(long compiler, int id, int decoration)

public static int
nspvc_compiler_get_entry_points(long compiler, long entry_points, long num_entry_points)

Unsafe version of: compiler_get_entry_points

public static int
nspvc_compiler_get_execution_modes(long compiler, long modes, long num_modes)

public static long
nspvc_compiler_get_member_decoration_string(long compiler, int id, int member_index, int decoration)

public static long
nspvc_compiler_get_member_name(long compiler, int id, int member_index)

public static long
nspvc_compiler_get_name(long compiler, int id)

public static long
public static long
nspvc_compiler_get_required_extension(long compiler, long index)

public static int
nspvc_compiler_get_specialization_constants(long compiler, long constants, long num_constants)

Unsafe version of: compiler_get_specialization_constants

public static int
nspvc_compiler_get_work_group_size_specialization_constants(long compiler, long x, long y, long z)

public static int
nspvc_compiler_hlsl_add_resource_binding(long compiler, long binding)

public static int
nspvc_compiler_hlsl_add_vertex_attribute_remap(long compiler, long remap, long remaps)

public static int
nspvc_compiler_hlsl_set_root_constants_layout(long compiler, long constant_info, long count)

Unsafe version of: compiler_hlsl_set_root_constants_layout

public static int
nspvc_compiler_msl_add_resource_binding(long compiler, long binding)

public static int
nspvc_compiler_msl_add_shader_input(long compiler, long input)

Unsafe version of: compiler_msl_add_shader_input

public static int
nspvc_compiler_msl_add_shader_input_2(long compiler, long input)

public static int
nspvc_compiler_msl_add_shader_output(long compiler, long output)

Unsafe version of: compiler_msl_add_shader_output

public static int
nspvc_compiler_msl_add_shader_output_2(long compiler, long output)

public static int
nspvc_compiler_msl_add_vertex_attribute(long compiler, long attrs)

public static long
public static int
nspvc_compiler_msl_remap_constexpr_sampler(long compiler, int id, long sampler)

public static int
nspvc_compiler_msl_remap_constexpr_sampler_by_binding(long compiler, int desc_set, int binding, long sampler)

public static int
nspvc_compiler_msl_remap_constexpr_sampler_by_binding_ycbcr(long compiler, int desc_set, int binding, long sampler, long conv)

public static int
nspvc_compiler_msl_remap_constexpr_sampler_ycbcr(long compiler, int id, long sampler, long conv)

public static int
public static int
nspvc_compiler_rename_entry_point(long compiler, long old_name, long new_name, int model)

public static int
nspvc_compiler_require_extension(long compiler, long ext)

public static void
nspvc_compiler_set_decoration_string(long compiler, int id, int decoration, long argument)

public static int
nspvc_compiler_set_entry_point(long compiler, long name, int model)

public static void
nspvc_compiler_set_member_decoration_string(long compiler, int id, int member_index, int decoration, long argument)

public static void
nspvc_compiler_set_member_name(long compiler, int id, int member_index, long argument)

public static void
nspvc_compiler_set_name(long compiler, int id, long argument)

public static int
nspvc_compiler_type_struct_member_array_stride(long compiler, long type, int index, long stride)

public static int
nspvc_compiler_type_struct_member_matrix_stride(long compiler, long type, int index, long stride)

public static int
nspvc_compiler_type_struct_member_offset(long compiler, long type, int index, long offset)

public static void
nspvc_constant_get_subconstants(long constant, long constituents, long count)

public static int
nspvc_context_create(long context)

Unsafe version of: context_create

public static int
nspvc_context_create_compiler(long context, int backend, long parsed_ir, int mode, long compiler)

Unsafe version of: context_create_compiler

public static long
public static int
nspvc_context_parse_spirv(long context, long spirv, long word_count, long parsed_ir)

Unsafe version of: context_parse_spirv

public static void
nspvc_context_set_error_callback(long context, long cb, long userdata)

Unsafe version of: context_set_error_callback

public static long
public static void
nspvc_get_version(long major, long minor, long patch)

Unsafe version of: get_version

public static void
public static void
public static void
public static void
public static void
nspvc_msl_shader_input_init(long input)

Unsafe version of: msl_shader_input_init

public static void
public static void
public static void
public static int
nspvc_resources_get_builtin_resource_list_for_type(long resources, int type, long resource_list, long resource_size)

public static int
nspvc_resources_get_resource_list_for_type(long resources, int type, long resource_list, long resource_size)

public static int
spvc_compiler_add_header_line(long compiler, ByteBuffer line)

Maps to C++ API.

public static int
spvc_compiler_add_header_line(long compiler, CharSequence line)

Maps to C++ API.

public static boolean
spvc_compiler_buffer_get_hlsl_counter_buffer(long compiler, int id, IntBuffer counter_id)

public static boolean
public static int
public static int
spvc_compiler_build_dummy_sampler_for_combined_images(long compiler, IntBuffer id)

Workaround helper functions.

public static int
spvc_compiler_compile(long compiler, PointerBuffer
owned by the context, and caller must not free it themselves
source
)

Compile IR into a string.

public static int
spvc_compiler_create_compiler_options(long compiler, PointerBuffer options)

Create compiler options, which will initialize defaults.

public static int
public static int
public static int
spvc_compiler_flatten_buffer_block(long compiler, int id)

public static int
spvc_compiler_get_active_buffer_ranges(long compiler, int id, PointerBuffer ranges, PointerBuffer num_ranges)

Buffer ranges Maps to C++ API.

public static int
spvc_compiler_get_active_interface_variables(long compiler, PointerBuffer set)

Reflect resources.

public static boolean
spvc_compiler_get_binary_offset_for_decoration(long compiler, int id, int decoration, IntBuffer word_offset)

Misc reflection Maps to C++ API.

public static int
spvc_compiler_get_buffer_block_decorations(long compiler, int id, PointerBuffer decorations, PointerBuffer num_decorations)

public static String
public static String
public static int
public static long
spvc_compiler_get_constant_handle(long compiler, int id)

public static int
spvc_compiler_get_current_id_bound(long compiler)

Maps directly to C++ API.

public static int
spvc_compiler_get_declared_capabilities(long compiler, PointerBuffer capabilities, PointerBuffer num_capabilities)

public static int
spvc_compiler_get_declared_extensions(long compiler, PointerBuffer extensions, PointerBuffer num_extensions)

public static int
spvc_compiler_get_declared_struct_member_size(long compiler, long type, int index, PointerBuffer size)

public static int
spvc_compiler_get_declared_struct_size(long compiler, long struct_type, PointerBuffer size)

Buffer layout query.

public static int
spvc_compiler_get_declared_struct_size_runtime_array(long compiler, long struct_type, long array_size, PointerBuffer size)

public static int
spvc_compiler_get_decoration(long compiler, int id, int decoration)

public static String
spvc_compiler_get_decoration_string(long compiler, int id, int decoration)

public static int
spvc_compiler_get_entry_points(long compiler, PointerBuffer entry_points, PointerBuffer num_entry_points)

Entry points.

public static int
public static int
spvc_compiler_get_execution_mode_argument_by_index(long compiler, int mode, int index)

public static int
public static int
public static int
spvc_compiler_get_member_decoration(long compiler, int id, int member_index, int decoration)

public static String
spvc_compiler_get_member_decoration_string(long compiler, int id, int member_index, int decoration)

public static String
spvc_compiler_get_member_name(long compiler, int id, int member_index)

public static String
spvc_compiler_get_name(long compiler, int id)

public static long
public static String
public static String
spvc_compiler_get_required_extension(long compiler, long index)

public static int
spvc_compiler_get_specialization_constants(long compiler, PointerBuffer constants, PointerBuffer num_constants)

Constants Maps to C++ API.

public static long
spvc_compiler_get_type_handle(long compiler, int id)

Type query interface.

public static int
public static boolean
spvc_compiler_has_active_builtin(long compiler, int builtin, int storage)

public static boolean
spvc_compiler_has_decoration(long compiler, int id, int decoration)

public static boolean
spvc_compiler_has_member_decoration(long compiler, int id, int member_index, int decoration)

public static int
public static int
public static boolean
spvc_compiler_hlsl_is_resource_used(long compiler, int model, int set, int binding)

public static int
public static int
public static int
spvc_compiler_hlsl_set_root_constants_layout(long compiler, SpvcHlslRootConstants constant_info, long count)

HLSL specifics.

public static int
spvc_compiler_install_compiler_options(long compiler, long options)

Set compiler options.

public static int
spvc_compiler_mask_stage_output_by_builtin(long compiler, int builtin)

public static int
spvc_compiler_mask_stage_output_by_location(long compiler, int location, int component)

public static int
spvc_compiler_msl_add_discrete_descriptor_set(long compiler, int desc_set)

public static int
spvc_compiler_msl_add_dynamic_buffer(long compiler, int desc_set, int binding, int index)

public static int
spvc_compiler_msl_add_inline_uniform_block(long compiler, int desc_set, int binding)

public static int
public static int
public static int
public static int
public static int
public static int
public static int
public static int
public static String
public static boolean
spvc_compiler_msl_is_rasterization_disabled(long compiler)

MSL specifics.

public static boolean
spvc_compiler_msl_is_resource_used(long compiler, int model, int set, int binding)

public static boolean
spvc_compiler_msl_is_shader_input_used(long compiler, int location)

public static boolean
spvc_compiler_msl_is_shader_output_used(long compiler, int location)

public static boolean
public static boolean
public static boolean
public static boolean
public static boolean
public static boolean
public static int
public static int
spvc_compiler_msl_remap_constexpr_sampler_by_binding(long compiler, int desc_set, int binding, SpvcMslConstexprSampler sampler)

public static int
public static int
public static int
spvc_compiler_msl_set_argument_buffer_device_address_space(long compiler, int desc_set, boolean device_address)

public static int
public static int
public static int
spvc_compiler_msl_set_fragment_output_components(long compiler, int location, int components)

public static int
spvc_compiler_options_set_bool(long options, int option, boolean value)

Override options.

public static int
spvc_compiler_options_set_uint(long options, int option, int value)

public static int
spvc_compiler_rename_entry_point(long compiler, ByteBuffer old_name, ByteBuffer new_name, int model)

public static int
spvc_compiler_rename_entry_point(long compiler, CharSequence old_name, CharSequence new_name, int model)

public static int
public static int
public static void
spvc_compiler_set_decoration(long compiler, int id, int decoration, int argument)

Decorations.

public static void
spvc_compiler_set_decoration_string(long compiler, int id, int decoration, ByteBuffer argument)

public static void
spvc_compiler_set_decoration_string(long compiler, int id, int decoration, CharSequence argument)

public static int
public static int
spvc_compiler_set_entry_point(long compiler, ByteBuffer name, int model)

public static int
spvc_compiler_set_entry_point(long compiler, CharSequence name, int model)

public static void
spvc_compiler_set_execution_mode(long compiler, int mode)

public static void
spvc_compiler_set_execution_mode_with_arguments(long compiler, int mode, int arg0, int arg1, int arg2)

public static void
spvc_compiler_set_member_decoration(long compiler, int id, int member_index, int decoration, int argument)

public static void
spvc_compiler_set_member_decoration_string(long compiler, int id, int member_index, int decoration, ByteBuffer argument)

public static void
spvc_compiler_set_member_decoration_string(long compiler, int id, int member_index, int decoration, CharSequence argument)

public static void
spvc_compiler_set_member_name(long compiler, int id, int member_index, ByteBuffer argument)

public static void
spvc_compiler_set_member_name(long compiler, int id, int member_index, CharSequence argument)

public static void
spvc_compiler_set_name(long compiler, int id, ByteBuffer argument)

public static void
spvc_compiler_set_name(long compiler, int id, CharSequence argument)

public static int
spvc_compiler_type_struct_member_array_stride(long compiler, long type, int index, IntBuffer stride)

public static int
spvc_compiler_type_struct_member_matrix_stride(long compiler, long type, int index, IntBuffer stride)

public static int
spvc_compiler_type_struct_member_offset(long compiler, long type, int index, IntBuffer offset)

public static void
spvc_compiler_unset_decoration(long compiler, int id, int decoration)

public static void
spvc_compiler_unset_execution_mode(long compiler, int mode)

public static void
spvc_compiler_unset_member_decoration(long compiler, int id, int member_index, int decoration)

public static void
public static boolean
public static float
spvc_constant_get_scalar_fp16(long constant, int column, int row)

No stdint.h until C99, sigh :( For smaller types, the result is sign or zero-extended as appropriate.

public static float
spvc_constant_get_scalar_fp32(long constant, int column, int row)

public static double
spvc_constant_get_scalar_fp64(long constant, int column, int row)

public static int
spvc_constant_get_scalar_i16(long constant, int column, int row)

public static int
spvc_constant_get_scalar_i32(long constant, int column, int row)

public static int
spvc_constant_get_scalar_i8(long constant, int column, int row)

public static int
spvc_constant_get_scalar_u16(long constant, int column, int row)

public static int
spvc_constant_get_scalar_u32(long constant, int column, int row)

public static int
spvc_constant_get_scalar_u8(long constant, int column, int row)

public static void
spvc_constant_get_subconstants(long constant, PointerBuffer constituents, PointerBuffer count)

public static int
spvc_constant_get_type(long constant)

public static void
spvc_constant_set_scalar_fp16(long constant, int column, int row, short value)

public static void
spvc_constant_set_scalar_fp32(long constant, int column, int row, float value)

public static void
spvc_constant_set_scalar_fp64(long constant, int column, int row, double value)

public static void
spvc_constant_set_scalar_i16(long constant, int column, int row, short value)

public static void
spvc_constant_set_scalar_i32(long constant, int column, int row, int value)

public static void
spvc_constant_set_scalar_i8(long constant, int column, int row, byte value)

public static void
spvc_constant_set_scalar_u16(long constant, int column, int row, short value)

public static void
spvc_constant_set_scalar_u32(long constant, int column, int row, int value)

public static void
spvc_constant_set_scalar_u8(long constant, int column, int row, byte value)

public static int
spvc_context_create(PointerBuffer context)

Context is the highest-level API construct.

public static int
spvc_context_create_compiler(long context, int backend, long parsed_ir, int mode, PointerBuffer compiler)

Create a compiler backend.

public static void
spvc_context_destroy(long context)

Frees all memory allocations and objects associated with the context and its child objects.

public static String
spvc_context_get_last_error_string(long context)

Get the string for the last error which was logged.

public static int
spvc_context_parse_spirv(long context, IntBuffer spirv, long word_count, PointerBuffer parsed_ir)

SPIR-V parsing interface.

public static void
spvc_context_release_allocations(long context)

Frees all memory allocations and objects associated with the context and its child objects, but keeps the context alive.

public static void
spvc_context_set_error_callback(long context, SpvcErrorCallbackI cb, long userdata)

Get notified in a callback when an error triggers.

public static String
spvc_get_commit_revision_and_timestamp()

Gets a human readable version string to identify which commit a particular binary was created from.

public static void
spvc_get_version(IntBuffer major, IntBuffer minor, IntBuffer patch)

Gets the SPVC_C_API_VERSION_* used to build this library.

public static void
spvc_hlsl_resource_binding_init(SpvcHLSLResourceBinding binding)

Initializes the resource binding struct.

public static void
spvc_msl_constexpr_sampler_init(SpvcMslConstexprSampler sampler)

Initializes the constexpr sampler struct.

public static int
spvc_msl_get_aux_buffer_struct_version()

Runtime check for incompatibility.

public static void
spvc_msl_resource_binding_init(SpvcMslResourceBinding binding)

Initializes the resource binding struct.

public static void
spvc_msl_sampler_ycbcr_conversion_init(SpvcMslSamplerYcbcrConversion conv)

Initializes the constexpr sampler struct.

public static void
public static void
spvc_msl_shader_interface_var_init(SpvcMslShaderInterfaceVar var)

Initializes the shader input struct.

public static void
spvc_msl_shader_interface_var_init_2(SpvcMslShaderInterfaceVar2 var)

Initializes the shader interface variable struct.

public static void
spvc_msl_vertex_attribute_init(SpvcMslVertexAttribute attr)

Initializes the vertex attribute struct.

public static int
spvc_resources_get_builtin_resource_list_for_type(long resources, int type, PointerBuffer resource_list, PointerBuffer resource_size)

public static int
spvc_resources_get_resource_list_for_type(long resources, int type, PointerBuffer resource_list, PointerBuffer resource_size)

public static boolean
spvc_type_array_dimension_is_literal(long type, int dimension)

public static int
spvc_type_get_array_dimension(long type, int dimension)

public static int
spvc_type_get_base_type_id(long type)

Pulls out SPIRType::self.

public static int
public static int
public static int
public static int
public static boolean
public static int
public static boolean
public static boolean
public static boolean
public static int
spvc_type_get_image_sampled_type(long type)

Image type query.

public static int
public static int
spvc_type_get_member_type(long type, int index)

public static int
public static int
public static int
public static int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait