NVIDIA IndeX API nvidia_logo_transpbg.gif Up
irendering_kernel_programs.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
7
8#ifndef NVIDIA_INDEX_IRENDERING_KERNEL_PROGRAMS_H
9#define NVIDIA_INDEX_IRENDERING_KERNEL_PROGRAMS_H
10
11#include <mi/dice.h>
12
13#include <nv/index/iattribute.h>
14
15namespace nv {
16namespace index {
17
37 public mi::base::Interface_declare<0x4953ee6c,0x1099,0x47de,0x94,0xa8,0x5e,0xb7,0x17,0xe4,0x83,0x7d,
38 nv::index::IAttribute>
39{
40public:
43 {
44 mi::Sint32 max_registers;
48 mi::math::Vector_struct<mi::Uint32, 2> block_size;
53 mi::Uint32 debug_flags;
55 };
56
57public:
62 virtual void set_program_source(const char* prog_src) = 0;
63
68 virtual const char* get_program_source() const = 0;
69
74 virtual void set_program_options(const Program_options& prog_options) = 0;
75
80 virtual const Program_options& get_program_options() const = 0;
81};
82
98 public mi::base::Interface_declare<0xa5edda1a,0x9a97,0x40c1,0xa2,0xe7,0xf2,0x44,0x2d,0x2d,0x55,0xc7,
99 nv::index::IAttribute>
100{
101public:
109 virtual void set_header(
110 const char* include_name,
111 const char* header_source) = 0;
112
118 virtual const char* get_header(const char* include_name) const = 0;
119
124 virtual mi::Uint32 get_nb_headers() const = 0;
125
133 virtual void get_header(
134 mi::Uint32 index,
135 const char** include_name_out,
136 const char** header_source_out) const = 0;
137
140 virtual void clear() = 0;
141};
142
295 public mi::base::Interface_declare<0x82ad1cdf,0xcbac,0x452f,0x9b,0x63,0x13,0xe4,0x94,0xc9,0xbf,0xaa,
296 nv::index::IAttribute>
297{
298public:
303 virtual mi::Uint32 get_nb_buffer_slots() const = 0;
304
309 virtual mi::Size get_max_buffer_size() const = 0;
310
315 virtual mi::Size get_array_offset_alignment() const = 0;
316
328 virtual bool set_buffer_data(
329 mi::Uint32 slot_idx,
330 const void* data,
331 mi::Size data_size) = 0;
332};
333
378 public mi::base::Interface_declare<0x8ecf51a1,0xdf74,0x47a1,0x84,0x27,0xae,0xb0,0x14,0xee,0x52,0xc8,
379 nv::index::IAttribute>
380{
381public:
386 virtual mi::Uint32 get_nb_slots() const = 0;
387
395 virtual bool set_mapping(
396 mi::Uint32 slot_idx,
397 mi::neuraylib::Tag_struct data_tag) = 0;
398
401 {
404 };
405
418 virtual bool set_mapping(
419 mi::Uint32 slot_idx,
420 mi::neuraylib::Tag_struct data_tag,
421 const mi::math::Bbox_struct<mi::Float32, 3>& query_bbox,
423
431 virtual mi::neuraylib::Tag_struct get_mapping(
432 mi::Uint32 slot_idx) const = 0;
433};
434
511 public mi::base::Interface_declare<0x4c2b9169,0xb377,0x452a,0x8f,0xfa,0x87,0x70,0x35,0xd9,0xa2,0xe8,
512 nv::index::IRendering_kernel_program>
513{
514};
515
597 public mi::base::Interface_declare<0x861e254b,0x6ade,0x4579,0x93,0x15,0x23,0x2d,0x5c,0x3f,0xe5,0xfd,
598 nv::index::IRendering_kernel_program>
599{
600};
601
602} // namespace index
603} // namespace nv
604
605#endif // NVIDIA_INDEX_IRENDERING_KERNEL_PROGRAMS_H
Defines headers that can be included by rendering kernel programs.
Definition: irendering_kernel_programs.h:100
virtual mi::Uint32 get_nb_headers() const =0
Returns the total number of headers stored in the attribute.
virtual void get_header(mi::Uint32 index, const char **include_name_out, const char **header_source_out) const =0
Returns the name and header source code for the header with the given index.
virtual void clear()=0
Removes all headers from the attributes.
virtual const char * get_header(const char *include_name) const =0
Returns the header source code for a given name.
virtual void set_header(const char *include_name, const char *header_source)=0
Stores a header in the attribute.
The interface class representing user-defined parameter buffers for user-programmable rendering kerne...
Definition: irendering_kernel_programs.h:297
virtual mi::Uint32 get_nb_buffer_slots() const =0
Returns the number of valid buffer slots available to assign user-defined data to.
virtual mi::Size get_array_offset_alignment() const =0
Returns the alignment in bytes of array components in a single buffer assigned to a buffer slot.
virtual mi::Size get_max_buffer_size() const =0
Returns the maximum size of an individual buffer assignable to an individual buffer slot.
virtual bool set_buffer_data(mi::Uint32 slot_idx, const void *data, mi::Size data_size)=0
Assigns the buffer contents to a particular buffer slot.
Scene attribute to map scene elements to slots that are accessible by user-programmable rendering ker...
Definition: irendering_kernel_programs.h:380
virtual bool set_mapping(mi::Uint32 slot_idx, mi::neuraylib::Tag_struct data_tag, const mi::math::Bbox_struct< mi::Float32, 3 > &query_bbox, Query_reference reference=RELATIVE_QUERY_BOUNDING_BOX)=0
Maps a scene element to a slot.
Query_reference
A query bounding box may be applied relative to the data point or given in absolute spatial 3D values...
Definition: irendering_kernel_programs.h:401
@ RELATIVE_QUERY_BOUNDING_BOX
! Relative to the given data points of a distributed dataset.
Definition: irendering_kernel_programs.h:402
@ ABSOLUTE_QUERY_BOUNDING_BOX
! Spatial 3D bounding box given in absolute values in the local space.
Definition: irendering_kernel_programs.h:403
virtual mi::Uint32 get_nb_slots() const =0
Returns the number of slots available to assign mappings to.
virtual bool set_mapping(mi::Uint32 slot_idx, mi::neuraylib::Tag_struct data_tag)=0
Maps a scene element to a slot.
virtual mi::neuraylib::Tag_struct get_mapping(mi::Uint32 slot_idx) const =0
Returns the mapping of a given slot.
The interface class representing user-programmable rendering kernel components.
Definition: irendering_kernel_programs.h:39
virtual const char * get_program_source() const =0
Returns the source code for the rendering kernel program.
virtual void set_program_options(const Program_options &prog_options)=0
Sets the program options for the rendering kernel program.
virtual const Program_options & get_program_options() const =0
Returns the program options of the rendering kernel program.
virtual void set_program_source(const char *prog_src)=0
Sets the source code for the rendering kernel program.
An interface class representing rendering kernel programs applied to surface primitives (e....
Definition: irendering_kernel_programs.h:599
An interface class representing rendering kernel programs applied to volume primitives (e....
Definition: irendering_kernel_programs.h:513
Base class representing attributes that can be defined in a scene description.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349
Program options for executing the kernel programs.
Definition: irendering_kernel_programs.h:43
mi::Uint32 debug_flags
Internal debug options.
Definition: irendering_kernel_programs.h:53
mi::Sint32 max_registers
Define the maximum number of registers to use for the program.
Definition: irendering_kernel_programs.h:44
mi::math::Vector_struct< mi::Uint32, 2 > block_size
Define the execution block size of the rendering kernel using the program.
Definition: irendering_kernel_programs.h:48