MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::ITarget_code Class Referenceabstract

Represents target code of an MDL backend. More...

Inheritance diagram for mi::neuraylib::ITarget_code:
mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac > mi::base::IInterface

Public Types

enum  State_usage_property {
  SU_POSITION = 0x0001u,
  SU_NORMAL = 0x0002u,
  SU_GEOMETRY_NORMAL = 0x0004u,
  SU_MOTION = 0x0008u,
  SU_TEXTURE_COORDINATE = 0x0010u,
  SU_TEXTURE_TANGENTS = 0x0020u,
  SU_TANGENT_SPACE = 0x0040u,
  SU_GEOMETRY_TANGENTS = 0x0080u,
  SU_DIRECTION = 0x0100u,
  SU_ANIMATION_TIME = 0x0200u,
  SU_ROUNDED_CORNER_NORMAL = 0x0400u,
  SU_ALL_VARYING_MASK = 0x07FFu,
  SU_TRANSFORMS = 0x0800u,
  SU_OBJECT_ID = 0x1000u,
  SU_ALL_UNIFORM_MASK = 0x1800u
}
 The potential state usage properties. More...
 
enum  Texture_shape {
  Texture_shape_invalid = 0,
  Texture_shape_2d = 1,
  Texture_shape_3d = 2,
  Texture_shape_cube = 3,
  Texture_shape_ptex = 4,
  Texture_shape_bsdf_data = 5
}
 
enum  Prototype_language
 Language to use for the callable function prototype. More...
 
enum  Distribution_kind
 Possible kinds of distribution functions. More...
 
enum  Function_kind
 Possible kinds of callable functions. More...
 
enum  Gamma_mode
 Possible texture gamma modes. More...
 
- Public Types inherited from mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual
IMdl_backend_api::Mdl_backend_kind 
get_backend_kind () const =0
 Returns the kind of backend this information belongs to. More...
 
virtual const char * get_code () const =0
 Returns the represented target code in ASCII representation. More...
 
virtual Size get_code_size () const =0
 Returns the length of the represented target code. More...
 
virtual Size get_callable_function_count () const =0
 Returns the number of callable functions in the target code. More...
 
virtual const char * get_callable_function (Size index) const =0
 Returns the name of a callable function in the target code. More...
 
virtual Size get_ro_data_segment_count () const =0
 Returns the number of constant data initializers. More...
 
virtual const char * get_ro_data_segment_name (Size index) const =0
 Returns the name of the constant data segment at the given index. More...
 
virtual Size get_ro_data_segment_size (Size index) const =0
 Returns the size of the constant data segment at the given index. More...
 
virtual const char * get_ro_data_segment_data (Size index) const =0
 Returns the data of the constant data segment at the given index. More...
 
virtual Size get_code_segment_count () const =0
 Returns the number of code segments of the target code. More...
 
virtual const char * get_code_segment (Size index) const =0
 Returns the represented target code segment in ASCII representation. More...
 
virtual Size get_code_segment_size (Size index) const =0
 Returns the length of the represented target code segment. More...
 
virtual const char * get_code_segment_description (Size index) const =0
 Returns the description of the target code segment. More...
 
virtual State_usage get_render_state_usage () const =0
 Returns the potential render state usage of the target code. More...
 
virtual Size get_argument_block_count () const =0
 Returns the number of target argument blocks. More...
 
virtual const
ITarget_argument_block
get_argument_block (Size index) const =0
 Get a target argument block if available. More...
 
virtual ITarget_argument_blockcreate_argument_block (Size index, const ICompiled_material *material, ITarget_resource_callback *resource_callback) const =0
 Create a new target argument block of the class-compiled material for this target code. More...
 
virtual Size get_argument_layout_count () const =0
 Returns the number of target argument block layouts. More...
 
virtual const
ITarget_value_layout
get_argument_block_layout (Size index) const =0
 Get a captured arguments block layout if available. More...
 
virtual Size get_string_constant_count () const =0
 Returns the number of string constants used by the target code. More...
 
virtual const char * get_string_constant (Size index) const =0
 Returns the string constant used by the target code. More...
 
virtual Uint32 get_known_resource_index (ITransaction *transaction, IValue_resource const *resource) const =0
 Returns the resource index for use in an ITarget_argument_block of resources already known when this ITarget_code object was generated. More...
 
virtual const char * get_callable_function_prototype (Size index, Prototype_language lang) const =0
 Returns the prototype of a callable function in the target code. More...
 
virtual Distribution_kind get_callable_function_distribution_kind (Size index) const =0
 Returns the distribution kind of a callable function in the target code. More...
 
virtual Function_kind get_callable_function_kind (Size index) const =0
 Returns the function kind of a callable function in the target code. More...
 
virtual Size get_callable_function_argument_block_index (Size index) const =0
 Get the index of the target argument block to use with a callable function. More...
 
virtual Sint32 execute_environment (Size index, const Shading_state_environment &state, Texture_handler_base *tex_handler, Spectrum_struct *result) const =0
 Run this code on the native CPU. More...
 
virtual Sint32 execute (Size index, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args, void *result) const =0
 Run this code on the native CPU with the given captured arguments block. More...
 
virtual Sint32 execute_bsdf_init (Size index, Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF init function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_sample (Size index, Bsdf_sample_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF sample function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_evaluate (Size index, Bsdf_evaluate_data_base *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF evaluation function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_pdf (Size index, Bsdf_pdf_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF PDF calculation function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_auxiliary (Size index, Bsdf_auxiliary_data_base *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF auxiliary calculation function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_init (Size index, Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF init function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_sample (Size index, Edf_sample_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF sample function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_evaluate (Size index, Edf_evaluate_data_base *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF evaluation function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_pdf (Size index, Edf_pdf_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF PDF calculation function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_auxiliary (Size index, Edf_auxiliary_data_base *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF auxiliary calculation function for this code on the native CPU. More...
 
virtual Size get_callable_function_df_handle_count (Size func_index) const =0
 Get the number of distribution function handles referenced by a callable function. More...
 
virtual const char * get_callable_function_df_handle (Size func_index, Size handle_index) const =0
 Get the name of a distribution function handle referenced by a callable function. More...
 
virtual bool supports_serialization () const =0
 Indicates whether the target code can be serialized. More...
 
virtual const IBufferserialize (IMdl_execution_context *context) const =0
 Stores the data of this object in a buffer that can written to an external cache. More...
 
virtual State_usage get_callable_function_render_state_usage (Size index) const =0
 Returns the potential render state usage of callable function in the target code. More...
 
Textures
virtual Size get_texture_count () const =0
 Returns the number of texture resources used by the target code. More...
 
virtual Size get_body_texture_count () const =0
 Returns the number of texture resources coming from the body of expressions (not solely from material arguments). More...
 
virtual const char * get_texture (Size index) const =0
 Returns the name of a texture resource used by the target code. More...
 
virtual const char * get_texture_url (Size index) const =0
 Returns the MDL URL of a texture resource used by the target code if no database element is associated to the resource. More...
 
virtual const char * get_texture_owner_module (Size index) const =0
 Returns the owner module name of a relative texture url. More...
 
virtual Gamma_mode get_texture_gamma (Size index) const =0
 Returns the gamma mode of a texture resource used by the target code. More...
 
virtual Texture_shape get_texture_shape (Size index) const =0
 Returns the texture shape of a given texture resource used by the target code. More...
 
virtual Df_data_kind get_texture_df_data_kind (Size index) const =0
 Returns the distribution function data kind of a given texture resource used by the target code. More...
 
virtual const Float32get_texture_df_data (Size index, Size &rx, Size &ry, Size &rz) const =0
 Returns the distribution function data this texture refers to. More...
 
Light profiles
virtual Size get_light_profile_count () const =0
 Returns the number of light profile resources used by the target code. More...
 
virtual Size get_body_light_profile_count () const =0
 Returns the number of light profile resources coming from the body of expressions (not solely from material arguments). More...
 
virtual const char * get_light_profile (Size index) const =0
 Returns the name of a light profile resource used by the target code. More...
 
virtual const char * get_light_profile_url (Size index) const =0
 Returns the MDL URL of a light profile resource used by the target code if no database element is associated to the resource. More...
 
virtual const char * get_light_profile_owner_module (Size index) const =0
 Returns the owner module name of a relative light profile URL. More...
 
BSDF measurements
virtual Size get_bsdf_measurement_count () const =0
 Returns the number of bsdf measurement resources used by the target code. More...
 
virtual Size get_body_bsdf_measurement_count () const =0
 Returns the number of BSDF measurement resources coming from the body of expressions (not solely from material arguments). More...
 
virtual const char * get_bsdf_measurement (Size index) const =0
 Returns the name of a bsdf measurement resource used by the target code. More...
 
virtual const char * get_bsdf_measurement_url (Size index) const =0
 Returns the MDL URL of a BSDF measurement resource used by the target code if no database element is associated to the resource. More...
 
virtual const char * get_bsdf_measurement_owner_module (Size index) const =0
 Returns the owner module name of a relative BSDF measurement URL. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Represents target code of an MDL backend.