API reference¶
Overview¶
This API reference documentation was automatically generated from Python docstrings. The docstrings are generated in the binding code from the C++ API comments. So while this reference primarily targets the Python bindings, it should still be useful for C++ developers.
Core¶
- class slangpy.Object¶
Base class for all reference counted objects.
- class slangpy.Bitmap¶
Base class:
slangpy.Object
- __init__(self, pixel_format: slangpy.Bitmap.PixelFormat, component_type: slangpy.DataStruct.Type, width: int, height: int, channel_count: int = 0, channel_names: collections.abc.Sequence[str] = []) None ¶
- __init__(self, data: ndarray[device='cpu'], pixel_format: slangpy.Bitmap.PixelFormat | None = None, channel_names: collections.abc.Sequence[str] | None = None) None
- __init__(self, path: str | os.PathLike) None
- class PixelFormat¶
Base class:
enum.Enum
- y: PixelFormat = PixelFormat.y¶
- ya: PixelFormat = PixelFormat.ya¶
- r: PixelFormat = PixelFormat.r¶
- rg: PixelFormat = PixelFormat.rg¶
- rgb: PixelFormat = PixelFormat.rgb¶
- rgba: PixelFormat = PixelFormat.rgba¶
- multi_channel: PixelFormat = PixelFormat.multi_channel¶
- class ComponentType¶
Alias class:
slangpy.DataStruct.Type
- class FileFormat¶
Base class:
enum.Enum
- unknown: FileFormat = FileFormat.unknown¶
- auto: FileFormat = FileFormat.auto¶
- png: FileFormat = FileFormat.png¶
- jpg: FileFormat = FileFormat.jpg¶
- bmp: FileFormat = FileFormat.bmp¶
- tga: FileFormat = FileFormat.tga¶
- hdr: FileFormat = FileFormat.hdr¶
- exr: FileFormat = FileFormat.exr¶
- property pixel_format: slangpy.Bitmap.PixelFormat¶
The pixel format.
- property component_type: slangpy.DataStruct.Type¶
The component type.
- property pixel_struct: slangpy.DataStruct¶
Struct describing the pixel layout.
- property width: int¶
The width of the bitmap in pixels.
- property height: int¶
The height of the bitmap in pixels.
- property pixel_count: int¶
The total number of pixels in the bitmap.
- property channel_count: int¶
The number of channels in the bitmap.
- property channel_names: list[str]¶
The names of the channels in the bitmap.
- property srgb_gamma: bool¶
True if the bitmap is in sRGB gamma space.
- has_alpha(self) bool ¶
Returns true if the bitmap has an alpha channel.
- property bytes_per_pixel: int¶
The number of bytes per pixel.
- property buffer_size: int¶
The total size of the bitmap in bytes.
- empty(self) bool ¶
True if bitmap is empty.
- clear(self) None ¶
Clears the bitmap to zeros.
- vflip(self) None ¶
Vertically flip the bitmap.
- split(self) list[tuple[str, slangpy.Bitmap]] ¶
Split bitmap into multiple bitmaps, each containing the channels with the same prefix.
For example, if the bitmap has channels albedo.R, albedo.G, albedo.B, normal.R, normal.G, normal.B, this function will return two bitmaps, one containing the channels albedo.R, albedo.G, albedo.B and the other containing the channels normal.R, normal.G, normal.B.
Common pixel formats (e.g. y, rgb, rgba) are automatically detected and used for the split bitmaps.
Any channels that do not have a prefix will be returned in the bitmap with the empty prefix.
- Returns:
Returns a list of (prefix, bitmap) pairs.
- convert(self, pixel_format: slangpy.Bitmap.PixelFormat | None = None, component_type: slangpy.DataStruct.Type | None = None, srgb_gamma: bool | None = None) slangpy.Bitmap ¶
- write(self, path: str | os.PathLike, format: slangpy.Bitmap.FileFormat = FileFormat.auto, quality: int = -1) None ¶
- write_async(self, path: str | os.PathLike, format: slangpy.Bitmap.FileFormat = FileFormat.auto, quality: int = -1) None ¶
- static read_multiple(paths: Sequence[str | os.PathLike], format: slangpy.Bitmap.FileFormat = FileFormat.auto) list[slangpy.Bitmap] ¶
Load a list of bitmaps from multiple paths. Uses multi-threading to load bitmaps in parallel.
- class slangpy.DataStruct¶
Base class:
slangpy.Object
Structured data definition.
This class is used to describe a structured data type layout. It is used by the DataStructConverter class to convert between different layouts.
- __init__(self, pack: bool = False, byte_order: slangpy.DataStruct.ByteOrder = ByteOrder.host) None ¶
Constructor.
- Parameter
pack
: If true, the struct will be packed.
- Parameter
byte_order
: Byte order of the struct.
- Parameter
- class Flags¶
Base class:
enum.IntFlag
Struct field flags.
- class Field¶
Struct field.
- property name: str¶
Name of the field.
- property type: slangpy.DataStruct.Type¶
Type of the field.
- property flags: slangpy.DataStruct.Flags¶
Field flags.
- property size: int¶
Size of the field in bytes.
- property offset: int¶
Offset of the field in bytes.
- property default_value: float¶
Default value.
- is_integer(self) bool ¶
Check if the field is an integer type.
- is_unsigned(self) bool ¶
Check if the field is an unsigned type.
- is_signed(self) bool ¶
Check if the field is a signed type.
- is_float(self) bool ¶
Check if the field is a floating point type.
- append(self, field: slangpy.DataStruct.Field) slangpy.DataStruct ¶
Append a field to the struct.
- append(self, name: str, type: slangpy.DataStruct.Type, flags: slangpy.DataStruct.Flags = 0, default_value: float = 0.0, blend: collections.abc.Sequence[tuple[float, str]] = []) slangpy.DataStruct
Append a field to the struct.
- Parameter
name
: Name of the field.
- Parameter
type
: Type of the field.
- Parameter
flags
: Field flags.
- Parameter
default_value
: Default value.
- Parameter
blend
: List of blend weights/names.
- Returns:
Reference to the struct.
- Parameter
- has_field(self, name: str) bool ¶
Check if a field with the specified name exists.
- field(self, name: str) slangpy.DataStruct.Field ¶
Access field by name. Throws if field is not found.
- property size: int¶
The size of the struct in bytes (with padding).
- property alignment: int¶
The alignment of the struct in bytes.
- property byte_order: slangpy.DataStruct.ByteOrder¶
The byte order of the struct.
- static type_size(arg: slangpy.DataStruct.Type, /) int ¶
Get the size of a type in bytes.
- static type_range(arg: slangpy.DataStruct.Type, /) tuple[float, float] ¶
Get the numeric range of a type.
- static is_integer(arg: slangpy.DataStruct.Type, /) bool ¶
Check if
type
is an integer type.
- static is_unsigned(arg: slangpy.DataStruct.Type, /) bool ¶
Check if
type
is an unsigned type.
- static is_signed(arg: slangpy.DataStruct.Type, /) bool ¶
Check if
type
is a signed type.
- static is_float(arg: slangpy.DataStruct.Type, /) bool ¶
Check if
type
is a floating point type.
- class slangpy.DataStructConverter¶
Base class:
slangpy.Object
Data struct converter.
This helper class can be used to convert between structs with different layouts.
- __init__(self, src: slangpy.DataStruct, dst: slangpy.DataStruct) None ¶
Constructor.
- Parameter
src
: Source struct definition.
- Parameter
dst
: Destination struct definition.
- Parameter
- property src: slangpy.DataStruct¶
The source struct definition.
- property dst: slangpy.DataStruct¶
The destination struct definition.
- convert(self, input: bytes) bytes ¶
- class slangpy.Timer¶
High resolution CPU timer.
- __init__(self) None ¶
- reset(self) None ¶
Reset the timer.
- elapsed_s(self) float ¶
Elapsed seconds since last reset.
- elapsed_ms(self) float ¶
Elapsed milliseconds since last reset.
- elapsed_us(self) float ¶
Elapsed microseconds since last reset.
- elapsed_ns(self) float ¶
Elapsed nanoseconds since last reset.
- static delta_s(start: int, end: int) float ¶
Compute elapsed seconds between two time points.
- static delta_ms(start: int, end: int) float ¶
Compute elapsed milliseconds between two time points.
- static delta_us(start: int, end: int) float ¶
Compute elapsed microseconds between two time points.
- static delta_ns(start: int, end: int) float ¶
Compute elapsed nanoseconds between two time points.
- static now() int ¶
Current time point in nanoseconds since epoch.
- class slangpy.SHA1¶
Helper to compute SHA-1 hash.
- __init__(self) None ¶
- __init__(self, data: bytes) None
- __init__(self, str: str) None
- update(self, data: bytes) slangpy.SHA1 ¶
Update hash by adding the given data.
- Parameter
data
: Data to hash.
- Parameter
len
: Length of data in bytes.
- Parameter
- update(self, str: str) slangpy.SHA1
Update hash by adding the given string.
- Parameter
str
: String to hash.
- Parameter
- digest(self) bytes ¶
Return the message digest.
- hex_digest(self) str ¶
Return the message digest as a hex string.
Constants¶
- slangpy.ALL_LAYERS: int = 4294967295¶
- slangpy.ALL_MIPS: int = 4294967295¶
- slangpy.SGL_BUILD_TYPE: str = "Release"¶
- slangpy.SGL_GIT_VERSION: str = "commit: d488b10 / branch: rename-struct (local changes)"¶
- slangpy.SGL_VERSION_MAJOR: int = 0¶
- slangpy.SGL_VERSION_MINOR: int = 27¶
- slangpy.SGL_VERSION_PATCH: int = 0¶
- slangpy.SGL_VERSION: str = "0.27.0"¶
Logging¶
- class slangpy.LogLevel¶
Base class:
enum.IntEnum
Log level.
- class slangpy.LogFrequency¶
Base class:
enum.Enum
Log frequency.
- always: LogFrequency = LogFrequency.always¶
- once: LogFrequency = LogFrequency.once¶
- class slangpy.Logger¶
Base class:
slangpy.Object
- __init__(self, level: slangpy.LogLevel = LogLevel.info, name: str = '', use_default_outputs: bool = True) None ¶
Constructor.
- Parameter
level
: The log level to use (messages with level >= this will be logged).
- Parameter
name
: The name of the logger.
- Parameter
use_default_outputs
: Whether to use the default outputs (console + debug console on windows).
- Parameter
- property level: slangpy.LogLevel¶
The log level.
- property name: str¶
The name of the logger.
- add_console_output(self, colored: bool = True) slangpy.LoggerOutput ¶
Add a console logger output.
- Parameter
colored
: Whether to use colored output.
- Returns:
The created logger output.
- Parameter
- add_file_output(self, path: str | os.PathLike) slangpy.LoggerOutput ¶
Add a file logger output.
- Parameter
path
: The path to the log file.
- Returns:
The created logger output.
- Parameter
- add_debug_console_output(self) slangpy.LoggerOutput ¶
Add a debug console logger output (Windows only).
- Returns:
The created logger output.
- add_output(self, output: slangpy.LoggerOutput) None ¶
Add a logger output.
- Parameter
output
: The logger output to add.
- Parameter
- use_same_outputs(self, other: slangpy.Logger) None ¶
Use the same outputs as the given logger.
- Parameter
other
: Logger to copy outputs from.
- Parameter
- remove_output(self, output: slangpy.LoggerOutput) None ¶
Remove a logger output.
- Parameter
output
: The logger output to remove.
- Parameter
- remove_all_outputs(self) None ¶
Remove all logger outputs.
- log(self, level: slangpy.LogLevel, msg: str, frequency: slangpy.LogFrequency = LogFrequency.always) None ¶
Log a message.
- Parameter
level
: The log level.
- Parameter
msg
: The message.
- Parameter
frequency
: The log frequency.
- Parameter
- debug(self, msg: str) None ¶
- info(self, msg: str) None ¶
- warn(self, msg: str) None ¶
- error(self, msg: str) None ¶
- fatal(self, msg: str) None ¶
- debug_once(self, msg: str) None ¶
- info_once(self, msg: str) None ¶
- warn_once(self, msg: str) None ¶
- error_once(self, msg: str) None ¶
- fatal_once(self, msg: str) None ¶
- static get() slangpy.Logger ¶
Returns the global logger instance.
- class slangpy.LoggerOutput¶
Base class:
slangpy.Object
Abstract base class for logger outputs.
- __init__(self) None ¶
- write(self, level: slangpy.LogLevel, name: str, msg: str) None ¶
Write a log message.
- Parameter
level
: The log level.
- Parameter
module
: The module name.
- Parameter
msg
: The message.
- Parameter
- class slangpy.ConsoleLoggerOutput¶
Base class:
slangpy.LoggerOutput
Logger output that writes to the console. Error messages are printed to stderr, all other messages to stdout. Messages are optionally colored.
- __init__(self, colored: bool = True) None ¶
- class slangpy.FileLoggerOutput¶
Base class:
slangpy.LoggerOutput
Logger output that writes to a file.
- __init__(self, path: str | os.PathLike) None ¶
- class slangpy.DebugConsoleLoggerOutput¶
Base class:
slangpy.LoggerOutput
Logger output that writes to the debug console (Windows only).
- __init__(self) None ¶
- slangpy.log(level: slangpy.LogLevel, msg: str, frequency: slangpy.LogFrequency = LogFrequency.always) None ¶
Log a message.
- Parameter
level
: The log level.
- Parameter
msg
: The message.
- Parameter
frequency
: The log frequency.
- Parameter
- slangpy.log_debug(msg: str) None ¶
- slangpy.log_debug_once(msg: str) None ¶
- slangpy.log_info(msg: str) None ¶
- slangpy.log_info_once(msg: str) None ¶
- slangpy.log_warn(msg: str) None ¶
- slangpy.log_warn_once(msg: str) None ¶
- slangpy.log_error(msg: str) None ¶
- slangpy.log_error_once(msg: str) None ¶
- slangpy.log_fatal(msg: str) None ¶
- slangpy.log_fatal_once(msg: str) None ¶
Windowing¶
- class slangpy.CursorMode¶
Base class:
enum.Enum
Mouse cursor modes.
- normal: CursorMode = CursorMode.normal¶
- disabled: CursorMode = CursorMode.disabled¶
- class slangpy.WindowMode¶
Base class:
enum.Enum
Window modes.
- normal: WindowMode = WindowMode.normal¶
- minimized: WindowMode = WindowMode.minimized¶
- fullscreen: WindowMode = WindowMode.fullscreen¶
- class slangpy.Window¶
Base class:
slangpy.Object
Window class.
Platform independent class for managing a window and handle input events.
- __init__(self, width: int = 1024, height: int = 1024, title: str = 'sgl', mode: slangpy.WindowMode = WindowMode.normal, resizable: bool = True) None ¶
Constructor.
- Parameter
width
: Width of the window in pixels.
- Parameter
height
: Height of the window in pixels.
- Parameter
title
: Title of the window.
- Parameter
mode
: Window mode.
- Parameter
resizable
: Whether the window is resizable.
- Parameter
- property width: int¶
The width of the window in pixels.
- property height: int¶
The height of the window in pixels.
- resize(self, width: int, height: int) None ¶
Resize the window.
- Parameter
width
: The new width of the window in pixels.
- Parameter
height
: The new height of the window in pixels.
- Parameter
- property title: str¶
The title of the window.
- close(self) None ¶
Close the window.
- should_close(self) bool ¶
True if the window should be closed.
- process_events(self) None ¶
Process any pending events.
- set_clipboard(self, text: str) None ¶
Set the clipboard content.
- get_clipboard(self) str | None ¶
Get the clipboard content.
- property cursor_mode: slangpy.CursorMode¶
The mouse cursor mode.
- property on_resize: collections.abc.Callable[[int, int], None]¶
Event handler to be called when the window is resized.
- property on_keyboard_event: collections.abc.Callable[[slangpy.KeyboardEvent], None]¶
Event handler to be called when a keyboard event occurs.
- property on_mouse_event: collections.abc.Callable[[slangpy.MouseEvent], None]¶
Event handler to be called when a mouse event occurs.
- property on_gamepad_event: collections.abc.Callable[[slangpy.GamepadEvent], None]¶
Event handler to be called when a gamepad event occurs.
- property on_gamepad_state: collections.abc.Callable[[slangpy.GamepadState], None]¶
Event handler to be called when the gamepad state changes.
- property on_drop_files: collections.abc.Callable[[list[str]], None]¶
Event handler to be called when files are dropped onto the window.
- class slangpy.MouseButton¶
Base class:
enum.Enum
Mouse buttons.
- left: MouseButton = MouseButton.left¶
- middle: MouseButton = MouseButton.middle¶
- right: MouseButton = MouseButton.right¶
- unknown: MouseButton = MouseButton.unknown¶
- class slangpy.KeyModifierFlags¶
Base class:
enum.Enum
Keyboard modifier flags.
- none: KeyModifierFlags = KeyModifierFlags.none¶
- shift: KeyModifierFlags = KeyModifierFlags.shift¶
- ctrl: KeyModifierFlags = KeyModifierFlags.ctrl¶
- alt: KeyModifierFlags = KeyModifierFlags.alt¶
- class slangpy.KeyModifier¶
Base class:
enum.Enum
Keyboard modifiers.
- shift: KeyModifier = KeyModifier.shift¶
- ctrl: KeyModifier = KeyModifier.ctrl¶
- alt: KeyModifier = KeyModifier.alt¶
- class slangpy.KeyboardEventType¶
Base class:
enum.Enum
Keyboard event types.
- key_press: KeyboardEventType = KeyboardEventType.key_press¶
- key_release: KeyboardEventType = KeyboardEventType.key_release¶
- key_repeat: KeyboardEventType = KeyboardEventType.key_repeat¶
- input: KeyboardEventType = KeyboardEventType.input¶
- class slangpy.KeyboardEvent¶
Keyboard event.
- property type: slangpy.KeyboardEventType¶
The event type.
- property key: slangpy.KeyCode¶
The key that was pressed/released/repeated.
- property mods: slangpy.KeyModifierFlags¶
Keyboard modifier flags.
- property codepoint: int¶
UTF-32 codepoint for input events.
- is_key_press(self) bool ¶
Returns true if this event is a key press event.
- is_key_release(self) bool ¶
Returns true if this event is a key release event.
- is_key_repeat(self) bool ¶
Returns true if this event is a key repeat event.
- is_input(self) bool ¶
Returns true if this event is an input event.
- has_modifier(self, arg: slangpy.KeyModifier, /) bool ¶
Returns true if the specified modifier is set.
- class slangpy.MouseEventType¶
Base class:
enum.Enum
Mouse event types.
- button_down: MouseEventType = MouseEventType.button_down¶
- button_up: MouseEventType = MouseEventType.button_up¶
- move: MouseEventType = MouseEventType.move¶
- scroll: MouseEventType = MouseEventType.scroll¶
- class slangpy.MouseEvent¶
Mouse event.
- property type: slangpy.MouseEventType¶
The event type.
- property pos: slangpy.math.float2¶
The mouse position.
- property scroll: slangpy.math.float2¶
The scroll offset.
- property button: slangpy.MouseButton¶
The mouse button that was pressed/released.
- property mods: slangpy.KeyModifierFlags¶
Keyboard modifier flags.
- is_button_down(self) bool ¶
Returns true if this event is a mouse button down event.
- is_button_up(self) bool ¶
Returns true if this event is a mouse button up event.
- is_move(self) bool ¶
Returns true if this event is a mouse move event.
- is_scroll(self) bool ¶
Returns true if this event is a mouse scroll event.
- has_modifier(self, arg: slangpy.KeyModifier, /) bool ¶
Returns true if the specified modifier is set.
- class slangpy.GamepadEventType¶
Base class:
enum.Enum
Gamepad event types.
- button_down: GamepadEventType = GamepadEventType.button_down¶
- button_up: GamepadEventType = GamepadEventType.button_up¶
- connect: GamepadEventType = GamepadEventType.connect¶
- disconnect: GamepadEventType = GamepadEventType.disconnect¶
- class slangpy.GamepadButton¶
Base class:
enum.Enum
Gamepad buttons.
- a: GamepadButton = GamepadButton.a¶
- b: GamepadButton = GamepadButton.b¶
- x: GamepadButton = GamepadButton.x¶
- y: GamepadButton = GamepadButton.y¶
- left_bumper: GamepadButton = GamepadButton.left_bumper¶
- right_bumper: GamepadButton = GamepadButton.right_bumper¶
- back: GamepadButton = GamepadButton.back¶
- start: GamepadButton = GamepadButton.start¶
- guide: GamepadButton = GamepadButton.guide¶
- left_thumb: GamepadButton = GamepadButton.left_thumb¶
- right_thumb: GamepadButton = GamepadButton.right_thumb¶
- up: GamepadButton = GamepadButton.up¶
- right: GamepadButton = GamepadButton.right¶
- down: GamepadButton = GamepadButton.down¶
- left: GamepadButton = GamepadButton.left¶
- class slangpy.GamepadEvent¶
Gamepad event.
- property type: slangpy.GamepadEventType¶
The event type.
- property button: slangpy.GamepadButton¶
The gamepad button that was pressed/released.
- is_button_down(self) bool ¶
Returns true if this event is a gamepad button down event.
- is_button_up(self) bool ¶
Returns true if this event is a gamepad button up event.
- is_connect(self) bool ¶
Returns true if this event is a gamepad connect event.
- is_disconnect(self) bool ¶
Returns true if this event is a gamepad disconnect event.
- class slangpy.GamepadState¶
Gamepad state.
- property left_x: float¶
X-axis of the left analog stick.
- property left_y: float¶
Y-axis of the left analog stick.
- property right_x: float¶
X-axis of the right analog stick.
- property right_y: float¶
Y-axis of the right analog stick.
- property left_trigger: float¶
Value of the left analog trigger.
- property right_trigger: float¶
Value of the right analog trigger.
- property buttons: int¶
Bitfield of gamepad buttons (see GamepadButton).
- is_button_down(self, arg: slangpy.GamepadButton, /) bool ¶
Returns true if the specified button is down.
Platform¶
- class slangpy.platform.FileDialogFilter¶
- __init__(self) None ¶
- __init__(self, name: str, pattern: str) None
- __init__(self, arg: tuple[str, str], /) None
- property name: str¶
Readable name (e.g. “JPEG”).
- property pattern: str¶
File extension pattern (e.g. “.jpg” or “.jpg,*.jpeg”).
- slangpy.platform.open_file_dialog(filters: collections.abc.Sequence[slangpy.platform.FileDialogFilter] = []) pathlib.Path | None ¶
Show a file open dialog.
- Parameter
filters
: List of file filters.
- Returns:
The selected file path or nothing if the dialog was cancelled.
- Parameter
- slangpy.platform.save_file_dialog(filters: collections.abc.Sequence[slangpy.platform.FileDialogFilter] = []) pathlib.Path | None ¶
Show a file save dialog.
- Parameter
filters
: List of file filters.
- Returns:
The selected file path or nothing if the dialog was cancelled.
- Parameter
- slangpy.platform.choose_folder_dialog() pathlib.Path | None ¶
Show a folder selection dialog.
- Returns:
The selected folder path or nothing if the dialog was cancelled.
- slangpy.platform.display_scale_factor() float ¶
The pixel scale factor of the primary display.
- slangpy.platform.executable_path() pathlib.Path ¶
The full path to the current executable.
- slangpy.platform.executable_directory() pathlib.Path ¶
The current executable directory.
- slangpy.platform.executable_name() str ¶
The current executable name.
- slangpy.platform.app_data_directory() pathlib.Path ¶
The application data directory.
- slangpy.platform.home_directory() pathlib.Path ¶
The home directory.
- slangpy.platform.project_directory() pathlib.Path ¶
The project source directory. Note that this is only valid during development.
- slangpy.platform.runtime_directory() pathlib.Path ¶
The runtime directory. This is the path where the sgl runtime library (sgl.dll, libsgl.so or libsgl.dynlib) resides.
- slangpy.platform.page_size: int = 65536¶
- class slangpy.platform.MemoryStats¶
- property rss: int¶
Current resident/working set size in bytes.
- property peak_rss: int¶
Peak resident/working set size in bytes.
- slangpy.platform.memory_stats() slangpy.platform.MemoryStats ¶
Get the current memory stats.
Threading¶
- slangpy.thread.wait_for_tasks() None ¶
Block until all scheduled tasks are completed.
Device¶
- class slangpy.AccelerationStructure¶
Base class:
slangpy.DeviceResource
- property desc: slangpy.AccelerationStructureDesc¶
- property handle: slangpy.AccelerationStructureHandle¶
- class slangpy.AccelerationStructureBuildDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property inputs: list[slangpy.AccelerationStructureBuildInputInstances | slangpy.AccelerationStructureBuildInputTriangles | slangpy.AccelerationStructureBuildInputProceduralPrimitives]¶
List of build inputs. All inputs must be of the same type.
- property motion_options: slangpy.AccelerationStructureBuildInputMotionOptions¶
- property mode: slangpy.AccelerationStructureBuildMode¶
- property flags: slangpy.AccelerationStructureBuildFlags¶
- class slangpy.AccelerationStructureBuildFlags¶
Base class:
enum.IntFlag
- none: AccelerationStructureBuildFlags = 0¶
- allow_update: AccelerationStructureBuildFlags = 1¶
- allow_compaction: AccelerationStructureBuildFlags = 2¶
- prefer_fast_trace: AccelerationStructureBuildFlags = 4¶
- prefer_fast_build: AccelerationStructureBuildFlags = 8¶
- minimize_memory: AccelerationStructureBuildFlags = 16¶
- class slangpy.AccelerationStructureBuildInputInstances¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property instance_buffer: slangpy.BufferOffsetPair¶
- property instance_stride: int¶
- property instance_count: int¶
- class slangpy.AccelerationStructureBuildInputMotionOptions¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property key_count: int¶
- property time_start: float¶
- property time_end: float¶
- class slangpy.AccelerationStructureBuildInputProceduralPrimitives¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property aabb_buffers: list[slangpy.BufferOffsetPair]¶
- property aabb_stride: int¶
- property primitive_count: int¶
- property flags: slangpy.AccelerationStructureGeometryFlags¶
- class slangpy.AccelerationStructureBuildInputTriangles¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property vertex_buffers: list[slangpy.BufferOffsetPair]¶
- property vertex_format: slangpy.Format¶
- property vertex_count: int¶
- property vertex_stride: int¶
- property index_buffer: slangpy.BufferOffsetPair¶
- property index_format: slangpy.IndexFormat¶
- property index_count: int¶
- property pre_transform_buffer: slangpy.BufferOffsetPair¶
- property flags: slangpy.AccelerationStructureGeometryFlags¶
- class slangpy.AccelerationStructureBuildMode¶
Base class:
enum.Enum
- build: AccelerationStructureBuildMode = AccelerationStructureBuildMode.build¶
- update: AccelerationStructureBuildMode = AccelerationStructureBuildMode.update¶
- class slangpy.AccelerationStructureCopyMode¶
Base class:
enum.Enum
- clone: AccelerationStructureCopyMode = AccelerationStructureCopyMode.clone¶
- compact: AccelerationStructureCopyMode = AccelerationStructureCopyMode.compact¶
- class slangpy.AccelerationStructureDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property size: int¶
- property label: str¶
- class slangpy.AccelerationStructureGeometryFlags¶
Base class:
enum.IntFlag
- none: AccelerationStructureGeometryFlags = 0¶
- opaque: AccelerationStructureGeometryFlags = 1¶
- no_duplicate_any_hit_invocation: AccelerationStructureGeometryFlags = 2¶
- class slangpy.AccelerationStructureInstanceDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property transform: slangpy.math.float3x4¶
- property instance_id: int¶
- property instance_mask: int¶
- property instance_contribution_to_hit_group_index: int¶
- property flags: slangpy.AccelerationStructureInstanceFlags¶
- property acceleration_structure: slangpy.AccelerationStructureHandle¶
- to_numpy(self) numpy.ndarray[dtype=uint8, shape=(64), writable=False] ¶
- class slangpy.AccelerationStructureInstanceFlags¶
Base class:
enum.IntFlag
- none: AccelerationStructureInstanceFlags = 0¶
- triangle_facing_cull_disable: AccelerationStructureInstanceFlags = 1¶
- triangle_front_counter_clockwise: AccelerationStructureInstanceFlags = 2¶
- force_opaque: AccelerationStructureInstanceFlags = 4¶
- no_opaque: AccelerationStructureInstanceFlags = 8¶
- class slangpy.AccelerationStructureInstanceList¶
Base class:
slangpy.DeviceResource
- property size: int¶
- property instance_stride: int¶
- resize(self, size: int) None ¶
- write(self, index: int, instance: slangpy.AccelerationStructureInstanceDesc) None ¶
- write(self, index: int, instances: Sequence[slangpy.AccelerationStructureInstanceDesc]) None
- buffer(self) slangpy.Buffer ¶
- build_input_instances(self) slangpy.AccelerationStructureBuildInputInstances ¶
- class slangpy.AccelerationStructureQueryDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property query_type: slangpy.QueryType¶
- property query_pool: slangpy.QueryPool¶
- property first_query_index: int¶
- class slangpy.AccelerationStructureSizes¶
- property acceleration_structure_size: int¶
- property scratch_size: int¶
- property update_scratch_size: int¶
- class slangpy.AdapterInfo¶
- property name: str¶
Descriptive name of the adapter.
- property vendor_id: int¶
Unique identifier for the vendor (only available for D3D12 and Vulkan).
- property device_id: int¶
Unique identifier for the physical device among devices from the vendor (only available for D3D12 and Vulkan).
- property luid: list[int]¶
Logically unique identifier of the adapter.
- class slangpy.AspectBlendDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property src_factor: slangpy.BlendFactor¶
- property dst_factor: slangpy.BlendFactor¶
- property op: slangpy.BlendOp¶
- class slangpy.BaseReflectionObject¶
Base class:
slangpy.Object
- property is_valid: bool¶
- class slangpy.BlendFactor¶
Base class:
enum.Enum
- zero: BlendFactor = BlendFactor.zero¶
- one: BlendFactor = BlendFactor.one¶
- src_color: BlendFactor = BlendFactor.src_color¶
- inv_src_color: BlendFactor = BlendFactor.inv_src_color¶
- src_alpha: BlendFactor = BlendFactor.src_alpha¶
- inv_src_alpha: BlendFactor = BlendFactor.inv_src_alpha¶
- dest_alpha: BlendFactor = BlendFactor.dest_alpha¶
- inv_dest_alpha: BlendFactor = BlendFactor.inv_dest_alpha¶
- dest_color: BlendFactor = BlendFactor.dest_color¶
- inv_dest_color: BlendFactor = BlendFactor.inv_dest_color¶
- src_alpha_saturate: BlendFactor = BlendFactor.src_alpha_saturate¶
- blend_color: BlendFactor = BlendFactor.blend_color¶
- inv_blend_color: BlendFactor = BlendFactor.inv_blend_color¶
- secondary_src_color: BlendFactor = BlendFactor.secondary_src_color¶
- inv_secondary_src_color: BlendFactor = BlendFactor.inv_secondary_src_color¶
- secondary_src_alpha: BlendFactor = BlendFactor.secondary_src_alpha¶
- inv_secondary_src_alpha: BlendFactor = BlendFactor.inv_secondary_src_alpha¶
- class slangpy.Buffer¶
Base class:
slangpy.Resource
- property desc: slangpy.BufferDesc¶
- property size: int¶
- property struct_size: int¶
- property device_address: int¶
Get the shared resource handle.
- to_numpy(self) numpy.ndarray[] ¶
- copy_from_numpy(self, data: numpy.ndarray[]) None ¶
- to_torch(self, type: slangpy.DataType = DataType.void, shape: collections.abc.Sequence[int] = [], strides: collections.abc.Sequence[int] = [], offset: int = 0) torch.Tensor[device='cuda'] ¶
- class slangpy.BufferCursor¶
Base class:
slangpy.Object
Represents a list of elements in a block of memory, and provides simple interface to get a BufferElementCursor for each one. As this can be the owner of its data, it is a ref counted object that elements refer to.
- __init__(self, element_layout: slangpy.TypeLayoutReflection, size: int) None ¶
- __init__(self, element_layout: slangpy.TypeLayoutReflection, buffer_resource: slangpy.Buffer, load_before_write: bool = True) None
- __init__(self, element_layout: slangpy.TypeLayoutReflection, buffer_resource: slangpy.Buffer, size: int, offset: int, load_before_write: bool = True) None
- property element_type_layout: slangpy.TypeLayoutReflection¶
Get type layout of an element of the cursor.
- property element_type: slangpy.TypeReflection¶
Get type of an element of the cursor.
- find_element(self, index: int) slangpy.BufferElementCursor ¶
Get element at a given index.
- property element_count: int¶
Number of elements in the buffer.
- property element_size: int¶
Size of element.
- property element_stride: int¶
Stride of elements.
- property size: int¶
Size of whole buffer.
- property is_loaded: bool¶
Check if internal buffer exists.
- load(self) None ¶
In case of GPU only buffers, loads all data from GPU.
- apply(self) None ¶
In case of GPU only buffers, pushes all data to the GPU.
- property resource: slangpy.Buffer¶
Get the resource this cursor represents (if any).
- to_numpy(self) numpy.ndarray[] ¶
- copy_from_numpy(self, data: numpy.ndarray[]) None ¶
- class slangpy.BufferDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property size: int¶
Buffer size in bytes.
- property struct_size: int¶
Struct size in bytes.
- property format: slangpy.Format¶
Buffer format. Used when creating typed buffer views.
- property memory_type: slangpy.MemoryType¶
Memory type.
- property usage: slangpy.BufferUsage¶
Resource usage flags.
- property default_state: slangpy.ResourceState¶
Initial resource state.
- property label: str¶
Debug label.
- class slangpy.BufferElementCursor¶
Represents a single element of a given type in a block of memory, and provides read/write tools to access its members via reflection.
- set_data(self, data: ndarray[device='cpu']) None ¶
- set_data(self, data: ndarray[device='cpu']) None
- is_valid(self) bool ¶
N/A
- find_field(self, name: str) slangpy.BufferElementCursor ¶
N/A
- find_element(self, index: int) slangpy.BufferElementCursor ¶
N/A
- has_field(self, name: str) bool ¶
N/A
- has_element(self, index: int) bool ¶
N/A
- read(self) object ¶
N/A
- write(self, val: object) None ¶
N/A
- class slangpy.BufferOffsetPair¶
- __init__(self) None ¶
- __init__(self, buffer: slangpy.Buffer) None
- __init__(self, buffer: slangpy.Buffer, offset: int = 0) None
- __init__(self, arg: dict, /) None
- property buffer: slangpy.Buffer¶
- property offset: int¶
- class slangpy.BufferUsage¶
Base class:
enum.IntFlag
- none: BufferUsage = 0¶
- vertex_buffer: BufferUsage = 1¶
- index_buffer: BufferUsage = 2¶
- constant_buffer: BufferUsage = 4¶
- shader_resource: BufferUsage = 8¶
- unordered_access: BufferUsage = 16¶
- indirect_argument: BufferUsage = 32¶
- copy_source: BufferUsage = 64¶
- copy_destination: BufferUsage = 128¶
- acceleration_structure: BufferUsage = 256¶
- acceleration_structure_build_input: BufferUsage = 512¶
- shader_table: BufferUsage = 1024¶
- class slangpy.ColorTargetDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property format: slangpy.Format¶
- property color: slangpy.AspectBlendDesc¶
- property alpha: slangpy.AspectBlendDesc¶
- property write_mask: slangpy.RenderTargetWriteMask¶
- property enable_blend: bool¶
- property logic_op: slangpy.LogicOp¶
- class slangpy.CommandBuffer¶
Base class:
slangpy.DeviceResource
- class slangpy.CommandEncoder¶
Base class:
slangpy.DeviceResource
- begin_render_pass(self, desc: slangpy.RenderPassDesc) slangpy.RenderPassEncoder ¶
- begin_compute_pass(self) slangpy.ComputePassEncoder ¶
- begin_ray_tracing_pass(self) slangpy.RayTracingPassEncoder ¶
- copy_buffer(self, dst: slangpy.Buffer, dst_offset: int, src: slangpy.Buffer, src_offset: int, size: int) None ¶
Copy a buffer region.
- Parameter
dst
: Destination buffer.
- Parameter
dst_offset
: Destination offset in bytes.
- Parameter
src
: Source buffer.
- Parameter
src_offset
: Source offset in bytes.
- Parameter
size
: Size in bytes.
- Parameter
- copy_texture(self, dst: slangpy.Texture, dst_subresource_range: slangpy.SubresourceRange, dst_offset: slangpy.math.uint3, src: slangpy.Texture, src_subresource_range: slangpy.SubresourceRange, src_offset: slangpy.math.uint3, extent: slangpy.math.uint3 = {4294967295, 4294967295, 4294967295}) None ¶
Copy a texture region.
- Parameter
dst
: Destination texture.
- Parameter
dst_subresource_range
: Destination subresource range.
- Parameter
dst_offset
: Destination offset in texels.
- Parameter
src
: Source texture.
- Parameter
src_subresource_range
: Source subresource range.
- Parameter
src_offset
: Source offset in texels.
- Parameter
extent
: Size in texels (-1 for maximum possible size).
- Parameter
- copy_texture(self, dst: slangpy.Texture, dst_layer: int, dst_mip: int, dst_offset: slangpy.math.uint3, src: slangpy.Texture, src_layer: int, src_mip: int, src_offset: slangpy.math.uint3, extent: slangpy.math.uint3 = {4294967295, 4294967295, 4294967295}) None
Copy a texture region.
- Parameter
dst
: Destination texture.
- Parameter
dst_layer
: Destination layer.
- Parameter
dst_mip
: Destination mip level.
- Parameter
dst_offset
: Destination offset in texels.
- Parameter
src
: Source texture.
- Parameter
src_layer
: Source layer.
- Parameter
src_mip
: Source mip level.
- Parameter
src_offset
: Source offset in texels.
- Parameter
extent
: Size in texels (-1 for maximum possible size).
- Parameter
- copy_texture_to_buffer(self, dst: slangpy.Buffer, dst_offset: int, dst_size: int, dst_row_pitch: int, src: slangpy.Texture, src_layer: int, src_mip: int, src_offset: slangpy.math.uint3 = {0, 0, 0}, extent: slangpy.math.uint3 = {4294967295, 4294967295, 4294967295}) None ¶
Copy a texture to a buffer.
- Parameter
dst
: Destination buffer.
- Parameter
dst_offset
: Destination offset in bytes.
- Parameter
dst_size
: Destination size in bytes.
- Parameter
dst_row_pitch
: Destination row stride in bytes.
- Parameter
src
: Source texture.
- Parameter
src_layer
: Source layer.
- Parameter
src_mip
: Source mip level.
- Parameter
src_offset
: Source offset in texels.
- Parameter
extent
: Extent in texels (-1 for maximum possible extent).
- Parameter
- copy_buffer_to_texture(self, dst: slangpy.Texture, dst_layer: int, dst_mip: int, dst_offset: slangpy.math.uint3, src: slangpy.Buffer, src_offset: int, src_size: int, src_row_pitch: int, extent: slangpy.math.uint3 = {4294967295, 4294967295, 4294967295}) None ¶
Copy a buffer to a texture.
- Parameter
dst
: Destination texture.
- Parameter
dst_layer
: Destination layer.
- Parameter
dst_mip
: Destination mip level.
- Parameter
dst_offset
: Destination offset in texels.
- Parameter
src
: Source buffer.
- Parameter
src_offset
: Source offset in bytes.
- Parameter
src_size
: Size in bytes.
- Parameter
src_row_pitch
: Source row stride in bytes.
- Parameter
extent
: Extent in texels (-1 for maximum possible extent).
- Parameter
- upload_buffer_data(self, buffer: slangpy.Buffer, offset: int, data: numpy.ndarray[]) None ¶
- upload_texture_data(self, texture: slangpy.Texture, layer: int, mip: int, data: numpy.ndarray[]) None ¶
- upload_texture_data(self, texture: slangpy.Texture, offset: slangpy.math.uint3, extent: slangpy.math.uint3, range: slangpy.SubresourceRange, subresource_data: Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, offset: slangpy.math.uint3, extent: slangpy.math.uint3, range: slangpy.SubresourceRange, subresource_data: Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, range: slangpy.SubresourceRange, subresource_data: Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, subresource_data: Sequence[numpy.ndarray[]]) None
- clear_buffer(self, buffer: slangpy.Buffer, range: slangpy.BufferRange = BufferRange(offset=0, size=18446744073709551615) None ¶
- clear_texture_float(self, texture: slangpy.Texture, range: slangpy.SubresourceRange = SubresourceRange(layer=0, layer_count=4294967295, mip=0, mip_count=4294967295, clear_value: slangpy.math.float4 = {0, 0, 0, 0}) None ¶
- clear_texture_uint(self, texture: slangpy.Texture, range: slangpy.SubresourceRange = SubresourceRange(layer=0, layer_count=4294967295, mip=0, mip_count=4294967295, clear_value: slangpy.math.uint4 = {0, 0, 0, 0}) None ¶
- clear_texture_sint(self, texture: slangpy.Texture, range: slangpy.SubresourceRange = SubresourceRange(layer=0, layer_count=4294967295, mip=0, mip_count=4294967295, clear_value: slangpy.math.int4 = {0, 0, 0, 0}) None ¶
- clear_texture_depth_stencil(self, texture: slangpy.Texture, range: slangpy.SubresourceRange = SubresourceRange(layer=0, layer_count=4294967295, mip=0, mip_count=4294967295, clear_depth: bool = True, depth_value: float = 0.0, clear_stencil: bool = True, stencil_value: int = 0) None ¶
- blit(self, dst: slangpy.TextureView, src: slangpy.TextureView, filter: slangpy.TextureFilteringMode = TextureFilteringMode.linear) None ¶
Blit a texture view.
Blits the full extent of the source texture to the destination texture.
- Parameter
dst
: View of the destination texture.
- Parameter
src
: View of the source texture.
- Parameter
filter
: Filtering mode to use.
- Parameter
- blit(self, dst: slangpy.Texture, src: slangpy.Texture, filter: slangpy.TextureFilteringMode = TextureFilteringMode.linear) None
Blit a texture.
Blits the full extent of the source texture to the destination texture.
- Parameter
dst
: Destination texture.
- Parameter
src
: Source texture.
- Parameter
filter
: Filtering mode to use.
- Parameter
- resolve_query(self, query_pool: slangpy.QueryPool, index: int, count: int, buffer: slangpy.Buffer, offset: int) None ¶
- build_acceleration_structure(self, desc: slangpy.AccelerationStructureBuildDesc, dst: slangpy.AccelerationStructure, src: slangpy.AccelerationStructure | None, scratch_buffer: slangpy.BufferOffsetPair, queries: Sequence[slangpy.AccelerationStructureQueryDesc] = []) None ¶
- copy_acceleration_structure(self, src: slangpy.AccelerationStructure, dst: slangpy.AccelerationStructure, mode: slangpy.AccelerationStructureCopyMode) None ¶
- query_acceleration_structure_properties(self, acceleration_structures: Sequence[slangpy.AccelerationStructure], queries: Sequence[slangpy.AccelerationStructureQueryDesc]) None ¶
- serialize_acceleration_structure(self, dst: slangpy.BufferOffsetPair, src: slangpy.AccelerationStructure) None ¶
- deserialize_acceleration_structure(self, dst: slangpy.AccelerationStructure, src: slangpy.BufferOffsetPair) None ¶
- set_buffer_state(self, buffer: slangpy.Buffer, state: slangpy.ResourceState) None ¶
Transition resource state of a buffer and add a barrier if state has changed.
- Parameter
buffer
: Buffer
- Parameter
state
: New state
- Parameter
- set_texture_state(self, texture: slangpy.Texture, state: slangpy.ResourceState) None ¶
Transition resource state of a texture and add a barrier if state has changed.
- Parameter
texture
: Texture
- Parameter
state
: New state
- Parameter
- set_texture_state(self, texture: slangpy.Texture, range: slangpy.SubresourceRange, state: slangpy.ResourceState) None
- push_debug_group(self, name: str, color: slangpy.math.float3) None ¶
Push a debug group.
- pop_debug_group(self) None ¶
Pop a debug group.
- insert_debug_marker(self, name: str, color: slangpy.math.float3) None ¶
Insert a debug marker.
- Parameter
name
: Name of the marker.
- Parameter
color
: Color of the marker.
- Parameter
- write_timestamp(self, query_pool: slangpy.QueryPool, index: int) None ¶
Write a timestamp.
- Parameter
query_pool
: Query pool.
- Parameter
index
: Index of the query.
- Parameter
- finish(self) slangpy.CommandBuffer ¶
- property native_handle: slangpy.NativeHandle¶
- class slangpy.CommandQueueType¶
Base class:
enum.Enum
- graphics: CommandQueueType = CommandQueueType.graphics¶
- class slangpy.ComparisonFunc¶
Base class:
enum.Enum
- never: ComparisonFunc = ComparisonFunc.never¶
- less: ComparisonFunc = ComparisonFunc.less¶
- equal: ComparisonFunc = ComparisonFunc.equal¶
- less_equal: ComparisonFunc = ComparisonFunc.less_equal¶
- greater: ComparisonFunc = ComparisonFunc.greater¶
- not_equal: ComparisonFunc = ComparisonFunc.not_equal¶
- greater_equal: ComparisonFunc = ComparisonFunc.greater_equal¶
- always: ComparisonFunc = ComparisonFunc.always¶
- class slangpy.ComputeKernel¶
Base class:
slangpy.Kernel
- property pipeline: slangpy.ComputePipeline¶
- dispatch(self, thread_count: slangpy.math.uint3, vars: dict = {}, command_encoder: slangpy.CommandEncoder | None = None, **kwargs) None ¶
- class slangpy.ComputeKernelDesc¶
- __init__(self) None ¶
- property program: slangpy.ShaderProgram¶
- class slangpy.ComputePassEncoder¶
Base class:
slangpy.PassEncoder
- bind_pipeline(self, pipeline: slangpy.ComputePipeline) slangpy.ShaderObject ¶
- bind_pipeline(self, pipeline: slangpy.ComputePipeline, root_object: slangpy.ShaderObject) None
- dispatch(self, thread_count: slangpy.math.uint3) None ¶
- dispatch_compute(self, thread_group_count: slangpy.math.uint3) None ¶
- dispatch_compute_indirect(self, arg_buffer: slangpy.BufferOffsetPair) None ¶
- class slangpy.ComputePipeline¶
Base class:
slangpy.Pipeline
Compute pipeline.
- property thread_group_size: slangpy.math.uint3¶
Thread group size. Used to determine the number of thread groups to dispatch.
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: ID3D12PipelineState* - Vulkan: VkPipeline
- class slangpy.ComputePipelineDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- class slangpy.CoopVecMatrixDesc¶
- __init__(self) None ¶
- __init__(self, rows: int, cols: int, element_type: slangpy.DataType, layout: slangpy.CoopVecMatrixLayout, size: int, offset: int) None
- property rows: int¶
- property cols: int¶
- property element_type: slangpy.DataType¶
- property layout: slangpy.CoopVecMatrixLayout¶
- property size: int¶
- property offset: int¶
- class slangpy.CoopVecMatrixLayout¶
Base class:
enum.Enum
- row_major: CoopVecMatrixLayout = CoopVecMatrixLayout.row_major¶
- column_major: CoopVecMatrixLayout = CoopVecMatrixLayout.column_major¶
- inferencing_optimal: CoopVecMatrixLayout = CoopVecMatrixLayout.inferencing_optimal¶
- training_optimal: CoopVecMatrixLayout = CoopVecMatrixLayout.training_optimal¶
- class slangpy.DeclReflection¶
Base class:
slangpy.BaseReflectionObject
- property kind: slangpy.DeclReflection.Kind¶
Decl kind (struct/function/module/generic/variable).
- property children: slangpy.DeclReflectionChildList¶
List of children of this cursor.
- property child_count: int¶
Get number of children.
- property name: str¶
- children_of_kind(self, kind: slangpy.DeclReflection.Kind) slangpy.DeclReflectionIndexedChildList ¶
List of children of this cursor of a specific kind.
- as_type(self) slangpy.TypeReflection ¶
Get type corresponding to this decl ref.
- as_variable(self) slangpy.VariableReflection ¶
Get variable corresponding to this decl ref.
- as_function(self) slangpy.FunctionReflection ¶
Get function corresponding to this decl ref.
- find_children_of_kind(self, kind: slangpy.DeclReflection.Kind, child_name: str) slangpy.DeclReflectionIndexedChildList ¶
Finds all children of a specific kind with a given name. Note: Only supported for types, functions and variables.
- find_first_child_of_kind(self, kind: slangpy.DeclReflection.Kind, child_name: str) slangpy.DeclReflection ¶
Finds the first child of a specific kind with a given name. Note: Only supported for types, functions and variables.
- class slangpy.DeclReflectionChildList¶
DeclReflection lazy child list evaluation.
- class slangpy.DeclReflectionIndexedChildList¶
DeclReflection lazy search result evaluation.
- class slangpy.DepthStencilDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property format: slangpy.Format¶
- property depth_test_enable: bool¶
- property depth_write_enable: bool¶
- property depth_func: slangpy.ComparisonFunc¶
- property stencil_enable: bool¶
- property stencil_read_mask: int¶
- property stencil_write_mask: int¶
- property front_face: slangpy.DepthStencilOpDesc¶
- property back_face: slangpy.DepthStencilOpDesc¶
- class slangpy.DepthStencilOpDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property stencil_fail_op: slangpy.StencilOp¶
- property stencil_depth_fail_op: slangpy.StencilOp¶
- property stencil_pass_op: slangpy.StencilOp¶
- property stencil_func: slangpy.ComparisonFunc¶
- class slangpy.Device¶
Base class:
slangpy.Object
- __init__(self, type: slangpy.DeviceType = DeviceType.automatic, enable_debug_layers: bool = False, enable_cuda_interop: bool = False, enable_print: bool = False, enable_hot_reload: bool = True, adapter_luid: collections.abc.Sequence[int] | None = None, compiler_options: slangpy.SlangCompilerOptions | None = None, shader_cache_path: str | os.PathLike | None = None) None ¶
- __init__(self, desc: slangpy.DeviceDesc) None
- property desc: slangpy.DeviceDesc¶
- property info: slangpy.DeviceInfo¶
Device information.
- property shader_cache_stats: slangpy.ShaderCacheStats¶
Shader cache statistics.
- property supported_shader_model: slangpy.ShaderModel¶
The highest shader model supported by the device.
- property features: list[slangpy.Feature]¶
List of features supported by the device.
- property supports_cuda_interop: bool¶
True if the device supports CUDA interoperability.
- property native_handles: list[slangpy.NativeHandle]¶
Returns the native API handle: - D3D12: ID3D12Device* (0) - Vulkan: VkInstance (0), VkPhysicalDevice (1), VkDevice (2)
- has_feature(self, feature: slangpy.Feature) bool ¶
Check if the device supports a given feature.
- get_format_support(self, format: slangpy.Format) slangpy.FormatSupport ¶
Returns the supported resource states for a given format.
- property slang_session: slangpy.SlangSession¶
Default slang session.
- close(self) None ¶
Close the device.
This function should be called before the device is released. It waits for all pending work to be completed and releases internal resources, removing all cyclic references that might prevent the device from being destroyed. After closing the device, no new resources must be created and no new work must be submitted.
note The Python extension will automatically close all open devices when the interpreter is terminated through an atexit handler. If a device is to be destroyed at runtime, it must be closed explicitly.
- create_surface(self, window: slangpy.Window) slangpy.Surface ¶
Create a new surface.
- Parameter
window
: Window to create the surface for.
- Returns:
New surface object.
- Parameter
- create_surface(self, window_handle: slangpy.WindowHandle) slangpy.Surface
Create a new surface.
- Parameter
window_handle
: Native window handle to create the surface for.
- Returns:
New surface object.
- Parameter
- create_buffer(self, size: int = 0, element_count: int = 0, struct_size: int = 0, struct_type: object | None = None, format: slangpy.Format = Format.undefined, memory_type: slangpy.MemoryType = MemoryType.device_local, usage: slangpy.BufferUsage = 0, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Buffer ¶
Create a new buffer.
- Parameter
size
: Buffer size in bytes.
- Parameter
element_count
: Buffer size in number of struct elements. Can be used instead of
size
.- Parameter
struct_size
: Struct size in bytes.
- Parameter
struct_type
: Struct type. Can be used instead of
struct_size
to specify the size of the struct.- Parameter
format
: Buffer format. Used when creating typed buffer views.
- Parameter
initial_state
: Initial resource state.
- Parameter
usage
: Resource usage flags.
- Parameter
memory_type
: Memory type.
- Parameter
label
: Debug label.
- Parameter
data
: Initial data to upload to the buffer.
- Parameter
data_size
: Size of the initial data in bytes.
- Returns:
New buffer object.
- Parameter
- create_buffer(self, desc: slangpy.BufferDesc) slangpy.Buffer
- create_texture(self, type: slangpy.TextureType = TextureType.texture_2d, format: slangpy.Format = Format.undefined, width: int = 1, height: int = 1, depth: int = 1, array_length: int = 1, mip_count: int = 1, sample_count: int = 1, sample_quality: int = 0, memory_type: slangpy.MemoryType = MemoryType.device_local, usage: slangpy.TextureUsage = 0, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Texture ¶
Create a new texture.
- Parameter
type
: Texture type.
- Parameter
format
: Texture format.
- Parameter
width
: Width in pixels.
- Parameter
height
: Height in pixels.
- Parameter
depth
: Depth in pixels.
- Parameter
array_length
: Array length.
- Parameter
mip_count
: Mip level count. Number of mip levels (ALL_MIPS for all mip levels).
- Parameter
sample_count
: Number of samples for multisampled textures.
- Parameter
quality
: Quality level for multisampled textures.
- Parameter
usage
: Resource usage.
- Parameter
memory_type
: Memory type.
- Parameter
label
: Debug label.
- Parameter
data
: Initial data.
- Returns:
New texture object.
- Parameter
- create_texture(self, desc: slangpy.TextureDesc) slangpy.Texture
- create_sampler(self, min_filter: slangpy.TextureFilteringMode = TextureFilteringMode.linear, mag_filter: slangpy.TextureFilteringMode = TextureFilteringMode.linear, mip_filter: slangpy.TextureFilteringMode = TextureFilteringMode.linear, reduction_op: slangpy.TextureReductionOp = TextureReductionOp.average, address_u: slangpy.TextureAddressingMode = TextureAddressingMode.wrap, address_v: slangpy.TextureAddressingMode = TextureAddressingMode.wrap, address_w: slangpy.TextureAddressingMode = TextureAddressingMode.wrap, mip_lod_bias: float = 0.0, max_anisotropy: int = 1, comparison_func: slangpy.ComparisonFunc = ComparisonFunc.never, border_color: slangpy.math.float4 = {1, 1, 1, 1}, min_lod: float = -1000.0, max_lod: float = 1000.0, label: str = '') slangpy.Sampler ¶
Create a new sampler.
- Parameter
min_filter
: Minification filter.
- Parameter
mag_filter
: Magnification filter.
- Parameter
mip_filter
: Mip-map filter.
- Parameter
reduction_op
: Reduction operation.
- Parameter
address_u
: Texture addressing mode for the U coordinate.
- Parameter
address_v
: Texture addressing mode for the V coordinate.
- Parameter
address_w
: Texture addressing mode for the W coordinate.
- Parameter
mip_lod_bias
: Mip-map LOD bias.
- Parameter
max_anisotropy
: Maximum anisotropy.
- Parameter
comparison_func
: Comparison function.
- Parameter
border_color
: Border color.
- Parameter
min_lod
: Minimum LOD level.
- Parameter
max_lod
: Maximum LOD level.
- Parameter
label
: Debug label.
- Returns:
New sampler object.
- Parameter
- create_sampler(self, desc: slangpy.SamplerDesc) slangpy.Sampler
- create_fence(self, initial_value: int = 0, shared: bool = False) slangpy.Fence ¶
Create a new fence.
- Parameter
initial_value
: Initial fence value.
- Parameter
shared
: Create a shared fence.
- Returns:
New fence object.
- Parameter
- create_fence(self, desc: slangpy.FenceDesc) slangpy.Fence
- create_query_pool(self, type: slangpy.QueryType, count: int) slangpy.QueryPool ¶
Create a new query pool.
- Parameter
type
: Query type.
- Parameter
count
: Number of queries in the pool.
- Returns:
New query pool object.
- Parameter
- create_input_layout(self, input_elements: collections.abc.Sequence[slangpy.InputElementDesc], vertex_streams: collections.abc.Sequence[slangpy.VertexStreamDesc]) slangpy.InputLayout ¶
Create a new input layout.
- Parameter
input_elements
: List of input elements (see InputElementDesc for details).
- Parameter
vertex_streams
: List of vertex streams (see VertexStreamDesc for details).
- Returns:
New input layout object.
- Parameter
- create_input_layout(self, desc: slangpy.InputLayoutDesc) slangpy.InputLayout
- create_command_encoder(self, queue: slangpy.CommandQueueType = CommandQueueType.graphics) slangpy.CommandEncoder ¶
- submit_command_buffers(self, command_buffers: Sequence[slangpy.CommandBuffer], wait_fences: Sequence[slangpy.Fence] = [], wait_fence_values: Sequence[int] = [], signal_fences: Sequence[slangpy.Fence] = [], signal_fence_values: Sequence[int] = [], queue: slangpy.CommandQueueType = CommandQueueType.graphics) int ¶
- submit_command_buffer(self, command_buffer: slangpy.CommandBuffer, queue: slangpy.CommandQueueType = CommandQueueType.graphics) int ¶
Submit a command buffer to the device.
The returned submission ID can be used to wait for the command buffer to complete.
- Parameter
command_buffer
: Command buffer to submit.
- Parameter
queue
: Command queue to submit to.
- Returns:
Submission ID.
- Parameter
- is_submit_finished(self, id: int) bool ¶
Check if a command buffer is complete.
- Parameter
id
: Submission ID.
- Returns:
True if the command buffer is complete.
- Parameter
- wait_for_submit(self, id: int) None ¶
Wait for a command buffer to complete.
- Parameter
id
: Submission ID.
- Parameter
- wait_for_idle(self, queue: slangpy.CommandQueueType = CommandQueueType.graphics) None ¶
Wait for the command queue to be idle.
- Parameter
queue
: Command queue to wait for.
- Parameter
- sync_to_cuda(self, cuda_stream: int = 0) None ¶
Synchronize CUDA -> device.
This signals a shared CUDA semaphore from the CUDA stream and then waits for the signal on the command queue.
- Parameter
cuda_stream
: CUDA stream
- Parameter
- sync_to_device(self, cuda_stream: int = 0) None ¶
Synchronize device -> CUDA.
This waits for a shared CUDA semaphore on the CUDA stream, making sure all commands on the device have completed.
- Parameter
cuda_stream
: CUDA stream
- Parameter
- get_acceleration_structure_sizes(self, desc: slangpy.AccelerationStructureBuildDesc) slangpy.AccelerationStructureSizes ¶
Query the device for buffer sizes required for acceleration structure builds.
- Parameter
desc
: Acceleration structure build description.
- Returns:
Acceleration structure sizes.
- Parameter
- create_acceleration_structure(self, size: int = 0, label: str = '') slangpy.AccelerationStructure ¶
- create_acceleration_structure(self, desc: slangpy.AccelerationStructureDesc) slangpy.AccelerationStructure
- create_acceleration_structure_instance_list(self, size: int) slangpy.AccelerationStructureInstanceList ¶
- create_shader_table(self, program: slangpy.ShaderProgram, ray_gen_entry_points: collections.abc.Sequence[str] = [], miss_entry_points: collections.abc.Sequence[str] = [], hit_group_names: collections.abc.Sequence[str] = [], callable_entry_points: collections.abc.Sequence[str] = []) slangpy.ShaderTable ¶
- create_shader_table(self, desc: slangpy.ShaderTableDesc) slangpy.ShaderTable
- create_slang_session(self, compiler_options: slangpy.SlangCompilerOptions | None = None, add_default_include_paths: bool = True, cache_path: str | os.PathLike | None = None) slangpy.SlangSession ¶
Create a new slang session.
- Parameter
compiler_options
: Compiler options (see SlangCompilerOptions for details).
- Returns:
New slang session object.
- Parameter
- reload_all_programs(self) None ¶
- load_module(self, module_name: str) slangpy.SlangModule ¶
- load_module_from_source(self, module_name: str, source: str, path: str | os.PathLike | None = None) slangpy.SlangModule ¶
- link_program(self, modules: collections.abc.Sequence[slangpy.SlangModule], entry_points: collections.abc.Sequence[slangpy.SlangEntryPoint], link_options: slangpy.SlangLinkOptions | None = None) slangpy.ShaderProgram ¶
- load_program(self, module_name: str, entry_point_names: collections.abc.Sequence[str], additional_source: str | None = None, link_options: slangpy.SlangLinkOptions | None = None) slangpy.ShaderProgram ¶
- create_root_shader_object(self, shader_program: slangpy.ShaderProgram) slangpy.ShaderObject ¶
- create_shader_object(self, type_layout: slangpy.TypeLayoutReflection) slangpy.ShaderObject ¶
- create_shader_object(self, cursor: slangpy.ReflectionCursor) slangpy.ShaderObject
- create_compute_pipeline(self, program: slangpy.ShaderProgram) slangpy.ComputePipeline ¶
- create_compute_pipeline(self, desc: slangpy.ComputePipelineDesc) slangpy.ComputePipeline
- create_render_pipeline(self, program: slangpy.ShaderProgram, input_layout: slangpy.InputLayout | None, primitive_topology: slangpy.PrimitiveTopology = PrimitiveTopology.triangle_list, targets: collections.abc.Sequence[slangpy.ColorTargetDesc] = [], depth_stencil: slangpy.DepthStencilDesc | None = None, rasterizer: slangpy.RasterizerDesc | None = None, multisample: slangpy.MultisampleDesc | None = None) slangpy.RenderPipeline ¶
- create_render_pipeline(self, desc: slangpy.RenderPipelineDesc) slangpy.RenderPipeline
- create_ray_tracing_pipeline(self, program: slangpy.ShaderProgram, hit_groups: collections.abc.Sequence[slangpy.HitGroupDesc], max_recursion: int = 0, max_ray_payload_size: int = 0, max_attribute_size: int = 8, flags: slangpy.RayTracingPipelineFlags = 0) slangpy.RayTracingPipeline ¶
- create_ray_tracing_pipeline(self, desc: slangpy.RayTracingPipelineDesc) slangpy.RayTracingPipeline
- create_compute_kernel(self, program: slangpy.ShaderProgram) slangpy.ComputeKernel ¶
- create_compute_kernel(self, desc: slangpy.ComputeKernelDesc) slangpy.ComputeKernel
- flush_print(self) None ¶
Block and flush all shader side debug print output.
- flush_print_to_string(self) str ¶
Block and flush all shader side debug print output to a string.
- wait(self) None ¶
Wait for all device work to complete.
- register_shader_hot_reload_callback(self, callback: collections.abc.Callable[[slangpy.ShaderHotReloadEvent], None]) None ¶
Register a hot reload hook, called immediately after any module is reloaded.
- register_device_close_callback(self, callback: collections.abc.Callable[[slangpy.Device], None]) None ¶
Register a device close callback, called at start of device close.
- coopvec_query_matrix_size(self, rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType) int ¶
N/A
- coopvec_create_matrix_desc(self, rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType, offset: int = 0) slangpy.CoopVecMatrixDesc ¶
N/A
- coopvec_convert_matrix_host(self, src: ndarray[device='cpu'], dst: ndarray[device='cpu'], src_layout: slangpy.CoopVecMatrixLayout | None = None, dst_layout: slangpy.CoopVecMatrixLayout | None = None) int ¶
N/A
- coopvec_convert_matrix_device(self, src: slangpy.Buffer, src_desc: slangpy.CoopVecMatrixDesc, dst: slangpy.Buffer, dst_desc: slangpy.CoopVecMatrixDesc, encoder: slangpy.CommandEncoder | None = None) None ¶
N/A
- coopvec_convert_matrix_device(self, src: slangpy.Buffer, src_desc: collections.abc.Sequence[slangpy.CoopVecMatrixDesc], dst: slangpy.Buffer, dst_desc: collections.abc.Sequence[slangpy.CoopVecMatrixDesc], encoder: slangpy.CommandEncoder | None = None) None
- coopvec_align_matrix_offset(self, offset: int) int ¶
N/A
- coopvec_align_vector_offset(self, offset: int) int ¶
N/A
- static enumerate_adapters(type: slangpy.DeviceType = DeviceType.automatic) list[slangpy.AdapterInfo] ¶
Enumerates all available adapters of a given device type.
- static report_live_objects() None ¶
Report live objects in the rhi layer. This is useful for checking clean shutdown with all resources released properly.
- class slangpy.DeviceDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property type: slangpy.DeviceType¶
The type of the device.
- property enable_debug_layers: bool¶
Enable debug layers.
- property enable_cuda_interop: bool¶
Enable CUDA interoperability.
- property enable_print: bool¶
Enable device side printing (adds performance overhead).
- property enable_hot_reload: bool¶
Adapter LUID to select adapter on which the device will be created.
- property adapter_luid: list[int] | None¶
Adapter LUID to select adapter on which the device will be created.
- property compiler_options: slangpy.SlangCompilerOptions¶
Compiler options (used for default slang session).
- property shader_cache_path: pathlib.Path | None¶
Path to the shader cache directory (optional). If a relative path is used, the cache is stored in the application data directory.
- class slangpy.DeviceInfo¶
- property type: slangpy.DeviceType¶
The type of the device.
- property api_name: str¶
The name of the graphics API being used by this device.
- property adapter_name: str¶
The name of the graphics adapter.
- property timestamp_frequency: int¶
The frequency of the timestamp counter. To resolve a timestamp to seconds, divide by this value.
- property limits: slangpy.DeviceLimits¶
Limits of the device.
- class slangpy.DeviceLimits¶
- property max_texture_dimension_1d: int¶
Maximum dimension for 1D textures.
- property max_texture_dimension_2d: int¶
Maximum dimensions for 2D textures.
- property max_texture_dimension_3d: int¶
Maximum dimensions for 3D textures.
- property max_texture_dimension_cube: int¶
Maximum dimensions for cube textures.
- property max_texture_layers: int¶
Maximum number of texture layers.
- property max_vertex_input_elements: int¶
Maximum number of vertex input elements in a graphics pipeline.
- property max_vertex_input_element_offset: int¶
Maximum offset of a vertex input element in the vertex stream.
- property max_vertex_streams: int¶
Maximum number of vertex streams in a graphics pipeline.
- property max_vertex_stream_stride: int¶
Maximum stride of a vertex stream.
- property max_compute_threads_per_group: int¶
Maximum number of threads per thread group.
- property max_compute_thread_group_size: slangpy.math.uint3¶
Maximum dimensions of a thread group.
- property max_compute_dispatch_thread_groups: slangpy.math.uint3¶
Maximum number of thread groups per dimension in a single dispatch.
- property max_viewports: int¶
Maximum number of viewports per pipeline.
- property max_viewport_dimensions: slangpy.math.uint2¶
Maximum viewport dimensions.
- property max_framebuffer_dimensions: slangpy.math.uint3¶
Maximum framebuffer dimensions.
- property max_shader_visible_samplers: int¶
Maximum samplers visible in a shader stage.
- class slangpy.DeviceResource¶
Base class:
slangpy.Object
- class MemoryUsage¶
- property device: int¶
The amount of memory in bytes used on the device.
- property host: int¶
The amount of memory in bytes used on the host.
- property device: slangpy.Device¶
- property memory_usage: slangpy.DeviceResource.MemoryUsage¶
The memory usage by this resource.
- class slangpy.DeviceType¶
Base class:
enum.Enum
- automatic: DeviceType = DeviceType.automatic¶
- d3d12: DeviceType = DeviceType.d3d12¶
- vulkan: DeviceType = DeviceType.vulkan¶
- metal: DeviceType = DeviceType.metal¶
- wgpu: DeviceType = DeviceType.wgpu¶
- cpu: DeviceType = DeviceType.cpu¶
- cuda: DeviceType = DeviceType.cuda¶
- class slangpy.DrawArguments¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property vertex_count: int¶
- property instance_count: int¶
- property start_vertex_location: int¶
- property start_instance_location: int¶
- property start_index_location: int¶
- class slangpy.EntryPointLayout¶
Base class:
slangpy.BaseReflectionObject
- property name: str¶
- property name_override: str¶
- property stage: slangpy.ShaderStage¶
- property compute_thread_group_size: slangpy.math.uint3¶
- property parameters: slangpy.EntryPointLayoutParameterList¶
- class slangpy.EntryPointLayoutParameterList¶
EntryPointLayout lazy parameter list evaluation.
- class slangpy.Feature¶
Base class:
enum.IntEnum
- class slangpy.Fence¶
Base class:
slangpy.DeviceResource
Fence.
- property desc: slangpy.FenceDesc¶
- signal(self, value: int = 18446744073709551615) int ¶
Signal the fence. This signals the fence from the host.
- Parameter
value
: The value to signal. If
AUTO
, the signaled value will be auto- incremented.- Returns:
The signaled value.
- Parameter
- wait(self, value: int = 18446744073709551615, timeout_ns: int = 18446744073709551615) None ¶
Wait for the fence to be signaled on the host. Blocks the host until the fence reaches or exceeds the specified value.
- Parameter
value
: The value to wait for. If
AUTO
, wait for the last signaled value.- Parameter
timeout_ns
: The timeout in nanoseconds. If
TIMEOUT_INFINITE
, the function will block indefinitely.
- Parameter
- property current_value: int¶
Returns the currently signaled value on the device.
- property signaled_value: int¶
Returns the last signaled value on the device.
Get the shared fence handle. Throws if the fence was not created with the
FenceDesc::shared
flag.
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: ID3D12Fence* - Vulkan: currently not supported
- AUTO: int = 18446744073709551615¶
- TIMEOUT_INFINITE: int = 18446744073709551615¶
- class slangpy.FenceDesc¶
Fence descriptor.
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property initial_value: int¶
Initial fence value.
Create a shared fence.
- class slangpy.FormatChannels¶
Base class:
enum.IntFlag
- none: FormatChannels = 0¶
- r: FormatChannels = 1¶
- g: FormatChannels = 2¶
- b: FormatChannels = 4¶
- a: FormatChannels = 8¶
- rg: FormatChannels = 3¶
- rgb: FormatChannels = 7¶
- rgba: FormatChannels = 15¶
- class slangpy.FormatInfo¶
Resource format information.
- property format: slangpy.Format¶
Resource format.
- property name: str¶
Format name.
- property bytes_per_block: int¶
Number of bytes per block (compressed) or pixel (uncompressed).
- property channel_count: int¶
Number of channels.
- property type: slangpy.FormatType¶
Format type (typeless, float, unorm, unorm_srgb, snorm, uint, sint).
- property is_depth: bool¶
True if format has a depth component.
- property is_stencil: bool¶
True if format has a stencil component.
- property is_compressed: bool¶
True if format is compressed.
- property block_width: int¶
Block width for compressed formats (1 for uncompressed formats).
- property block_height: int¶
Block height for compressed formats (1 for uncompressed formats).
- property channel_bit_count: list[int]¶
Number of bits per channel.
- property dxgi_format: int¶
DXGI format.
- property vk_format: int¶
Vulkan format.
- is_depth_stencil(self) bool ¶
True if format has a depth or stencil component.
- is_float_format(self) bool ¶
True if format is floating point.
- is_integer_format(self) bool ¶
True if format is integer.
- is_normalized_format(self) bool ¶
True if format is normalized.
- is_srgb_format(self) bool ¶
True if format is sRGB.
- get_channels(self) slangpy.FormatChannels ¶
Get the channels for the format (only for color formats).
- get_channel_bits(self, arg: slangpy.FormatChannels, /) int ¶
Get the number of bits for the specified channels.
- has_equal_channel_bits(self) bool ¶
Check if all channels have the same number of bits.
- class slangpy.FormatSupport¶
Base class:
enum.IntFlag
- none: FormatSupport = 0¶
- buffer: FormatSupport = 1¶
- index_buffer: FormatSupport = 2¶
- vertex_buffer: FormatSupport = 4¶
- texture: FormatSupport = 8¶
- depth_stencil: FormatSupport = 16¶
- render_target: FormatSupport = 32¶
- blendable: FormatSupport = 64¶
- shader_load: FormatSupport = 128¶
- shader_sample: FormatSupport = 256¶
- shader_uav_load: FormatSupport = 512¶
- shader_uav_store: FormatSupport = 1024¶
- shader_atomic: FormatSupport = 2048¶
- class slangpy.FormatType¶
Base class:
enum.Enum
- unknown: FormatType = FormatType.unknown¶
- float: FormatType = FormatType.float¶
- unorm: FormatType = FormatType.unorm¶
- unorm_srgb: FormatType = FormatType.unorm_srgb¶
- snorm: FormatType = FormatType.snorm¶
- uint: FormatType = FormatType.uint¶
- sint: FormatType = FormatType.sint¶
- class slangpy.FrontFaceMode¶
Base class:
enum.Enum
- counter_clockwise: FrontFaceMode = FrontFaceMode.counter_clockwise¶
- clockwise: FrontFaceMode = FrontFaceMode.clockwise¶
- class slangpy.FunctionReflection¶
Base class:
slangpy.BaseReflectionObject
- property name: str¶
Function name.
- property return_type: slangpy.TypeReflection¶
Function return type.
- property parameters: slangpy.FunctionReflectionParameterList¶
List of all function parameters.
- has_modifier(self, modifier: slangpy.ModifierID) bool ¶
Check if the function has a given modifier (e.g. ‘differentiable’).
- specialize_with_arg_types(self, types: collections.abc.Sequence[slangpy.TypeReflection]) slangpy.FunctionReflection ¶
Specialize a generic or interface based function with a set of concrete argument types. Calling on a none-generic/interface function will simply validate all argument types can be implicitly converted to their respective parameter types. Where a function contains multiple overloads, specialize will identify the correct overload based on the arguments.
- property is_overloaded: bool¶
Check whether this function object represents a group of overloaded functions, accessible via the overloads list.
- property overloads: slangpy.FunctionReflectionOverloadList¶
List of all overloads of this function.
- class slangpy.FunctionReflectionOverloadList¶
FunctionReflection lazy overload list evaluation.
- class slangpy.FunctionReflectionParameterList¶
FunctionReflection lazy parameter list evaluation.
- slangpy.get_format_info(arg: slangpy.Format, /) slangpy.FormatInfo ¶
- class slangpy.HitGroupDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- __init__(self, hit_group_name: str, closest_hit_entry_point: str = '', any_hit_entry_point: str = '', intersection_entry_point: str = '') None
- property hit_group_name: str¶
- property closest_hit_entry_point: str¶
- property any_hit_entry_point: str¶
- property intersection_entry_point: str¶
- class slangpy.IndexFormat¶
Base class:
enum.Enum
- uint16: IndexFormat = IndexFormat.uint16¶
- uint32: IndexFormat = IndexFormat.uint32¶
- class slangpy.InputElementDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property semantic_name: str¶
The name of the corresponding parameter in shader code.
- property semantic_index: int¶
The index of the corresponding parameter in shader code. Only needed if multiple parameters share a semantic name.
- property format: slangpy.Format¶
The format of the data being fetched for this element.
- property offset: int¶
The offset in bytes of this element from the start of the corresponding chunk of vertex stream data.
- property buffer_slot_index: int¶
The index of the vertex stream to fetch this element’s data from.
- class slangpy.InputLayout¶
Base class:
slangpy.DeviceResource
- property desc: slangpy.InputLayoutDesc¶
- class slangpy.InputLayoutDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property input_elements: list[slangpy.InputElementDesc]¶
- property vertex_streams: list[slangpy.VertexStreamDesc]¶
- class slangpy.InputSlotClass¶
Base class:
enum.Enum
- per_vertex: InputSlotClass = InputSlotClass.per_vertex¶
- per_instance: InputSlotClass = InputSlotClass.per_instance¶
- class slangpy.Kernel¶
Base class:
slangpy.DeviceResource
- property program: slangpy.ShaderProgram¶
- property reflection: slangpy.ReflectionCursor¶
- class slangpy.MemoryType¶
Base class:
enum.Enum
- device_local: MemoryType = MemoryType.device_local¶
- upload: MemoryType = MemoryType.upload¶
- read_back: MemoryType = MemoryType.read_back¶
- class slangpy.ModifierID¶
Base class:
enum.Enum
- nodiff: ModifierID = ModifierID.nodiff¶
- static: ModifierID = ModifierID.static¶
- const: ModifierID = ModifierID.const¶
- export: ModifierID = ModifierID.export¶
- extern: ModifierID = ModifierID.extern¶
- differentiable: ModifierID = ModifierID.differentiable¶
- mutating: ModifierID = ModifierID.mutating¶
- inn: ModifierID = ModifierID.inn¶
- out: ModifierID = ModifierID.out¶
- inout: ModifierID = ModifierID.inout¶
- class slangpy.MultisampleDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property sample_count: int¶
- property sample_mask: int¶
- property alpha_to_coverage_enable: bool¶
- property alpha_to_one_enable: bool¶
- class slangpy.NativeHandle¶
N/A
- property type: slangpy.NativeHandleType¶
N/A
- property value: int¶
N/A
- class slangpy.NativeHandleType¶
Base class:
enum.Enum
N/A
- undefined: NativeHandleType = NativeHandleType.undefined¶
- win32: NativeHandleType = NativeHandleType.win32¶
- file_descriptor: NativeHandleType = NativeHandleType.file_descriptor¶
- D3D12Device: NativeHandleType = NativeHandleType.D3D12Device¶
- D3D12CommandQueue: NativeHandleType = NativeHandleType.D3D12CommandQueue¶
- D3D12GraphicsCommandList: NativeHandleType = NativeHandleType.D3D12GraphicsCommandList¶
- D3D12Resource: NativeHandleType = NativeHandleType.D3D12Resource¶
- D3D12PipelineState: NativeHandleType = NativeHandleType.D3D12PipelineState¶
- D3D12StateObject: NativeHandleType = NativeHandleType.D3D12StateObject¶
- D3D12CpuDescriptorHandle: NativeHandleType = NativeHandleType.D3D12CpuDescriptorHandle¶
- D3D12Fence: NativeHandleType = NativeHandleType.D3D12Fence¶
- D3D12DeviceAddress: NativeHandleType = NativeHandleType.D3D12DeviceAddress¶
- VkDevice: NativeHandleType = NativeHandleType.VkDevice¶
- VkPhysicalDevice: NativeHandleType = NativeHandleType.VkPhysicalDevice¶
- VkInstance: NativeHandleType = NativeHandleType.VkInstance¶
- VkQueue: NativeHandleType = NativeHandleType.VkQueue¶
- VkCommandBuffer: NativeHandleType = NativeHandleType.VkCommandBuffer¶
- VkBuffer: NativeHandleType = NativeHandleType.VkBuffer¶
- VkImage: NativeHandleType = NativeHandleType.VkImage¶
- VkImageView: NativeHandleType = NativeHandleType.VkImageView¶
- VkAccelerationStructureKHR: NativeHandleType = NativeHandleType.VkAccelerationStructureKHR¶
- VkSampler: NativeHandleType = NativeHandleType.VkSampler¶
- VkPipeline: NativeHandleType = NativeHandleType.VkPipeline¶
- VkSemaphore: NativeHandleType = NativeHandleType.VkSemaphore¶
- MTLDevice: NativeHandleType = NativeHandleType.MTLDevice¶
- MTLCommandQueue: NativeHandleType = NativeHandleType.MTLCommandQueue¶
- MTLCommandBuffer: NativeHandleType = NativeHandleType.MTLCommandBuffer¶
- MTLTexture: NativeHandleType = NativeHandleType.MTLTexture¶
- MTLBuffer: NativeHandleType = NativeHandleType.MTLBuffer¶
- MTLComputePipelineState: NativeHandleType = NativeHandleType.MTLComputePipelineState¶
- MTLRenderPipelineState: NativeHandleType = NativeHandleType.MTLRenderPipelineState¶
- MTLSamplerState: NativeHandleType = NativeHandleType.MTLSamplerState¶
- MTLAccelerationStructure: NativeHandleType = NativeHandleType.MTLAccelerationStructure¶
- CUdevice: NativeHandleType = NativeHandleType.CUdevice¶
- CUdeviceptr: NativeHandleType = NativeHandleType.CUdeviceptr¶
- CUtexObject: NativeHandleType = NativeHandleType.CUtexObject¶
- CUstream: NativeHandleType = NativeHandleType.CUstream¶
- OptixDeviceContext: NativeHandleType = NativeHandleType.OptixDeviceContext¶
- OptixTraversableHandle: NativeHandleType = NativeHandleType.OptixTraversableHandle¶
- WGPUDevice: NativeHandleType = NativeHandleType.WGPUDevice¶
- WGPUBuffer: NativeHandleType = NativeHandleType.WGPUBuffer¶
- WGPUTexture: NativeHandleType = NativeHandleType.WGPUTexture¶
- WGPUSampler: NativeHandleType = NativeHandleType.WGPUSampler¶
- WGPURenderPipeline: NativeHandleType = NativeHandleType.WGPURenderPipeline¶
- WGPUComputePipeline: NativeHandleType = NativeHandleType.WGPUComputePipeline¶
- WGPUQueue: NativeHandleType = NativeHandleType.WGPUQueue¶
- WGPUCommandBuffer: NativeHandleType = NativeHandleType.WGPUCommandBuffer¶
- WGPUTextureView: NativeHandleType = NativeHandleType.WGPUTextureView¶
- WGPUCommandEncoder: NativeHandleType = NativeHandleType.WGPUCommandEncoder¶
- class slangpy.PassEncoder¶
Base class:
slangpy.Object
- end(self) None ¶
- push_debug_group(self, name: str, color: slangpy.math.float3) None ¶
Push a debug group.
- pop_debug_group(self) None ¶
Pop a debug group.
- insert_debug_marker(self, name: str, color: slangpy.math.float3) None ¶
Insert a debug marker.
- Parameter
name
: Name of the marker.
- Parameter
color
: Color of the marker.
- Parameter
- class slangpy.Pipeline¶
Base class:
slangpy.DeviceResource
Pipeline base class.
- class slangpy.PrimitiveTopology¶
Base class:
enum.Enum
- point_list: PrimitiveTopology = PrimitiveTopology.point_list¶
- line_list: PrimitiveTopology = PrimitiveTopology.line_list¶
- line_strip: PrimitiveTopology = PrimitiveTopology.line_strip¶
- triangle_list: PrimitiveTopology = PrimitiveTopology.triangle_list¶
- triangle_strip: PrimitiveTopology = PrimitiveTopology.triangle_strip¶
- patch_list: PrimitiveTopology = PrimitiveTopology.patch_list¶
- class slangpy.ProgramLayout¶
Base class:
slangpy.BaseReflectionObject
- property globals_type_layout: slangpy.TypeLayoutReflection¶
- property globals_variable_layout: slangpy.VariableLayoutReflection¶
- property parameters: slangpy.ProgramLayoutParameterList¶
- property entry_points: slangpy.ProgramLayoutEntryPointList¶
- find_type_by_name(self, name: str) slangpy.TypeReflection ¶
Find a given type by name. Handles generic specilization if generic variable values are provided.
- find_function_by_name(self, name: str) slangpy.FunctionReflection ¶
Find a given function by name. Handles generic specilization if generic variable values are provided.
- find_function_by_name_in_type(self, type: slangpy.TypeReflection, name: str) slangpy.FunctionReflection ¶
Find a given function in a type by name. Handles generic specilization if generic variable values are provided.
- get_type_layout(self, type: slangpy.TypeReflection) slangpy.TypeLayoutReflection ¶
Get corresponding type layout from a given type.
- is_sub_type(self, sub_type: slangpy.TypeReflection, super_type: slangpy.TypeReflection) bool ¶
Test whether a type is a sub type of another type. Handles both struct inheritance and interface implementation.
- property hashed_strings: list[slangpy.ProgramLayout.HashedString]¶
- class slangpy.ProgramLayoutEntryPointList¶
ProgramLayout lazy entry point list evaluation.
- class slangpy.ProgramLayoutParameterList¶
ProgramLayout lazy parameter list evaluation.
- class slangpy.QueryPool¶
Base class:
slangpy.DeviceResource
- property desc: slangpy.QueryPoolDesc¶
- reset(self) None ¶
- get_result(self, index: int) int ¶
- get_results(self, index: int, count: int) list[int] ¶
- get_timestamp_result(self, index: int) float ¶
- get_timestamp_results(self, index: int, count: int) list[float] ¶
- class slangpy.QueryPoolDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property type: slangpy.QueryType¶
Query type.
- property count: int¶
Number of queries in the pool.
- class slangpy.QueryType¶
Base class:
enum.Enum
- class slangpy.RasterizerDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property fill_mode: slangpy.FillMode¶
- property cull_mode: slangpy.CullMode¶
- property front_face: slangpy.FrontFaceMode¶
- property depth_bias: int¶
- property depth_bias_clamp: float¶
- property slope_scaled_depth_bias: float¶
- property depth_clip_enable: bool¶
- property scissor_enable: bool¶
- property multisample_enable: bool¶
- property antialiased_line_enable: bool¶
- property enable_conservative_rasterization: bool¶
- property forced_sample_count: int¶
- class slangpy.RayTracingPassEncoder¶
Base class:
slangpy.PassEncoder
- bind_pipeline(self, pipeline: slangpy.RayTracingPipeline, shader_table: slangpy.ShaderTable) slangpy.ShaderObject ¶
- bind_pipeline(self, pipeline: slangpy.RayTracingPipeline, shader_table: slangpy.ShaderTable, root_object: slangpy.ShaderObject) None
- dispatch_rays(self, ray_gen_shader_index: int, dimensions: slangpy.math.uint3) None ¶
- class slangpy.RayTracingPipeline¶
Base class:
slangpy.Pipeline
Ray tracing pipeline.
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: ID3D12PipelineState* - Vulkan: VkPipeline
- class slangpy.RayTracingPipelineDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- property hit_groups: list[slangpy.HitGroupDesc]¶
- property max_recursion: int¶
- property max_ray_payload_size: int¶
- property max_attribute_size: int¶
- property flags: slangpy.RayTracingPipelineFlags¶
- class slangpy.RayTracingPipelineFlags¶
Base class:
enum.IntFlag
- none: RayTracingPipelineFlags = 0¶
- skip_triangles: RayTracingPipelineFlags = 1¶
- skip_procedurals: RayTracingPipelineFlags = 2¶
- class slangpy.ReflectionCursor¶
- __init__(self, shader_program: slangpy.ShaderProgram) None ¶
- is_valid(self) bool ¶
- find_field(self, name: str) slangpy.ReflectionCursor ¶
- find_element(self, index: int) slangpy.ReflectionCursor ¶
- has_field(self, name: str) bool ¶
- has_element(self, index: int) bool ¶
- property type_layout: slangpy.TypeLayoutReflection¶
- property type: slangpy.TypeReflection¶
- class slangpy.RenderPassColorAttachment¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property view: slangpy.TextureView¶
- property resolve_target: slangpy.TextureView¶
- property load_op: slangpy.LoadOp¶
- property store_op: slangpy.StoreOp¶
- property clear_value: slangpy.math.float4¶
- class slangpy.RenderPassDepthStencilAttachment¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property view: slangpy.TextureView¶
- property depth_load_op: slangpy.LoadOp¶
- property depth_store_op: slangpy.StoreOp¶
- property depth_clear_value: float¶
- property depth_read_only: bool¶
- property stencil_load_op: slangpy.LoadOp¶
- property stencil_store_op: slangpy.StoreOp¶
- property stencil_clear_value: int¶
- property stencil_read_only: bool¶
- class slangpy.RenderPassDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property color_attachments: list[slangpy.RenderPassColorAttachment]¶
- property depth_stencil_attachment: slangpy.RenderPassDepthStencilAttachment | None¶
- class slangpy.RenderPassEncoder¶
Base class:
slangpy.PassEncoder
- bind_pipeline(self, pipeline: slangpy.RenderPipeline) slangpy.ShaderObject ¶
- bind_pipeline(self, pipeline: slangpy.RenderPipeline, root_object: slangpy.ShaderObject) None
- set_render_state(self, state: slangpy.RenderState) None ¶
- draw(self, args: slangpy.DrawArguments) None ¶
- draw_indexed(self, args: slangpy.DrawArguments) None ¶
- draw_indirect(self, max_draw_count: int, arg_buffer: slangpy.BufferOffsetPair, count_buffer: slangpy.BufferOffsetPair = <slangpy.BufferOffsetPair object at 0x000002A6A1F68780>) None ¶
- draw_indexed_indirect(self, max_draw_count: int, arg_buffer: slangpy.BufferOffsetPair, count_buffer: slangpy.BufferOffsetPair = <slangpy.BufferOffsetPair object at 0x000002A6A225D080>) None ¶
- draw_mesh_tasks(self, dimensions: slangpy.math.uint3) None ¶
- class slangpy.RenderPipeline¶
Base class:
slangpy.Pipeline
Render pipeline.
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: ID3D12PipelineState* - Vulkan: VkPipeline
- class slangpy.RenderPipelineDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- property input_layout: slangpy.InputLayout¶
- property primitive_topology: slangpy.PrimitiveTopology¶
- property targets: list[slangpy.ColorTargetDesc]¶
- property depth_stencil: slangpy.DepthStencilDesc¶
- property rasterizer: slangpy.RasterizerDesc¶
- property multisample: slangpy.MultisampleDesc¶
- class slangpy.RenderState¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property stencil_ref: int¶
- property viewports: list[slangpy.Viewport]¶
- property scissor_rects: list[slangpy.ScissorRect]¶
- property vertex_buffers: list[slangpy.BufferOffsetPair]¶
- property index_buffer: slangpy.BufferOffsetPair¶
- property index_format: slangpy.IndexFormat¶
- class slangpy.RenderTargetWriteMask¶
Base class:
enum.IntFlag
- enable_none: RenderTargetWriteMask = 0¶
- enable_red: RenderTargetWriteMask = 1¶
- enable_green: RenderTargetWriteMask = 2¶
- enable_blue: RenderTargetWriteMask = 4¶
- enable_alpha: RenderTargetWriteMask = 8¶
- enable_all: RenderTargetWriteMask = 15¶
- class slangpy.Resource¶
Base class:
slangpy.DeviceResource
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: ID3D12Resource* - Vulkan: VkBuffer or VkImage
- class slangpy.ResourceState¶
Base class:
enum.Enum
- undefined: ResourceState = ResourceState.undefined¶
- general: ResourceState = ResourceState.general¶
- vertex_buffer: ResourceState = ResourceState.vertex_buffer¶
- index_buffer: ResourceState = ResourceState.index_buffer¶
- constant_buffer: ResourceState = ResourceState.constant_buffer¶
- stream_output: ResourceState = ResourceState.stream_output¶
- shader_resource: ResourceState = ResourceState.shader_resource¶
- unordered_access: ResourceState = ResourceState.unordered_access¶
- render_target: ResourceState = ResourceState.render_target¶
- depth_read: ResourceState = ResourceState.depth_read¶
- depth_write: ResourceState = ResourceState.depth_write¶
- present: ResourceState = ResourceState.present¶
- indirect_argument: ResourceState = ResourceState.indirect_argument¶
- copy_source: ResourceState = ResourceState.copy_source¶
- copy_destination: ResourceState = ResourceState.copy_destination¶
- resolve_source: ResourceState = ResourceState.resolve_source¶
- resolve_destination: ResourceState = ResourceState.resolve_destination¶
- acceleration_structure: ResourceState = ResourceState.acceleration_structure¶
- acceleration_structure_build_output: ResourceState = ResourceState.acceleration_structure_build_output¶
- class slangpy.Sampler¶
Base class:
slangpy.DeviceResource
- property desc: slangpy.SamplerDesc¶
- property native_handle: slangpy.NativeHandle¶
Returns the native API handle: - D3D12: D3D12_CPU_DESCRIPTOR_HANDLE - Vulkan: VkSampler
- class slangpy.SamplerDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property min_filter: slangpy.TextureFilteringMode¶
- property mag_filter: slangpy.TextureFilteringMode¶
- property mip_filter: slangpy.TextureFilteringMode¶
- property reduction_op: slangpy.TextureReductionOp¶
- property address_u: slangpy.TextureAddressingMode¶
- property address_v: slangpy.TextureAddressingMode¶
- property address_w: slangpy.TextureAddressingMode¶
- property mip_lod_bias: float¶
- property max_anisotropy: int¶
- property comparison_func: slangpy.ComparisonFunc¶
- property border_color: slangpy.math.float4¶
- property min_lod: float¶
- property max_lod: float¶
- property label: str¶
- class slangpy.ScissorRect¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- static from_size(width: int, height: int) slangpy.ScissorRect ¶
- property min_x: int¶
- property min_y: int¶
- property max_x: int¶
- property max_y: int¶
- class slangpy.ShaderCacheStats¶
- property entry_count: int¶
Number of entries in the cache.
- property hit_count: int¶
Number of hits in the cache.
- property miss_count: int¶
Number of misses in the cache.
- class slangpy.ShaderCursor¶
Cursor used for parsing and setting shader object fields. This class does NOT use the SGL reflection wrappers for accessing due to the performance implications of allocating/freeing them repeatedly. This is far faster, however does introduce a risk of mem access problems if the shader cursor is kept alive longer than the shader object it was created from.
- __init__(self, shader_object: slangpy.ShaderObject) None ¶
- dereference(self) slangpy.ShaderCursor ¶
- find_entry_point(self, index: int) slangpy.ShaderCursor ¶
- is_valid(self) bool ¶
N/A
- find_field(self, name: str) slangpy.ShaderCursor ¶
N/A
- find_element(self, index: int) slangpy.ShaderCursor ¶
N/A
- has_field(self, name: str) bool ¶
N/A
- has_element(self, index: int) bool ¶
N/A
- set_data(self, data: ndarray[device='cpu']) None ¶
- write(self, val: object) None ¶
N/A
- class slangpy.ShaderHotReloadEvent¶
Event data for hot reload hook.
- class slangpy.ShaderModel¶
Base class:
enum.IntEnum
- unknown: ShaderModel = ShaderModel.unknown¶
- sm_6_0: ShaderModel = ShaderModel.sm_6_0¶
- sm_6_1: ShaderModel = ShaderModel.sm_6_1¶
- sm_6_2: ShaderModel = ShaderModel.sm_6_2¶
- sm_6_3: ShaderModel = ShaderModel.sm_6_3¶
- sm_6_4: ShaderModel = ShaderModel.sm_6_4¶
- sm_6_5: ShaderModel = ShaderModel.sm_6_5¶
- sm_6_6: ShaderModel = ShaderModel.sm_6_6¶
- sm_6_7: ShaderModel = ShaderModel.sm_6_7¶
- class slangpy.ShaderObject¶
Base class:
slangpy.Object
- class slangpy.ShaderOffset¶
Represents the offset of a shader variable relative to its enclosing type/buffer/block.
A ShaderOffset can be used to store the offset of a shader variable that might use ordinary/uniform data, resources like textures/buffers/samplers, or some combination.
A ShaderOffset can also encode an invalid offset, to indicate that a particular shader variable is not present.
- property uniform_offset: int¶
- property binding_range_index: int¶
- property binding_array_index: int¶
- is_valid(self) bool ¶
Check whether this offset is valid.
- class slangpy.ShaderProgram¶
Base class:
slangpy.DeviceResource
- property layout: slangpy.ProgramLayout¶
- property reflection: slangpy.ReflectionCursor¶
- class slangpy.ShaderStage¶
Base class:
enum.Enum
- none: ShaderStage = ShaderStage.none¶
- vertex: ShaderStage = ShaderStage.vertex¶
- hull: ShaderStage = ShaderStage.hull¶
- domain: ShaderStage = ShaderStage.domain¶
- geometry: ShaderStage = ShaderStage.geometry¶
- fragment: ShaderStage = ShaderStage.fragment¶
- compute: ShaderStage = ShaderStage.compute¶
- ray_generation: ShaderStage = ShaderStage.ray_generation¶
- intersection: ShaderStage = ShaderStage.intersection¶
- any_hit: ShaderStage = ShaderStage.any_hit¶
- closest_hit: ShaderStage = ShaderStage.closest_hit¶
- miss: ShaderStage = ShaderStage.miss¶
- callable: ShaderStage = ShaderStage.callable¶
- mesh: ShaderStage = ShaderStage.mesh¶
- amplification: ShaderStage = ShaderStage.amplification¶
- class slangpy.ShaderTable¶
Base class:
slangpy.DeviceResource
- class slangpy.ShaderTableDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- property ray_gen_entry_points: list[str]¶
- property miss_entry_points: list[str]¶
- property hit_group_names: list[str]¶
- property callable_entry_points: list[str]¶
- class slangpy.SlangCompileError¶
Base class:
builtins.Exception
- class slangpy.SlangCompilerOptions¶
Slang compiler options. Can be set when creating a Slang session.
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property include_paths: list[pathlib.Path]¶
Specifies a list of include paths to be used when resolving module/include paths.
- property defines: dict[str, str]¶
Specifies a list of preprocessor defines.
- property shader_model: slangpy.ShaderModel¶
Specifies the shader model to use. Defaults to latest available on the device.
- property matrix_layout: slangpy.SlangMatrixLayout¶
Specifies the matrix layout. Defaults to row-major.
- property enable_warnings: list[str]¶
Specifies a list of warnings to enable (warning codes or names).
- property disable_warnings: list[str]¶
Specifies a list of warnings to disable (warning codes or names).
- property warnings_as_errors: list[str]¶
Specifies a list of warnings to be treated as errors (warning codes or names, or “all” to indicate all warnings).
- property report_downstream_time: bool¶
Turn on/off downstream compilation time report.
- property report_perf_benchmark: bool¶
Turn on/off reporting of time spend in different parts of the compiler.
- property skip_spirv_validation: bool¶
Specifies whether or not to skip the validation step after emitting SPIRV.
- property floating_point_mode: slangpy.SlangFloatingPointMode¶
Specifies the floating point mode.
- property debug_info: slangpy.SlangDebugInfoLevel¶
Specifies the level of debug information to include in the generated code.
- property optimization: slangpy.SlangOptimizationLevel¶
Specifies the optimization level.
- property downstream_args: list[str]¶
Specifies a list of additional arguments to be passed to the downstream compiler.
- property dump_intermediates: bool¶
When set will dump the intermediate source output.
- property dump_intermediates_prefix: str¶
The file name prefix for the intermediate source output.
- class slangpy.SlangDebugInfoLevel¶
Base class:
enum.Enum
- none: SlangDebugInfoLevel = SlangDebugInfoLevel.none¶
- minimal: SlangDebugInfoLevel = SlangDebugInfoLevel.minimal¶
- standard: SlangDebugInfoLevel = SlangDebugInfoLevel.standard¶
- maximal: SlangDebugInfoLevel = SlangDebugInfoLevel.maximal¶
- class slangpy.SlangEntryPoint¶
Base class:
slangpy.Object
- property name: str¶
- property stage: slangpy.ShaderStage¶
- property layout: slangpy.EntryPointLayout¶
- rename(self, new_name: str) slangpy.SlangEntryPoint ¶
- with_name(self, new_name: str) slangpy.SlangEntryPoint ¶
Returns a copy of the entry point with a new name.
- class slangpy.SlangFloatingPointMode¶
Base class:
enum.Enum
- default: SlangFloatingPointMode = SlangFloatingPointMode.default¶
- fast: SlangFloatingPointMode = SlangFloatingPointMode.fast¶
- precise: SlangFloatingPointMode = SlangFloatingPointMode.precise¶
- class slangpy.SlangLinkOptions¶
Slang link options. These can optionally be set when linking a shader program.
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property floating_point_mode: slangpy.SlangFloatingPointMode | None¶
Specifies the floating point mode.
- property debug_info: slangpy.SlangDebugInfoLevel | None¶
Specifies the level of debug information to include in the generated code.
- property optimization: slangpy.SlangOptimizationLevel | None¶
Specifies the optimization level.
- property downstream_args: list[str] | None¶
Specifies a list of additional arguments to be passed to the downstream compiler.
- property dump_intermediates: bool | None¶
When set will dump the intermediate source output.
- property dump_intermediates_prefix: str | None¶
The file name prefix for the intermediate source output.
- class slangpy.SlangMatrixLayout¶
Base class:
enum.Enum
- row_major: SlangMatrixLayout = SlangMatrixLayout.row_major¶
- column_major: SlangMatrixLayout = SlangMatrixLayout.column_major¶
- class slangpy.SlangModule¶
Base class:
slangpy.Object
- property session: slangpy.SlangSession¶
The session from which this module was built.
- property name: str¶
Module name.
- property path: pathlib.Path¶
Module source path. This can be empty if the module was generated from a string.
- property layout: slangpy.ProgramLayout¶
- property entry_points: list[slangpy.SlangEntryPoint]¶
Build and return vector of all current entry points in the module.
- property module_decl: slangpy.DeclReflection¶
Get root decl ref for this module
- entry_point(self, name: str, type_conformances: Sequence[slangpy.TypeConformance] = []) slangpy.SlangEntryPoint ¶
Get an entry point, optionally applying type conformances to it.
- class slangpy.SlangOptimizationLevel¶
Base class:
enum.Enum
- none: SlangOptimizationLevel = SlangOptimizationLevel.none¶
- default: SlangOptimizationLevel = SlangOptimizationLevel.default¶
- high: SlangOptimizationLevel = SlangOptimizationLevel.high¶
- maximal: SlangOptimizationLevel = SlangOptimizationLevel.maximal¶
- class slangpy.SlangSession¶
Base class:
slangpy.Object
A slang session, used to load modules and link programs.
- property device: slangpy.Device¶
- property desc: slangpy.SlangSessionDesc¶
- load_module(self, module_name: str) slangpy.SlangModule ¶
Load a module by name.
- load_module_from_source(self, module_name: str, source: str, path: str | os.PathLike | None = None) slangpy.SlangModule ¶
Load a module from string source code.
- link_program(self, modules: collections.abc.Sequence[slangpy.SlangModule], entry_points: collections.abc.Sequence[slangpy.SlangEntryPoint], link_options: slangpy.SlangLinkOptions | None = None) slangpy.ShaderProgram ¶
Link a program with a set of modules and entry points.
- load_program(self, module_name: str, entry_point_names: collections.abc.Sequence[str], additional_source: str | None = None, link_options: slangpy.SlangLinkOptions | None = None) slangpy.ShaderProgram ¶
Load a program from a given module with a set of entry points. Internally this simply wraps link_program without requiring the user to explicitly load modules.
- load_source(self, module_name: str) str ¶
Load the source code for a given module.
- class slangpy.SlangSessionDesc¶
Descriptor for slang session initialization.
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property compiler_options: slangpy.SlangCompilerOptions¶
- property add_default_include_paths: bool¶
- property cache_path: pathlib.Path | None¶
- class slangpy.SubresourceLayout¶
- __init__(self) None ¶
- property size: slangpy.math.uint3¶
Dimensions of the subresource (in texels).
- property col_pitch: int¶
Stride in bytes between columns (i.e. blocks) of the subresource tensor.
- property row_pitch: int¶
Stride in bytes between rows of the subresource tensor.
- property slice_pitch: int¶
Stride in bytes between slices of the subresource tensor.
- property size_in_bytes: int¶
Overall size required to fit the subresource data (typically size.z * slice_pitch).
- property block_width: int¶
Block width in texels (1 for uncompressed formats).
- property block_height: int¶
Block height in texels (1 for uncompressed formats).
- property row_count: int¶
Number of rows. For uncompressed formats this matches size.y. For compressed formats this matches align_up(size.y, block_height) / block_height.
- class slangpy.SubresourceRange¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property layer: int¶
First array layer.
- property layer_count: int¶
Number of array layers.
- property mip: int¶
Most detailed mip level.
- property mip_count: int¶
Number of mip levels.
- class slangpy.Surface¶
Base class:
slangpy.Object
- property info: slangpy.SurfaceInfo¶
Returns the surface info.
- property config: slangpy.SurfaceConfig¶
Returns the surface config.
- configure(self, width: int, height: int, format: slangpy.Format = Format.undefined, usage: slangpy.TextureUsage = 4, desired_image_count: int = 3, vsync: bool = True) None ¶
Configure the surface.
- configure(self, config: slangpy.SurfaceConfig) None
- acquire_next_image(self) slangpy.Texture ¶
Acquries the next surface image.
- present(self) None ¶
Present the previously acquire image.
- class slangpy.SurfaceConfig¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property format: slangpy.Format¶
Surface texture format.
- property usage: slangpy.TextureUsage¶
Surface texture usage.
- property width: int¶
Surface texture width.
- property height: int¶
Surface texture height.
- property desired_image_count: int¶
Desired number of images.
- property vsync: bool¶
Enable/disable vertical synchronization.
- class slangpy.SurfaceInfo¶
- property preferred_format: slangpy.Format¶
Preferred format for the surface.
- property supported_usage: slangpy.TextureUsage¶
Supported texture usages.
- property formats: list[slangpy.Format]¶
Supported texture formats.
- class slangpy.Texture¶
Base class:
slangpy.Resource
- property desc: slangpy.TextureDesc¶
- property type: slangpy.TextureType¶
- property format: slangpy.Format¶
- property width: int¶
- property height: int¶
- property depth: int¶
- property array_length: int¶
- property mip_count: int¶
- property layer_count: int¶
- property subresource_count: int¶
Get the shared resource handle.
- get_mip_width(self, mip: int = 0) int ¶
- get_mip_height(self, mip: int = 0) int ¶
- get_mip_depth(self, mip: int = 0) int ¶
- get_mip_size(self, mip: int = 0) slangpy.math.uint3 ¶
- get_subresource_layout(self, mip: int, row_alignment: int = 4294967295) slangpy.SubresourceLayout ¶
Get layout of a texture subresource. By default, the row alignment used is that required by the target for direct buffer upload/download. Pass in 1 for a completely packed layout.
- create_view(self, desc: slangpy.TextureViewDesc) slangpy.TextureView ¶
- create_view(self, dict: dict) slangpy.TextureView
- create_view(self, format: slangpy.Format = Format.undefined, aspect: slangpy.TextureAspect = TextureAspect.all, layer: int = 0, layer_count: int = 4294967295, mip: int = 0, mip_count: int = 4294967295, label: str = '') slangpy.TextureView
- to_bitmap(self, layer: int = 0, mip: int = 0) slangpy.Bitmap ¶
- to_numpy(self, layer: int = 0, mip: int = 0) numpy.ndarray[] ¶
- copy_from_numpy(self, data: numpy.ndarray[], layer: int = 0, mip: int = 0) None ¶
- class slangpy.TextureAddressingMode¶
Base class:
enum.Enum
- wrap: TextureAddressingMode = TextureAddressingMode.wrap¶
- clamp_to_edge: TextureAddressingMode = TextureAddressingMode.clamp_to_edge¶
- clamp_to_border: TextureAddressingMode = TextureAddressingMode.clamp_to_border¶
- mirror_repeat: TextureAddressingMode = TextureAddressingMode.mirror_repeat¶
- mirror_once: TextureAddressingMode = TextureAddressingMode.mirror_once¶
- class slangpy.TextureAspect¶
Base class:
enum.Enum
- all: TextureAspect = TextureAspect.all¶
- depth_only: TextureAspect = TextureAspect.depth_only¶
- stencil_only: TextureAspect = TextureAspect.stencil_only¶
- class slangpy.TextureDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property type: slangpy.TextureType¶
Texture type.
- property format: slangpy.Format¶
Texture format.
- property width: int¶
Width in pixels.
- property height: int¶
Height in pixels.
- property depth: int¶
Depth in pixels.
- property array_length: int¶
Array length.
- property mip_count: int¶
Number of mip levels (ALL_MIPS for all mip levels).
- property sample_count: int¶
Number of samples per pixel.
- property sample_quality: int¶
Quality level for multisampled textures.
- property memory_type: slangpy.MemoryType¶
- property usage: slangpy.TextureUsage¶
- property default_state: slangpy.ResourceState¶
- property label: str¶
Debug label.
- class slangpy.TextureFilteringMode¶
Base class:
enum.Enum
- point: TextureFilteringMode = TextureFilteringMode.point¶
- linear: TextureFilteringMode = TextureFilteringMode.linear¶
- class slangpy.TextureReductionOp¶
Base class:
enum.Enum
- average: TextureReductionOp = TextureReductionOp.average¶
- comparison: TextureReductionOp = TextureReductionOp.comparison¶
- minimum: TextureReductionOp = TextureReductionOp.minimum¶
- maximum: TextureReductionOp = TextureReductionOp.maximum¶
- class slangpy.TextureType¶
Base class:
enum.Enum
- texture_1d: TextureType = TextureType.texture_1d¶
- texture_1d_array: TextureType = TextureType.texture_1d_array¶
- texture_2d: TextureType = TextureType.texture_2d¶
- texture_2d_array: TextureType = TextureType.texture_2d_array¶
- texture_2d_ms: TextureType = TextureType.texture_2d_ms¶
- texture_2d_ms_array: TextureType = TextureType.texture_2d_ms_array¶
- texture_3d: TextureType = TextureType.texture_3d¶
- texture_cube: TextureType = TextureType.texture_cube¶
- texture_cube_array: TextureType = TextureType.texture_cube_array¶
- class slangpy.TextureUsage¶
Base class:
enum.IntFlag
- none: TextureUsage = 0¶
- shader_resource: TextureUsage = 1¶
- unordered_access: TextureUsage = 2¶
- render_target: TextureUsage = 4¶
- depth_stencil: TextureUsage = 8¶
- present: TextureUsage = 16¶
- copy_source: TextureUsage = 32¶
- copy_destination: TextureUsage = 64¶
- resolve_source: TextureUsage = 128¶
- resolve_destination: TextureUsage = 256¶
- typeless: TextureUsage = 512¶
- class slangpy.TextureView¶
Base class:
slangpy.DeviceResource
- property texture: slangpy.Texture¶
- property desc: slangpy.TextureViewDesc¶
- property format: slangpy.Format¶
- property aspect: slangpy.TextureAspect¶
- property subresource_range: slangpy.SubresourceRange¶
- property label: str¶
- property native_handle: slangpy.NativeHandle¶
- class slangpy.TextureViewDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property format: slangpy.Format¶
- property aspect: slangpy.TextureAspect¶
- property subresource_range: slangpy.SubresourceRange¶
- property label: str¶
- class slangpy.TypeConformance¶
Type conformance entry. Type conformances are used to narrow the set of types supported by a slang interface. They can be specified on an entry point to omit generating code for types that do not conform.
- __init__(self) None ¶
- __init__(self, interface_name: str, type_name: str, id: int = -1) None
- __init__(self, arg: tuple, /) None
- property interface_name: str¶
Name of the interface.
- property type_name: str¶
Name of the concrete type.
- property id: int¶
Unique id per type for an interface (optional).
- class slangpy.TypeLayoutReflection¶
Base class:
slangpy.BaseReflectionObject
- property kind: slangpy.TypeReflection.Kind¶
- property name: str¶
- property size: int¶
- property stride: int¶
- property alignment: int¶
- property type: slangpy.TypeReflection¶
- property fields: slangpy.TypeLayoutReflectionFieldList¶
- property element_type_layout: slangpy.TypeLayoutReflection¶
- unwrap_array(self) slangpy.TypeLayoutReflection ¶
- class slangpy.TypeLayoutReflectionFieldList¶
TypeLayoutReflection lazy field list evaluation.
- class slangpy.TypeReflection¶
Base class:
slangpy.BaseReflectionObject
- class ScalarType¶
Base class:
enum.Enum
- none: ScalarType = ScalarType.none¶
- void: ScalarType = ScalarType.void¶
- bool: ScalarType = ScalarType.bool¶
- int32: ScalarType = ScalarType.int32¶
- uint32: ScalarType = ScalarType.uint32¶
- int64: ScalarType = ScalarType.int64¶
- uint64: ScalarType = ScalarType.uint64¶
- float16: ScalarType = ScalarType.float16¶
- float32: ScalarType = ScalarType.float32¶
- float64: ScalarType = ScalarType.float64¶
- int8: ScalarType = ScalarType.int8¶
- uint8: ScalarType = ScalarType.uint8¶
- int16: ScalarType = ScalarType.int16¶
- uint16: ScalarType = ScalarType.uint16¶
- class ResourceShape¶
Base class:
enum.Enum
- none: ResourceShape = ResourceShape.none¶
- texture_1d: ResourceShape = ResourceShape.texture_1d¶
- texture_2d: ResourceShape = ResourceShape.texture_2d¶
- texture_3d: ResourceShape = ResourceShape.texture_3d¶
- texture_cube: ResourceShape = ResourceShape.texture_cube¶
- texture_buffer: ResourceShape = ResourceShape.texture_buffer¶
- structured_buffer: ResourceShape = ResourceShape.structured_buffer¶
- byte_address_buffer: ResourceShape = ResourceShape.byte_address_buffer¶
- unknown: ResourceShape = ResourceShape.unknown¶
- acceleration_structure: ResourceShape = ResourceShape.acceleration_structure¶
- texture_feedback_flag: ResourceShape = ResourceShape.texture_feedback_flag¶
- texture_array_flag: ResourceShape = ResourceShape.texture_array_flag¶
- texture_multisample_flag: ResourceShape = ResourceShape.texture_multisample_flag¶
- texture_1d_array: ResourceShape = ResourceShape.texture_1d_array¶
- texture_2d_array: ResourceShape = ResourceShape.texture_2d_array¶
- texture_cube_array: ResourceShape = ResourceShape.texture_cube_array¶
- texture_2d_multisample: ResourceShape = ResourceShape.texture_2d_multisample¶
- texture_2d_multisample_array: ResourceShape = ResourceShape.texture_2d_multisample_array¶
- class ResourceAccess¶
Base class:
enum.Enum
- none: ResourceAccess = ResourceAccess.none¶
- read: ResourceAccess = ResourceAccess.read¶
- read_write: ResourceAccess = ResourceAccess.read_write¶
- raster_ordered: ResourceAccess = ResourceAccess.raster_ordered¶
- access_append: ResourceAccess = ResourceAccess.access_append¶
- access_consume: ResourceAccess = ResourceAccess.access_consume¶
- access_write: ResourceAccess = ResourceAccess.access_write¶
- class ParameterCategory¶
Base class:
enum.Enum
- none: ParameterCategory = ParameterCategory.none¶
- mixed: ParameterCategory = ParameterCategory.mixed¶
- constant_buffer: ParameterCategory = ParameterCategory.constant_buffer¶
- shader_resource: ParameterCategory = ParameterCategory.shader_resource¶
- unordered_access: ParameterCategory = ParameterCategory.unordered_access¶
- varying_input: ParameterCategory = ParameterCategory.varying_input¶
- varying_output: ParameterCategory = ParameterCategory.varying_output¶
- sampler_state: ParameterCategory = ParameterCategory.sampler_state¶
- uniform: ParameterCategory = ParameterCategory.uniform¶
- descriptor_table_slot: ParameterCategory = ParameterCategory.descriptor_table_slot¶
- specialization_constant: ParameterCategory = ParameterCategory.specialization_constant¶
- push_constant_buffer: ParameterCategory = ParameterCategory.push_constant_buffer¶
- register_space: ParameterCategory = ParameterCategory.register_space¶
- generic: ParameterCategory = ParameterCategory.generic¶
- ray_payload: ParameterCategory = ParameterCategory.ray_payload¶
- hit_attributes: ParameterCategory = ParameterCategory.hit_attributes¶
- callable_payload: ParameterCategory = ParameterCategory.callable_payload¶
- shader_record: ParameterCategory = ParameterCategory.shader_record¶
- existential_type_param: ParameterCategory = ParameterCategory.existential_type_param¶
- existential_object_param: ParameterCategory = ParameterCategory.existential_object_param¶
- property kind: slangpy.TypeReflection.Kind¶
- property name: str¶
- property full_name: str¶
- property fields: slangpy.TypeReflectionFieldList¶
- property element_count: int¶
- property element_type: slangpy.TypeReflection¶
- property row_count: int¶
- property col_count: int¶
- property scalar_type: slangpy.TypeReflection.ScalarType¶
- property resource_result_type: slangpy.TypeReflection¶
- property resource_shape: slangpy.TypeReflection.ResourceShape¶
- property resource_access: slangpy.TypeReflection.ResourceAccess¶
- unwrap_array(self) slangpy.TypeReflection ¶
- class slangpy.TypeReflectionFieldList¶
TypeReflection lazy field list evaluation.
- class slangpy.VariableLayoutReflection¶
Base class:
slangpy.BaseReflectionObject
- property name: str¶
- property variable: slangpy.VariableReflection¶
- property type_layout: slangpy.TypeLayoutReflection¶
- property offset: int¶
- class slangpy.VariableReflection¶
Base class:
slangpy.BaseReflectionObject
- property name: str¶
Variable name.
- property type: slangpy.TypeReflection¶
Variable type reflection.
- has_modifier(self, modifier: slangpy.ModifierID) bool ¶
Check if variable has a given modifier (e.g. ‘inout’).
- class slangpy.VertexStreamDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property stride: int¶
The stride in bytes for this vertex stream.
- property slot_class: slangpy.InputSlotClass¶
Whether the stream contains per-vertex or per-instance data.
- property instance_data_step_rate: int¶
How many instances to draw per chunk of data.
- class slangpy.Viewport¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- static from_size(width: float, height: float) slangpy.Viewport ¶
- property x: float¶
- property y: float¶
- property width: float¶
- property height: float¶
- property min_depth: float¶
- property max_depth: float¶
Application¶
- class slangpy.AppDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property device: slangpy.Device¶
Device to use for rendering. If not provided, a default device will be created.
- class slangpy.App¶
Base class:
slangpy.Object
- __init__(self, arg: slangpy.AppDesc, /) None ¶
- __init__(self, device: slangpy.Device | None = None) None
- property device: slangpy.Device¶
- run(self) None ¶
- run_frame(self) None ¶
- terminate(self) None ¶
- class slangpy.AppWindowDesc¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property width: int¶
Width of the window in pixels.
- property height: int¶
Height of the window in pixels.
- property title: str¶
Title of the window.
- property mode: slangpy.WindowMode¶
Window mode.
- property resizable: bool¶
Whether the window is resizable.
- property surface_format: slangpy.Format¶
Format of the swapchain images.
- property enable_vsync: bool¶
Enable/disable vertical synchronization.
- class slangpy.AppWindow¶
Base class:
slangpy.Object
- __init__(self, app: slangpy.App, width: int = 1920, height: int = 1280, title: str = 'sgl', mode: slangpy.WindowMode = WindowMode.normal, resizable: bool = True, surface_format: slangpy.Format = Format.undefined, enable_vsync: bool = False) None ¶
- class RenderContext¶
- property surface_texture: slangpy.Texture¶
- property command_encoder: slangpy.CommandEncoder¶
- property device: slangpy.Device¶
- property screen: slangpy.ui.Screen¶
- render(self, render_context: slangpy.AppWindow.RenderContext) None ¶
- on_resize(self, width: int, height: int) None ¶
- on_keyboard_event(self, event: slangpy.KeyboardEvent) None ¶
- on_mouse_event(self, event: slangpy.MouseEvent) None ¶
- on_gamepad_event(self, event: slangpy.GamepadEvent) None ¶
- on_drop_files(self, files: Sequence[str]) None ¶
Math¶
- class slangpy.math.float1¶
- __init__(self) None ¶
- __init__(self, scalar: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property x: float¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float2¶
- __init__(self) None ¶
- __init__(self, scalar: float) None
- __init__(self, x: float, y: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property x: float¶
- property y: float¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float3¶
- __init__(self) None ¶
- __init__(self, scalar: float) None
- __init__(self, x: float, y: float, z: float) None
- __init__(self, xy: slangpy.math.float2, z: float) None
- __init__(self, x: float, yz: slangpy.math.float2) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property x: float¶
- property y: float¶
- property z: float¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float4¶
- __init__(self) None ¶
- __init__(self, scalar: float) None
- __init__(self, x: float, y: float, z: float, w: float) None
- __init__(self, xy: slangpy.math.float2, zw: slangpy.math.float2) None
- __init__(self, xyz: slangpy.math.float3, w: float) None
- __init__(self, x: float, yzw: slangpy.math.float3) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property x: float¶
- property y: float¶
- property z: float¶
- property w: float¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.float1¶
Alias class:
slangpy.math.float1
- class slangpy.float2¶
Alias class:
slangpy.math.float2
- class slangpy.float3¶
Alias class:
slangpy.math.float3
- class slangpy.float4¶
Alias class:
slangpy.math.float4
- class slangpy.math.int1¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.int2¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.int3¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int, z: int) None
- __init__(self, xy: slangpy.math.int2, z: int) None
- __init__(self, x: int, yz: slangpy.math.int2) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property z: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.int4¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int, z: int, w: int) None
- __init__(self, xy: slangpy.math.int2, zw: slangpy.math.int2) None
- __init__(self, xyz: slangpy.math.int3, w: int) None
- __init__(self, x: int, yzw: slangpy.math.int3) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property z: int¶
- property w: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.int1¶
Alias class:
slangpy.math.int1
- class slangpy.int2¶
Alias class:
slangpy.math.int2
- class slangpy.int3¶
Alias class:
slangpy.math.int3
- class slangpy.int4¶
Alias class:
slangpy.math.int4
- class slangpy.math.uint1¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.uint2¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.uint3¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int, z: int) None
- __init__(self, xy: slangpy.math.uint2, z: int) None
- __init__(self, x: int, yz: slangpy.math.uint2) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property z: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.uint4¶
- __init__(self) None ¶
- __init__(self, scalar: int) None
- __init__(self, x: int, y: int, z: int, w: int) None
- __init__(self, xy: slangpy.math.uint2, zw: slangpy.math.uint2) None
- __init__(self, xyz: slangpy.math.uint3, w: int) None
- __init__(self, x: int, yzw: slangpy.math.uint3) None
- __init__(self, a: collections.abc.Sequence[int]) None
- property x: int¶
- property y: int¶
- property z: int¶
- property w: int¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.uint1¶
Alias class:
slangpy.math.uint1
- class slangpy.uint2¶
Alias class:
slangpy.math.uint2
- class slangpy.uint3¶
Alias class:
slangpy.math.uint3
- class slangpy.uint4¶
Alias class:
slangpy.math.uint4
- class slangpy.math.bool1¶
- __init__(self) None ¶
- __init__(self, scalar: bool) None
- __init__(self, a: collections.abc.Sequence[bool]) None
- property x: bool¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool2¶
- __init__(self) None ¶
- __init__(self, scalar: bool) None
- __init__(self, x: bool, y: bool) None
- __init__(self, a: collections.abc.Sequence[bool]) None
- property x: bool¶
- property y: bool¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool3¶
- __init__(self) None ¶
- __init__(self, scalar: bool) None
- __init__(self, x: bool, y: bool, z: bool) None
- __init__(self, xy: slangpy.math.bool2, z: bool) None
- __init__(self, x: bool, yz: slangpy.math.bool2) None
- __init__(self, a: collections.abc.Sequence[bool]) None
- property x: bool¶
- property y: bool¶
- property z: bool¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool4¶
- __init__(self) None ¶
- __init__(self, scalar: bool) None
- __init__(self, x: bool, y: bool, z: bool, w: bool) None
- __init__(self, xy: slangpy.math.bool2, zw: slangpy.math.bool2) None
- __init__(self, xyz: slangpy.math.bool3, w: bool) None
- __init__(self, x: bool, yzw: slangpy.math.bool3) None
- __init__(self, a: collections.abc.Sequence[bool]) None
- property x: bool¶
- property y: bool¶
- property z: bool¶
- property w: bool¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.bool1¶
Alias class:
slangpy.math.bool1
- class slangpy.bool2¶
Alias class:
slangpy.math.bool2
- class slangpy.bool3¶
Alias class:
slangpy.math.bool3
- class slangpy.bool4¶
Alias class:
slangpy.math.bool4
- class slangpy.float16_t¶
Alias class:
slangpy.math.float16_t
- class slangpy.math.float16_t1¶
- __init__(self) None ¶
- __init__(self, scalar: slangpy.math.float16_t) None
- __init__(self, a: collections.abc.Sequence[slangpy.math.float16_t]) None
- property x: slangpy.math.float16_t¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float16_t2¶
- __init__(self) None ¶
- __init__(self, scalar: slangpy.math.float16_t) None
- __init__(self, x: slangpy.math.float16_t, y: slangpy.math.float16_t) None
- __init__(self, a: collections.abc.Sequence[slangpy.math.float16_t]) None
- property x: slangpy.math.float16_t¶
- property y: slangpy.math.float16_t¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float16_t3¶
- __init__(self) None ¶
- __init__(self, scalar: slangpy.math.float16_t) None
- __init__(self, x: slangpy.math.float16_t, y: slangpy.math.float16_t, z: slangpy.math.float16_t) None
- __init__(self, xy: slangpy.math.float16_t2, z: slangpy.math.float16_t) None
- __init__(self, x: slangpy.math.float16_t, yz: slangpy.math.float16_t2) None
- __init__(self, a: collections.abc.Sequence[slangpy.math.float16_t]) None
- property x: slangpy.math.float16_t¶
- property y: slangpy.math.float16_t¶
- property z: slangpy.math.float16_t¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float16_t4¶
- __init__(self) None ¶
- __init__(self, scalar: slangpy.math.float16_t) None
- __init__(self, x: slangpy.math.float16_t, y: slangpy.math.float16_t, z: slangpy.math.float16_t, w: slangpy.math.float16_t) None
- __init__(self, xy: slangpy.math.float16_t2, zw: slangpy.math.float16_t2) None
- __init__(self, xyz: slangpy.math.float16_t3, w: slangpy.math.float16_t) None
- __init__(self, x: slangpy.math.float16_t, yzw: slangpy.math.float16_t3) None
- __init__(self, a: collections.abc.Sequence[slangpy.math.float16_t]) None
- property x: slangpy.math.float16_t¶
- property y: slangpy.math.float16_t¶
- property z: slangpy.math.float16_t¶
- property w: slangpy.math.float16_t¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.float16_t1¶
Alias class:
slangpy.math.float16_t1
- class slangpy.float16_t2¶
Alias class:
slangpy.math.float16_t2
- class slangpy.float16_t3¶
Alias class:
slangpy.math.float16_t3
- class slangpy.float16_t4¶
Alias class:
slangpy.math.float16_t4
- class slangpy.math.float2x2¶
- __init__(self) None ¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(2, 2)], /) None
- static zeros() slangpy.math.float2x2 ¶
- static identity() slangpy.math.float2x2 ¶
- get_row(self, row: int) slangpy.math.float2 ¶
- set_row(self, row: int, value: slangpy.math.float2) None ¶
- get_col(self, col: int) slangpy.math.float2 ¶
- set_col(self, col: int, value: slangpy.math.float2) None ¶
- property shape: tuple¶
- property element_type: object¶
- to_numpy(self) numpy.ndarray[dtype=float32, shape=(2, 2), writable=False] ¶
- class slangpy.math.float3x3¶
- __init__(self) None ¶
- __init__(self, arg: slangpy.math.float4x4, /) None
- __init__(self, arg: slangpy.math.float3x4, /) None
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(3, 3)], /) None
- static zeros() slangpy.math.float3x3 ¶
- static identity() slangpy.math.float3x3 ¶
- get_row(self, row: int) slangpy.math.float3 ¶
- set_row(self, row: int, value: slangpy.math.float3) None ¶
- get_col(self, col: int) slangpy.math.float3 ¶
- set_col(self, col: int, value: slangpy.math.float3) None ¶
- property shape: tuple¶
- property element_type: object¶
- to_numpy(self) numpy.ndarray[dtype=float32, shape=(3, 3), writable=False] ¶
- class slangpy.math.float2x4¶
- __init__(self) None ¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(2, 4)], /) None
- static zeros() slangpy.math.float2x4 ¶
- static identity() slangpy.math.float2x4 ¶
- get_row(self, row: int) slangpy.math.float4 ¶
- set_row(self, row: int, value: slangpy.math.float4) None ¶
- get_col(self, col: int) slangpy.math.float2 ¶
- set_col(self, col: int, value: slangpy.math.float2) None ¶
- property shape: tuple¶
- property element_type: object¶
- to_numpy(self) numpy.ndarray[dtype=float32, shape=(2, 4), writable=False] ¶
- class slangpy.math.float3x4¶
- __init__(self) None ¶
- __init__(self, arg: slangpy.math.float3x3, /) None
- __init__(self, arg: slangpy.math.float4x4, /) None
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(3, 4)], /) None
- static zeros() slangpy.math.float3x4 ¶
- static identity() slangpy.math.float3x4 ¶
- get_row(self, row: int) slangpy.math.float4 ¶
- set_row(self, row: int, value: slangpy.math.float4) None ¶
- get_col(self, col: int) slangpy.math.float3 ¶
- set_col(self, col: int, value: slangpy.math.float3) None ¶
- property shape: tuple¶
- property element_type: object¶
- to_numpy(self) numpy.ndarray[dtype=float32, shape=(3, 4), writable=False] ¶
- class slangpy.math.float4x4¶
- __init__(self) None ¶
- __init__(self, arg: slangpy.math.float3x3, /) None
- __init__(self, arg: slangpy.math.float3x4, /) None
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(4, 4)], /) None
- static zeros() slangpy.math.float4x4 ¶
- static identity() slangpy.math.float4x4 ¶
- get_row(self, row: int) slangpy.math.float4 ¶
- set_row(self, row: int, value: slangpy.math.float4) None ¶
- get_col(self, col: int) slangpy.math.float4 ¶
- set_col(self, col: int, value: slangpy.math.float4) None ¶
- property shape: tuple¶
- property element_type: object¶
- to_numpy(self) numpy.ndarray[dtype=float32, shape=(4, 4), writable=False] ¶
- class slangpy.float2x2¶
Alias class:
slangpy.math.float2x2
- class slangpy.float3x3¶
Alias class:
slangpy.math.float3x3
- class slangpy.float2x4¶
Alias class:
slangpy.math.float2x4
- class slangpy.float3x4¶
Alias class:
slangpy.math.float3x4
- class slangpy.float4x4¶
Alias class:
slangpy.math.float4x4
- class slangpy.math.quatf¶
- __init__(self) None ¶
- __init__(self, x: float, y: float, z: float, w: float) None
- __init__(self, xyz: slangpy.math.float3, w: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- static identity() slangpy.math.quatf ¶
- property x: float¶
- property y: float¶
- property z: float¶
- property w: float¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.quatf¶
Alias class:
slangpy.math.quatf
- class slangpy.math.Handedness¶
Base class:
enum.Enum
- right_handed: Handedness = Handedness.right_handed¶
- left_handed: Handedness = Handedness.left_handed¶
- slangpy.math.isfinite(x: float) bool ¶
- slangpy.math.isfinite(x: float) bool
- slangpy.math.isfinite(x: slangpy.math.float16_t) bool
- slangpy.math.isfinite(x: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.isfinite(x: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.isfinite(x: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.isfinite(x: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.isfinite(x: slangpy.math.quatf) slangpy.math.bool4
- slangpy.math.isinf(x: float) bool ¶
- slangpy.math.isinf(x: float) bool
- slangpy.math.isinf(x: slangpy.math.float16_t) bool
- slangpy.math.isinf(x: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.isinf(x: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.isinf(x: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.isinf(x: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.isinf(x: slangpy.math.quatf) slangpy.math.bool4
- slangpy.math.isnan(x: float) bool ¶
- slangpy.math.isnan(x: float) bool
- slangpy.math.isnan(x: slangpy.math.float16_t) bool
- slangpy.math.isnan(x: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.isnan(x: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.isnan(x: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.isnan(x: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.isnan(x: slangpy.math.quatf) slangpy.math.bool4
- slangpy.math.floor(x: float) float ¶
- slangpy.math.floor(x: float) float
- slangpy.math.floor(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.floor(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.floor(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.floor(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.ceil(x: float) float ¶
- slangpy.math.ceil(x: float) float
- slangpy.math.ceil(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.ceil(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.ceil(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.ceil(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.trunc(x: float) float ¶
- slangpy.math.trunc(x: float) float
- slangpy.math.trunc(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.trunc(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.trunc(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.trunc(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.round(x: float) float ¶
- slangpy.math.round(x: float) float
- slangpy.math.round(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.round(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.round(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.round(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.pow(x: float, y: float) float ¶
- slangpy.math.pow(x: float, y: float) float
- slangpy.math.pow(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.float1
- slangpy.math.pow(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.pow(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.pow(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.sqrt(x: float) float ¶
- slangpy.math.sqrt(x: float) float
- slangpy.math.sqrt(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.sqrt(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.sqrt(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.sqrt(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.rsqrt(x: float) float ¶
- slangpy.math.rsqrt(x: float) float
- slangpy.math.rsqrt(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.rsqrt(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.rsqrt(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.rsqrt(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.exp(x: float) float ¶
- slangpy.math.exp(x: float) float
- slangpy.math.exp(x: slangpy.math.float16_t) slangpy.math.float16_t
- slangpy.math.exp(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.exp(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.exp(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.exp(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.exp2(x: float) float ¶
- slangpy.math.exp2(x: float) float
- slangpy.math.exp2(x: slangpy.math.float16_t) slangpy.math.float16_t
- slangpy.math.exp2(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.exp2(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.exp2(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.exp2(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.log(x: float) float ¶
- slangpy.math.log(x: float) float
- slangpy.math.log(x: slangpy.math.float16_t) slangpy.math.float16_t
- slangpy.math.log(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.log(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.log(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.log(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.log2(x: float) float ¶
- slangpy.math.log2(x: float) float
- slangpy.math.log2(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.log2(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.log2(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.log2(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.log10(x: float) float ¶
- slangpy.math.log10(x: float) float
- slangpy.math.log10(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.log10(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.log10(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.log10(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.radians(x: float) float ¶
- slangpy.math.radians(x: float) float
- slangpy.math.radians(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.radians(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.radians(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.radians(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.degrees(x: float) float ¶
- slangpy.math.degrees(x: float) float
- slangpy.math.degrees(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.degrees(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.degrees(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.degrees(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.sin(x: float) float ¶
- slangpy.math.sin(x: float) float
- slangpy.math.sin(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.sin(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.sin(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.sin(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.cos(x: float) float ¶
- slangpy.math.cos(x: float) float
- slangpy.math.cos(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.cos(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.cos(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.cos(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.tan(x: float) float ¶
- slangpy.math.tan(x: float) float
- slangpy.math.tan(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.tan(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.tan(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.tan(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.asin(x: float) float ¶
- slangpy.math.asin(x: float) float
- slangpy.math.asin(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.asin(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.asin(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.asin(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.acos(x: float) float ¶
- slangpy.math.acos(x: float) float
- slangpy.math.acos(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.acos(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.acos(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.acos(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.atan(x: float) float ¶
- slangpy.math.atan(x: float) float
- slangpy.math.atan(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.atan(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.atan(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.atan(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.atan2(y: float, x: float) float ¶
- slangpy.math.atan2(y: float, x: float) float
- slangpy.math.atan2(y: slangpy.math.float1, x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.atan2(y: slangpy.math.float2, x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.atan2(y: slangpy.math.float3, x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.atan2(y: slangpy.math.float4, x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.sinh(x: float) float ¶
- slangpy.math.sinh(x: float) float
- slangpy.math.sinh(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.sinh(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.sinh(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.sinh(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.cosh(x: float) float ¶
- slangpy.math.cosh(x: float) float
- slangpy.math.cosh(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.cosh(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.cosh(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.cosh(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.tanh(x: float) float ¶
- slangpy.math.tanh(x: float) float
- slangpy.math.tanh(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.tanh(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.tanh(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.tanh(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.fmod(x: float, y: float) float ¶
- slangpy.math.fmod(x: float, y: float) float
- slangpy.math.fmod(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.float1
- slangpy.math.fmod(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.fmod(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.fmod(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.frac(x: float) float ¶
- slangpy.math.frac(x: float) float
- slangpy.math.frac(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.frac(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.frac(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.frac(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.lerp(x: float, y: float, s: float) float ¶
- slangpy.math.lerp(x: float, y: float, s: float) float
- slangpy.math.lerp(x: slangpy.math.float1, y: slangpy.math.float1, s: slangpy.math.float1) slangpy.math.float1
- slangpy.math.lerp(x: slangpy.math.float1, y: slangpy.math.float1, s: float) slangpy.math.float1
- slangpy.math.lerp(x: slangpy.math.float2, y: slangpy.math.float2, s: slangpy.math.float2) slangpy.math.float2
- slangpy.math.lerp(x: slangpy.math.float2, y: slangpy.math.float2, s: float) slangpy.math.float2
- slangpy.math.lerp(x: slangpy.math.float3, y: slangpy.math.float3, s: slangpy.math.float3) slangpy.math.float3
- slangpy.math.lerp(x: slangpy.math.float3, y: slangpy.math.float3, s: float) slangpy.math.float3
- slangpy.math.lerp(x: slangpy.math.float4, y: slangpy.math.float4, s: slangpy.math.float4) slangpy.math.float4
- slangpy.math.lerp(x: slangpy.math.float4, y: slangpy.math.float4, s: float) slangpy.math.float4
- slangpy.math.lerp(x: slangpy.math.quatf, y: slangpy.math.quatf, s: float) slangpy.math.quatf
- slangpy.math.rcp(x: float) float ¶
- slangpy.math.rcp(x: float) float
- slangpy.math.rcp(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.rcp(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.rcp(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.rcp(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.saturate(x: float) float ¶
- slangpy.math.saturate(x: float) float
- slangpy.math.saturate(x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.saturate(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.saturate(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.saturate(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.step(x: float, y: float) float ¶
- slangpy.math.step(x: float, y: float) float
- slangpy.math.step(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.float1
- slangpy.math.step(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.step(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.step(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.smoothstep(min: float, max: float, x: float) float ¶
- slangpy.math.smoothstep(min: float, max: float, x: float) float
- slangpy.math.smoothstep(min: slangpy.math.float1, max: slangpy.math.float1, x: slangpy.math.float1) slangpy.math.float1
- slangpy.math.smoothstep(min: slangpy.math.float2, max: slangpy.math.float2, x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.smoothstep(min: slangpy.math.float3, max: slangpy.math.float3, x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.smoothstep(min: slangpy.math.float4, max: slangpy.math.float4, x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.f16tof32(x: int) float ¶
- slangpy.math.f16tof32(x: slangpy.math.uint2) slangpy.math.float2
- slangpy.math.f16tof32(x: slangpy.math.uint3) slangpy.math.float3
- slangpy.math.f16tof32(x: slangpy.math.uint4) slangpy.math.float4
- slangpy.math.f32tof16(x: float) int ¶
- slangpy.math.f32tof16(x: slangpy.math.float2) slangpy.math.uint2
- slangpy.math.f32tof16(x: slangpy.math.float3) slangpy.math.uint3
- slangpy.math.f32tof16(x: slangpy.math.float4) slangpy.math.uint4
- slangpy.math.asfloat(x: int) float ¶
- slangpy.math.asfloat(x: int) float
- slangpy.math.asfloat16(x: int) slangpy.math.float16_t ¶
- slangpy.math.asuint(x: float) int ¶
- slangpy.math.asuint(x: slangpy.math.float2) slangpy.math.uint2
- slangpy.math.asuint(x: slangpy.math.float3) slangpy.math.uint3
- slangpy.math.asuint(x: slangpy.math.float4) slangpy.math.uint4
- slangpy.math.asint(x: float) int ¶
- slangpy.math.asuint16(x: slangpy.math.float16_t) int ¶
- slangpy.math.min(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.min(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.min(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.min(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.min(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.uint1
- slangpy.math.min(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.uint2
- slangpy.math.min(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.uint3
- slangpy.math.min(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.uint4
- slangpy.math.min(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.int1
- slangpy.math.min(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.int2
- slangpy.math.min(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.int3
- slangpy.math.min(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.int4
- slangpy.math.min(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.min(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.min(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.min(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.max(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.max(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.max(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.max(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.max(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.uint1
- slangpy.math.max(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.uint2
- slangpy.math.max(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.uint3
- slangpy.math.max(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.uint4
- slangpy.math.max(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.int1
- slangpy.math.max(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.int2
- slangpy.math.max(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.int3
- slangpy.math.max(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.int4
- slangpy.math.max(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.max(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.max(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.max(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.clamp(x: slangpy.math.float1, min: slangpy.math.float1, max: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.clamp(x: slangpy.math.float2, min: slangpy.math.float2, max: slangpy.math.float2) slangpy.math.float2
- slangpy.math.clamp(x: slangpy.math.float3, min: slangpy.math.float3, max: slangpy.math.float3) slangpy.math.float3
- slangpy.math.clamp(x: slangpy.math.float4, min: slangpy.math.float4, max: slangpy.math.float4) slangpy.math.float4
- slangpy.math.clamp(x: slangpy.math.uint1, min: slangpy.math.uint1, max: slangpy.math.uint1) slangpy.math.uint1
- slangpy.math.clamp(x: slangpy.math.uint2, min: slangpy.math.uint2, max: slangpy.math.uint2) slangpy.math.uint2
- slangpy.math.clamp(x: slangpy.math.uint3, min: slangpy.math.uint3, max: slangpy.math.uint3) slangpy.math.uint3
- slangpy.math.clamp(x: slangpy.math.uint4, min: slangpy.math.uint4, max: slangpy.math.uint4) slangpy.math.uint4
- slangpy.math.clamp(x: slangpy.math.int1, min: slangpy.math.int1, max: slangpy.math.int1) slangpy.math.int1
- slangpy.math.clamp(x: slangpy.math.int2, min: slangpy.math.int2, max: slangpy.math.int2) slangpy.math.int2
- slangpy.math.clamp(x: slangpy.math.int3, min: slangpy.math.int3, max: slangpy.math.int3) slangpy.math.int3
- slangpy.math.clamp(x: slangpy.math.int4, min: slangpy.math.int4, max: slangpy.math.int4) slangpy.math.int4
- slangpy.math.clamp(x: slangpy.math.bool1, min: slangpy.math.bool1, max: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.clamp(x: slangpy.math.bool2, min: slangpy.math.bool2, max: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.clamp(x: slangpy.math.bool3, min: slangpy.math.bool3, max: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.clamp(x: slangpy.math.bool4, min: slangpy.math.bool4, max: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.abs(x: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.abs(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.abs(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.abs(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.abs(x: slangpy.math.int1) slangpy.math.int1
- slangpy.math.abs(x: slangpy.math.int2) slangpy.math.int2
- slangpy.math.abs(x: slangpy.math.int3) slangpy.math.int3
- slangpy.math.abs(x: slangpy.math.int4) slangpy.math.int4
- slangpy.math.sign(x: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.sign(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.sign(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.sign(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.sign(x: slangpy.math.int1) slangpy.math.int1
- slangpy.math.sign(x: slangpy.math.int2) slangpy.math.int2
- slangpy.math.sign(x: slangpy.math.int3) slangpy.math.int3
- slangpy.math.sign(x: slangpy.math.int4) slangpy.math.int4
- slangpy.math.dot(x: slangpy.math.float1, y: slangpy.math.float1) float ¶
- slangpy.math.dot(x: slangpy.math.float2, y: slangpy.math.float2) float
- slangpy.math.dot(x: slangpy.math.float3, y: slangpy.math.float3) float
- slangpy.math.dot(x: slangpy.math.float4, y: slangpy.math.float4) float
- slangpy.math.dot(x: slangpy.math.uint1, y: slangpy.math.uint1) int
- slangpy.math.dot(x: slangpy.math.uint2, y: slangpy.math.uint2) int
- slangpy.math.dot(x: slangpy.math.uint3, y: slangpy.math.uint3) int
- slangpy.math.dot(x: slangpy.math.uint4, y: slangpy.math.uint4) int
- slangpy.math.dot(x: slangpy.math.int1, y: slangpy.math.int1) int
- slangpy.math.dot(x: slangpy.math.int2, y: slangpy.math.int2) int
- slangpy.math.dot(x: slangpy.math.int3, y: slangpy.math.int3) int
- slangpy.math.dot(x: slangpy.math.int4, y: slangpy.math.int4) int
- slangpy.math.dot(x: slangpy.math.quatf, y: slangpy.math.quatf) float
- slangpy.math.length(x: slangpy.math.float1) float ¶
- slangpy.math.length(x: slangpy.math.float2) float
- slangpy.math.length(x: slangpy.math.float3) float
- slangpy.math.length(x: slangpy.math.float4) float
- slangpy.math.length(x: slangpy.math.quatf) float
- slangpy.math.normalize(x: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.normalize(x: slangpy.math.float2) slangpy.math.float2
- slangpy.math.normalize(x: slangpy.math.float3) slangpy.math.float3
- slangpy.math.normalize(x: slangpy.math.float4) slangpy.math.float4
- slangpy.math.normalize(x: slangpy.math.quatf) slangpy.math.quatf
- slangpy.math.reflect(i: slangpy.math.float1, n: slangpy.math.float1) slangpy.math.float1 ¶
- slangpy.math.reflect(i: slangpy.math.float2, n: slangpy.math.float2) slangpy.math.float2
- slangpy.math.reflect(i: slangpy.math.float3, n: slangpy.math.float3) slangpy.math.float3
- slangpy.math.reflect(i: slangpy.math.float4, n: slangpy.math.float4) slangpy.math.float4
- slangpy.math.cross(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.float3 ¶
- slangpy.math.cross(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.uint3
- slangpy.math.cross(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.int3
- slangpy.math.cross(x: slangpy.math.quatf, y: slangpy.math.quatf) slangpy.math.quatf
- slangpy.math.any(x: slangpy.math.bool1) bool ¶
- slangpy.math.any(x: slangpy.math.bool2) bool
- slangpy.math.any(x: slangpy.math.bool3) bool
- slangpy.math.any(x: slangpy.math.bool4) bool
- slangpy.math.all(x: slangpy.math.bool1) bool ¶
- slangpy.math.all(x: slangpy.math.bool2) bool
- slangpy.math.all(x: slangpy.math.bool3) bool
- slangpy.math.all(x: slangpy.math.bool4) bool
- slangpy.math.none(x: slangpy.math.bool1) bool ¶
- slangpy.math.none(x: slangpy.math.bool2) bool
- slangpy.math.none(x: slangpy.math.bool3) bool
- slangpy.math.none(x: slangpy.math.bool4) bool
- slangpy.math.transpose(x: slangpy.math.float2x2) slangpy.math.float2x2 ¶
- slangpy.math.transpose(x: slangpy.math.float3x3) slangpy.math.float3x3
- slangpy.math.transpose(x: slangpy.math.float2x4) sgl::math::matrix<float,4,2>
- slangpy.math.transpose(x: slangpy.math.float3x4) sgl::math::matrix<float,4,3>
- slangpy.math.transpose(x: slangpy.math.float4x4) slangpy.math.float4x4
- slangpy.math.determinant(x: slangpy.math.float2x2) float ¶
- slangpy.math.determinant(x: slangpy.math.float3x3) float
- slangpy.math.determinant(x: slangpy.math.float4x4) float
- slangpy.math.inverse(x: slangpy.math.float2x2) slangpy.math.float2x2 ¶
- slangpy.math.inverse(x: slangpy.math.float3x3) slangpy.math.float3x3
- slangpy.math.inverse(x: slangpy.math.float4x4) slangpy.math.float4x4
- slangpy.math.inverse(x: slangpy.math.quatf) slangpy.math.quatf
- slangpy.math.mul(x: slangpy.math.float2x2, y: slangpy.math.float2x2) slangpy.math.float2x2 ¶
- slangpy.math.mul(x: slangpy.math.float2x2, y: slangpy.math.float2) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float2, y: slangpy.math.float2x2) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float3x3, y: slangpy.math.float3x3) slangpy.math.float3x3
- slangpy.math.mul(x: slangpy.math.float3x3, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float3, y: slangpy.math.float3x3) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float2x4, y: sgl::math::matrix<float, 4, 2>) slangpy.math.float2x2
- slangpy.math.mul(x: slangpy.math.float2x4, y: slangpy.math.float4) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float2, y: slangpy.math.float2x4) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.float3x4, y: sgl::math::matrix<float, 4, 3>) slangpy.math.float3x3
- slangpy.math.mul(x: slangpy.math.float3x4, y: slangpy.math.float4) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float3, y: slangpy.math.float3x4) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.float4x4, y: slangpy.math.float4x4) slangpy.math.float4x4
- slangpy.math.mul(x: slangpy.math.float4x4, y: slangpy.math.float4) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.float4, y: slangpy.math.float4x4) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.quatf, y: slangpy.math.quatf) slangpy.math.quatf
- slangpy.math.mul(x: slangpy.math.quatf, y: slangpy.math.float3) slangpy.math.float3
- slangpy.math.transform_point(m: slangpy.math.float4x4, v: slangpy.math.float3) slangpy.math.float3 ¶
- slangpy.math.transform_vector(m: slangpy.math.float3x3, v: slangpy.math.float3) slangpy.math.float3 ¶
- slangpy.math.transform_vector(m: slangpy.math.float4x4, v: slangpy.math.float3) slangpy.math.float3
- slangpy.math.transform_vector(q: slangpy.math.quatf, v: slangpy.math.float3) slangpy.math.float3
- slangpy.math.translate(m: slangpy.math.float4x4, v: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.rotate(m: slangpy.math.float4x4, angle: float, axis: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.scale(m: slangpy.math.float4x4, v: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.perspective(fovy: float, aspect: float, z_near: float, z_far: float) slangpy.math.float4x4 ¶
- slangpy.math.ortho(left: float, right: float, bottom: float, top: float, z_near: float, z_far: float) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_translation(v: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_scaling(v: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation(angle: float, axis: slangpy.math.float3) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation_x(angle: float) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation_y(angle: float) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation_z(angle: float) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation_xyz(angle_x: float, angle_y: float, angle_z: float) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_rotation_xyz(angles: slangpy.math.float3) slangpy.math.float4x4
- slangpy.math.matrix_from_look_at(eye: slangpy.math.float3, center: slangpy.math.float3, up: slangpy.math.float3, handedness: slangpy.math.Handedness = Handedness.right_handed) slangpy.math.float4x4 ¶
- slangpy.math.matrix_from_quat(q: slangpy.math.quatf) slangpy.math.float3x3 ¶
- slangpy.math.conjugate(x: slangpy.math.quatf) slangpy.math.quatf ¶
- slangpy.math.slerp(x: slangpy.math.quatf, y: slangpy.math.quatf, s: float) slangpy.math.quatf ¶
- slangpy.math.pitch(x: slangpy.math.quatf) float ¶
- slangpy.math.yaw(x: slangpy.math.quatf) float ¶
- slangpy.math.roll(x: slangpy.math.quatf) float ¶
- slangpy.math.euler_angles(x: slangpy.math.quatf) slangpy.math.float3 ¶
- slangpy.math.quat_from_angle_axis(angle: float, axis: slangpy.math.float3) slangpy.math.quatf ¶
- slangpy.math.quat_from_rotation_between_vectors(from_: slangpy.math.float3, to: slangpy.math.float3) slangpy.math.quatf ¶
- slangpy.math.quat_from_euler_angles(angles: slangpy.math.float3) slangpy.math.quatf ¶
- slangpy.math.quat_from_matrix(m: slangpy.math.float3x3) slangpy.math.quatf ¶
- slangpy.math.quat_from_look_at(dir: slangpy.math.float3, up: slangpy.math.float3, handedness: slangpy.math.Handedness = Handedness.right_handed) slangpy.math.quatf ¶
UI¶
- class slangpy.ui.Context¶
Base class:
slangpy.Object
- __init__(self, device: slangpy.Device) None ¶
- new_frame(self, width: int, height: int) None ¶
- render(self, texture_view: slangpy.TextureView, command_encoder: slangpy.CommandEncoder) None ¶
- render(self, texture: slangpy.Texture, command_encoder: slangpy.CommandEncoder) None
- handle_keyboard_event(self, event: slangpy.KeyboardEvent) bool ¶
- handle_mouse_event(self, event: slangpy.MouseEvent) bool ¶
- process_events(self) None ¶
- property screen: slangpy.ui.Screen¶
- class slangpy.ui.Widget¶
Base class:
slangpy.Object
Base class for Python UI widgets. Widgets own their children.
- property parent: slangpy.ui.Widget¶
- property children: list[slangpy.ui.Widget]¶
- property visible: bool¶
- property enabled: bool¶
- child_index(self, child: slangpy.ui.Widget) int ¶
- add_child(self, child: slangpy.ui.Widget) None ¶
- add_child_at(self, child: slangpy.ui.Widget, index: int) None ¶
- remove_child(self, child: slangpy.ui.Widget) None ¶
- remove_child_at(self, index: int) None ¶
- remove_all_children(self) None ¶
- class slangpy.ui.Screen¶
Base class:
slangpy.ui.Widget
This is the main widget that represents the screen. It is intended to be used as the parent for
Window
widgets.- dispatch_events(self) None ¶
- class slangpy.ui.Window¶
Base class:
slangpy.ui.Widget
- __init__(self, parent: slangpy.ui.Widget | None, title: str = '', position: slangpy.math.float2 = {10, 10}, size: slangpy.math.float2 = {400, 400}) None ¶
- show(self) None ¶
- close(self) None ¶
- property title: str¶
- property position: slangpy.math.float2¶
- property size: slangpy.math.float2¶
- class slangpy.ui.Group¶
Base class:
slangpy.ui.Widget
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '') None ¶
- property label: str¶
- class slangpy.ui.Text¶
Base class:
slangpy.ui.Widget
- __init__(self, parent: slangpy.ui.Widget | None, text: str = '') None ¶
- property text: str¶
- class slangpy.ui.ProgressBar¶
Base class:
slangpy.ui.Widget
- __init__(self, parent: slangpy.ui.Widget | None, fraction: float = 0.0) None ¶
- property fraction: float¶
- class slangpy.ui.Button¶
Base class:
slangpy.ui.Widget
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', callback: collections.abc.Callable[[], None] | None = None) None ¶
- property label: str¶
- property callback: collections.abc.Callable[[], None]¶
- class slangpy.ui.ValuePropertyBool¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: bool¶
- property callback: collections.abc.Callable[[bool], None]¶
- class slangpy.ui.ValuePropertyInt¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: int¶
- property callback: collections.abc.Callable[[int], None]¶
- class slangpy.ui.ValuePropertyInt2¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.int2¶
- property callback: collections.abc.Callable[[slangpy.math.int2], None]¶
- class slangpy.ui.ValuePropertyInt3¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.int3¶
- property callback: collections.abc.Callable[[slangpy.math.int3], None]¶
- class slangpy.ui.ValuePropertyInt4¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.int4¶
- property callback: collections.abc.Callable[[slangpy.math.int4], None]¶
- class slangpy.ui.ValuePropertyFloat¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: float¶
- property callback: collections.abc.Callable[[float], None]¶
- class slangpy.ui.ValuePropertyFloat2¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.float2¶
- property callback: collections.abc.Callable[[slangpy.math.float2], None]¶
- class slangpy.ui.ValuePropertyFloat3¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.float3¶
- property callback: collections.abc.Callable[[slangpy.math.float3], None]¶
- class slangpy.ui.ValuePropertyFloat4¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: slangpy.math.float4¶
- property callback: collections.abc.Callable[[slangpy.math.float4], None]¶
- class slangpy.ui.ValuePropertyString¶
Base class:
slangpy.ui.Widget
- property label: str¶
- property value: str¶
- property callback: collections.abc.Callable[[str], None]¶
- class slangpy.ui.CheckBox¶
Base class:
slangpy.ui.ValuePropertyBool
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: bool = False, callback: collections.abc.Callable[[bool], None] | None = None) None ¶
- class slangpy.ui.ComboBox¶
Base class:
slangpy.ui.ValuePropertyInt
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: int = 0, callback: collections.abc.Callable[[int], None] | None = None, items: collections.abc.Sequence[str] = []) None ¶
- property items: list[str]¶
- class slangpy.ui.ListBox¶
Base class:
slangpy.ui.ValuePropertyInt
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: int = 0, callback: collections.abc.Callable[[int], None] | None = None, items: collections.abc.Sequence[str] = [], height_in_items: int = -1) None ¶
- property items: list[str]¶
- property height_in_items: int¶
- class slangpy.ui.SliderFlags¶
Base class:
enum.IntFlag
- none: SliderFlags = 0¶
- always_clamp: SliderFlags = 16¶
- logarithmic: SliderFlags = 32¶
- no_round_to_format: SliderFlags = 64¶
- no_input: SliderFlags = 128¶
- class slangpy.ui.DragFloat¶
Base class:
slangpy.ui.ValuePropertyFloat
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: float = 0.0, callback: collections.abc.Callable[[float], None] | None = None, speed: float = 1.0, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: float¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragFloat2¶
Base class:
slangpy.ui.ValuePropertyFloat2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.float2], None] | None = None, speed: float = 1.0, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: float¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragFloat3¶
Base class:
slangpy.ui.ValuePropertyFloat3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float3], None] | None = None, speed: float = 1.0, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: float¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragFloat4¶
Base class:
slangpy.ui.ValuePropertyFloat4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float4], None] | None = None, speed: float = 1.0, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: float¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragInt¶
Base class:
slangpy.ui.ValuePropertyInt
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: int = 0, callback: collections.abc.Callable[[int], None] | None = None, speed: float = 1.0, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: int¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragInt2¶
Base class:
slangpy.ui.ValuePropertyInt2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.int2], None] | None = None, speed: float = 1.0, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: int¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragInt3¶
Base class:
slangpy.ui.ValuePropertyInt3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int3], None] | None = None, speed: float = 1.0, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: int¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.DragInt4¶
Base class:
slangpy.ui.ValuePropertyInt4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int4], None] | None = None, speed: float = 1.0, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property speed: int¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderFloat¶
Base class:
slangpy.ui.ValuePropertyFloat
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: float = 0.0, callback: collections.abc.Callable[[float], None] | None = None, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderFloat2¶
Base class:
slangpy.ui.ValuePropertyFloat2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.float2], None] | None = None, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderFloat3¶
Base class:
slangpy.ui.ValuePropertyFloat3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float3], None] | None = None, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderFloat4¶
Base class:
slangpy.ui.ValuePropertyFloat4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float4], None] | None = None, min: float = 0.0, max: float = 0.0, format: str = '%.3f', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: float¶
- property max: float¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderInt¶
Base class:
slangpy.ui.ValuePropertyInt
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: int = 0, callback: collections.abc.Callable[[int], None] | None = None, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderInt2¶
Base class:
slangpy.ui.ValuePropertyInt2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.int2], None] | None = None, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderInt3¶
Base class:
slangpy.ui.ValuePropertyInt3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int3], None] | None = None, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.SliderInt4¶
Base class:
slangpy.ui.ValuePropertyInt4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int4], None] | None = None, min: int = 0, max: int = 0, format: str = '%d', flags: slangpy.ui.SliderFlags = 0) None ¶
- property min: int¶
- property max: int¶
- property format: str¶
- property flags: slangpy.ui.SliderFlags¶
- class slangpy.ui.InputTextFlags¶
Base class:
enum.IntFlag
- none: InputTextFlags = 0¶
- chars_decimal: InputTextFlags = 1¶
- chars_hexadecimal: InputTextFlags = 2¶
- chars_uppercase: InputTextFlags = 4¶
- chars_no_blank: InputTextFlags = 8¶
- auto_select_all: InputTextFlags = 16¶
- enter_returns_true: InputTextFlags = 32¶
- callback_completion: InputTextFlags = 64¶
- callback_history: InputTextFlags = 128¶
- callback_always: InputTextFlags = 256¶
- callback_char_filter: InputTextFlags = 512¶
- allow_tab_input: InputTextFlags = 1024¶
- ctrl_enter_for_new_line: InputTextFlags = 2048¶
- no_horizontal_scroll: InputTextFlags = 4096¶
- always_overwrite: InputTextFlags = 8192¶
- read_only: InputTextFlags = 16384¶
- password: InputTextFlags = 32768¶
- no_undo_redo: InputTextFlags = 65536¶
- chars_scientific: InputTextFlags = 131072¶
- escape_clears_all: InputTextFlags = 1048576¶
- class slangpy.ui.InputFloat¶
Base class:
slangpy.ui.ValuePropertyFloat
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: float = 0.0, callback: collections.abc.Callable[[float], None] | None = None, step: float = 1.0, step_fast: float = 100.0, format: str = '%.3f', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: float¶
- property step_fast: float¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputFloat2¶
Base class:
slangpy.ui.ValuePropertyFloat2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.float2], None] | None = None, step: float = 1.0, step_fast: float = 100.0, format: str = '%.3f', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: float¶
- property step_fast: float¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputFloat3¶
Base class:
slangpy.ui.ValuePropertyFloat3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float3], None] | None = None, step: float = 1.0, step_fast: float = 100.0, format: str = '%.3f', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: float¶
- property step_fast: float¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputFloat4¶
Base class:
slangpy.ui.ValuePropertyFloat4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.float4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.float4], None] | None = None, step: float = 1.0, step_fast: float = 100.0, format: str = '%.3f', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: float¶
- property step_fast: float¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputInt¶
Base class:
slangpy.ui.ValuePropertyInt
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: int = 0, callback: collections.abc.Callable[[int], None] | None = None, step: int = 1, step_fast: int = 100, format: str = '%d', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: int¶
- property step_fast: int¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputInt2¶
Base class:
slangpy.ui.ValuePropertyInt2
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int2 = {0, 0}, callback: collections.abc.Callable[[slangpy.math.int2], None] | None = None, step: int = 1, step_fast: int = 100, format: str = '%d', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: int¶
- property step_fast: int¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputInt3¶
Base class:
slangpy.ui.ValuePropertyInt3
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int3 = {0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int3], None] | None = None, step: int = 1, step_fast: int = 100, format: str = '%d', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: int¶
- property step_fast: int¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputInt4¶
Base class:
slangpy.ui.ValuePropertyInt4
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: slangpy.math.int4 = {0, 0, 0, 0}, callback: collections.abc.Callable[[slangpy.math.int4], None] | None = None, step: int = 1, step_fast: int = 100, format: str = '%d', flags: slangpy.ui.InputTextFlags = 0) None ¶
- property step: int¶
- property step_fast: int¶
- property format: str¶
- property flags: slangpy.ui.InputTextFlags¶
- class slangpy.ui.InputText¶
Base class:
slangpy.ui.ValuePropertyString
- __init__(self, parent: slangpy.ui.Widget | None, label: str = '', value: str = False, callback: collections.abc.Callable[[str], None] | None = None, multi_line: bool = False, flags: slangpy.ui.InputTextFlags = 0) None ¶
Utilities¶
- class slangpy.TextureLoader¶
Base class:
slangpy.Object
Utility class for loading textures from bitmaps and image files.
- __init__(self, device: slangpy.Device) None ¶
- class Options¶
- __init__(self) None ¶
- __init__(self, arg: dict, /) None
- property load_as_normalized: bool¶
Load 8/16-bit integer data as normalized resource format.
- property load_as_srgb: bool¶
Use
Format::rgba8_unorm_srgb
format if bitmap is 8-bit RGBA with sRGB gamma.
- property extend_alpha: bool¶
Extend RGB to RGBA if RGB texture format is not available.
- property allocate_mips: bool¶
Allocate mip levels for the texture.
- property generate_mips: bool¶
Generate mip levels for the texture.
- property usage: slangpy.TextureUsage¶
- load_texture(self, bitmap: slangpy.Bitmap, options: slangpy.TextureLoader.Options | None = None) slangpy.Texture ¶
Load a texture from a bitmap.
- Parameter
bitmap
: Bitmap to load.
- Parameter
options
: Texture loading options.
- Returns:
New texture object.
- Parameter
- load_texture(self, path: str | os.PathLike, options: slangpy.TextureLoader.Options | None = None) slangpy.Texture
Load a texture from an image file.
- Parameter
path
: Image file path.
- Parameter
options
: Texture loading options.
- Returns:
New texture object.
- Parameter
- load_textures(self, bitmaps: Sequence[slangpy.Bitmap], options: slangpy.TextureLoader.Options | None = None) list[slangpy.Texture] ¶
Load textures from a list of bitmaps.
- Parameter
bitmaps
: Bitmaps to load.
- Parameter
options
: Texture loading options.
- Returns:
List of new of texture objects.
- Parameter
- load_textures(self, paths: Sequence[str | os.PathLike], options: slangpy.TextureLoader.Options | None = None) list[slangpy.Texture]
Load textures from a list of image files.
- Parameter
paths
: Image file paths.
- Parameter
options
: Texture loading options.
- Returns:
List of new texture objects.
- Parameter
- load_texture_array(self, bitmaps: Sequence[slangpy.Bitmap], options: slangpy.TextureLoader.Options | None = None) slangpy.Texture ¶
Load a texture array from a list of bitmaps.
All bitmaps need to have the same format and dimensions.
- Parameter
bitmaps
: Bitmaps to load.
- Parameter
options
: Texture loading options.
- Returns:
New texture array object.
- Parameter
- load_texture_array(self, paths: Sequence[str | os.PathLike], options: slangpy.TextureLoader.Options | None = None) slangpy.Texture
Load a texture array from a list of image files.
All images need to have the same format and dimensions.
- Parameter
paths
: Image file paths.
- Parameter
options
: Texture loading options.
- Returns:
New texture array object.
- Parameter
- slangpy.tev.show(bitmap: slangpy.Bitmap, name: str = '', host: str = '127.0.0.1', port: int = 14158, max_retries: int = 3) bool ¶
Show a bitmap in the tev viewer (https://github.com/Tom94/tev).
This will block until the image is sent over.
- Parameter
bitmap
: Bitmap to show.
- Parameter
name
: Name of the image in tev. If not specified, a unique name will be generated.
- Parameter
host
: Host to connect to.
- Parameter
port
: Port to connect to.
- Parameter
max_retries
: Maximum number of retries.
- Returns:
True if successful.
- Parameter
- slangpy.tev.show(texture: slangpy.Texture, name: str = '', host: str = '127.0.0.1', port: int = 14158, max_retries: int = 3) bool
Show texture in the tev viewer (https://github.com/Tom94/tev).
This will block until the image is sent over.
- Parameter
texture
: Texture to show.
- Parameter
name
: Name of the image in tev. If not specified, a unique name will be generated.
- Parameter
host
: Host to connect to.
- Parameter
port
: Port to connect to.
- Parameter
max_retries
: Maximum number of retries.
- Returns:
True if successful.
- Parameter
- slangpy.tev.show_async(bitmap: slangpy.Bitmap, name: str = '', host: str = '127.0.0.1', port: int = 14158, max_retries: int = 3) None ¶
Show a bitmap in the tev viewer (https://github.com/Tom94/tev).
This will return immediately and send the image asynchronously in the background.
- Parameter
bitmap
: Bitmap to show.
- Parameter
name
: Name of the image in tev. If not specified, a unique name will be generated.
- Parameter
host
: Host to connect to.
- Parameter
port
: Port to connect to.
- Parameter
max_retries
: Maximum number of retries.
- Parameter
- slangpy.tev.show_async(texture: slangpy.Texture, name: str = '', host: str = '127.0.0.1', port: int = 14158, max_retries: int = 3) None
Show a texture in the tev viewer (https://github.com/Tom94/tev).
This will return immediately and send the image asynchronously in the background.
- Parameter
bitmap
: Texture to show.
- Parameter
name
: Name of the image in tev. If not specified, a unique name will be generated.
- Parameter
host
: Host to connect to.
- Parameter
port
: Port to connect to.
- Parameter
max_retries
: Maximum number of retries.
- Parameter
- slangpy.renderdoc.is_available() bool ¶
Check if RenderDoc is available.
This is typically the case when the application is running under the RenderDoc.
- Returns:
True if RenderDoc is available.
- slangpy.renderdoc.start_frame_capture(device: slangpy.Device, window: slangpy.Window | None = None) bool ¶
Start capturing a frame in RenderDoc.
This function will start capturing a frame (or some partial compute/graphics workload) in RenderDoc.
To end the frame capture, call ``end_frame_capture``().
- Parameter
device
: The device to capture the frame for.
- Parameter
window
: The window to capture the frame for (optional).
- Returns:
True if the frame capture was started successfully.
- Parameter
- slangpy.renderdoc.end_frame_capture() bool ¶
End capturing a frame in RenderDoc.
This function will end capturing a frame (or some partial compute/graphics workload) in RenderDoc.
- Returns:
True if the frame capture was ended successfully.
- slangpy.renderdoc.is_frame_capturing() bool ¶
Check if a frame is currently being captured in RenderDoc.
- Returns:
True if a frame is currently being captured.
SlangPy¶
- class slangpy.slangpy.AccessType¶
Base class:
enum.Enum
- none: AccessType = AccessType.none¶
- read: AccessType = AccessType.read¶
- write: AccessType = AccessType.write¶
- readwrite: AccessType = AccessType.readwrite¶
- slangpy.slangpy.unpack_args(*args) list ¶
N/A
- slangpy.slangpy.unpack_kwargs(**kwargs) dict ¶
N/A
- slangpy.slangpy.unpack_arg(arg: object) object ¶
N/A
- slangpy.slangpy.pack_arg(arg: object, unpacked_arg: object) None ¶
N/A
- slangpy.slangpy.get_value_signature(o: object) str ¶
N/A
- class slangpy.slangpy.SignatureBuilder¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- add(self, value: str) None ¶
N/A
- property str: str¶
N/A
- property bytes: bytes¶
N/A
- class slangpy.slangpy.NativeObject¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property slangpy_signature: str¶
- read_signature(self, builder: slangpy.slangpy.SignatureBuilder) None ¶
N/A
- class slangpy.slangpy.NativeSlangType¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property type_reflection: slangpy.TypeReflection¶
N/A
- property shape: slangpy.slangpy.Shape¶
N/A
- class slangpy.slangpy.NativeMarshall¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property concrete_shape: slangpy.slangpy.Shape¶
N/A
- property match_call_shape: bool¶
N/A
- get_shape(self, value: object) slangpy.slangpy.Shape ¶
N/A
- property slang_type: slangpy.slangpy.NativeSlangType¶
N/A
- write_shader_cursor_pre_dispatch(self, context: slangpy.slangpy.CallContext, binding: slangpy.slangpy.NativeBoundVariableRuntime, cursor: slangpy.ShaderCursor, value: object, read_back: list) None ¶
N/A
- create_calldata(self, arg0: slangpy.slangpy.CallContext, arg1: slangpy.slangpy.NativeBoundVariableRuntime, arg2: object, /) object ¶
N/A
- read_calldata(self, arg0: slangpy.slangpy.CallContext, arg1: slangpy.slangpy.NativeBoundVariableRuntime, arg2: object, arg3: object, /) None ¶
N/A
- create_output(self, arg0: slangpy.slangpy.CallContext, arg1: slangpy.slangpy.NativeBoundVariableRuntime, /) object ¶
N/A
- read_output(self, arg0: slangpy.slangpy.CallContext, arg1: slangpy.slangpy.NativeBoundVariableRuntime, arg2: object, /) object ¶
N/A
- property has_derivative: bool¶
N/A
- property is_writable: bool¶
N/A
- gen_calldata(self, cgb: object, context: object, binding: object) None ¶
N/A
- reduce_type(self, context: object, dimensions: int) slangpy.slangpy.NativeSlangType ¶
N/A
- resolve_type(self, context: object, bound_type: slangpy.slangpy.NativeSlangType) slangpy.slangpy.NativeSlangType ¶
N/A
- resolve_dimensionality(self, context: object, binding: object, vector_target_type: slangpy.slangpy.NativeSlangType) int ¶
N/A
- class slangpy.slangpy.NativeBoundVariableRuntime¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property access: tuple[slangpy.slangpy.AccessType, slangpy.slangpy.AccessType]¶
N/A
- property transform: slangpy.slangpy.Shape¶
N/A
- property python_type: slangpy.slangpy.NativeMarshall¶
N/A
- property vector_type: slangpy.slangpy.NativeSlangType¶
N/A
- property shape: slangpy.slangpy.Shape¶
N/A
- property variable_name: str¶
N/A
- property children: dict[str, slangpy.slangpy.NativeBoundVariableRuntime] | None¶
N/A
- populate_call_shape(self, arg0: collections.abc.Sequence[int], arg1: object, arg2: slangpy.slangpy.NativeCallData, /) None ¶
N/A
- read_call_data_post_dispatch(self, arg0: slangpy.slangpy.CallContext, arg1: dict, arg2: object, /) None ¶
N/A
- write_raw_dispatch_data(self, arg0: dict, arg1: object, /) None ¶
N/A
- read_output(self, arg0: slangpy.slangpy.CallContext, arg1: object, /) object ¶
N/A
- class slangpy.slangpy.NativeBoundCallRuntime¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property args: list[slangpy.slangpy.NativeBoundVariableRuntime]¶
N/A
- property kwargs: dict[str, slangpy.slangpy.NativeBoundVariableRuntime]¶
N/A
- find_kwarg(self, arg: str, /) slangpy.slangpy.NativeBoundVariableRuntime ¶
N/A
- calculate_call_shape(self, arg0: int, arg1: list, arg2: dict, arg3: slangpy.slangpy.NativeCallData, /) slangpy.slangpy.Shape ¶
N/A
- read_call_data_post_dispatch(self, arg0: slangpy.slangpy.CallContext, arg1: dict, arg2: list, arg3: dict, /) None ¶
N/A
- write_raw_dispatch_data(self, arg0: dict, arg1: dict, /) None ¶
N/A
- class slangpy.slangpy.NativeCallRuntimeOptions¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property uniforms: list¶
N/A
- class slangpy.slangpy.NativeCallData¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- property device: slangpy.Device¶
N/A
- property kernel: slangpy.ComputeKernel¶
N/A
- property call_dimensionality: int¶
N/A
- property runtime: slangpy.slangpy.NativeBoundCallRuntime¶
N/A
- property call_mode: slangpy.slangpy.CallMode¶
N/A
- property last_call_shape: slangpy.slangpy.Shape¶
N/A
- property debug_name: str¶
N/A
- property logger: slangpy.Logger¶
N/A
- call(self, opts: slangpy.slangpy.NativeCallRuntimeOptions, *args, **kwargs) object ¶
N/A
- append_to(self, opts: slangpy.slangpy.NativeCallRuntimeOptions, command_buffer: slangpy.CommandEncoder, *args, **kwargs) object ¶
N/A
- log(self, level: slangpy.LogLevel, msg: str, frequency: slangpy.LogFrequency = LogFrequency.always) None ¶
Log a message.
- Parameter
level
: The log level.
- Parameter
msg
: The message.
- Parameter
frequency
: The log frequency.
- Parameter
- log_debug(self, msg: str) None ¶
- log_info(self, msg: str) None ¶
- log_warn(self, msg: str) None ¶
- log_error(self, msg: str) None ¶
- log_fatal(self, msg: str) None ¶
- class slangpy.slangpy.NativeCallDataCache¶
Base class:
slangpy.Object
- __init__(self) None ¶
N/A
- get_value_signature(self, builder: slangpy.slangpy.SignatureBuilder, o: object) None ¶
N/A
- get_args_signature(self, builder: slangpy.slangpy.SignatureBuilder, *args, **kwargs) None ¶
N/A
- find_call_data(self, signature: str) slangpy.slangpy.NativeCallData ¶
N/A
- add_call_data(self, signature: str, call_data: slangpy.slangpy.NativeCallData) None ¶
N/A
- lookup_value_signature(self, o: object) str | None ¶
N/A
- class slangpy.slangpy.Shape¶
- __init__(self, *args) None ¶
N/A
- property valid: bool¶
N/A
- property concrete: bool¶
N/A
- as_tuple(self) tuple ¶
N/A
- as_list(self) list[int] ¶
N/A
- calc_contiguous_strides(self) slangpy.slangpy.Shape ¶
N/A
- class slangpy.slangpy.CallContext¶
Base class:
slangpy.Object
- __init__(self, device: slangpy.Device, call_shape: slangpy.slangpy.Shape, call_mode: slangpy.slangpy.CallMode) None ¶
N/A
- property device: slangpy.Device¶
N/A
- property call_shape: slangpy.slangpy.Shape¶
N/A
- property call_mode: slangpy.slangpy.CallMode¶
N/A
- class slangpy.slangpy.StridedBufferViewDesc¶
- __init__(self) None ¶
- property dtype: slangpy.slangpy.NativeSlangType¶
- property element_layout: slangpy.TypeLayoutReflection¶
- property offset: int¶
- property shape: slangpy.slangpy.Shape¶
- property strides: slangpy.slangpy.Shape¶
- property usage: slangpy.BufferUsage¶
- property memory_type: slangpy.MemoryType¶
- class slangpy.slangpy.StridedBufferView¶
Base class:
slangpy.slangpy.NativeObject
- __init__(self, arg0: slangpy.Device, arg1: slangpy.slangpy.StridedBufferViewDesc, arg2: slangpy.Buffer, /) None ¶
- property device: slangpy.Device¶
- property dtype: slangpy.slangpy.NativeSlangType¶
- property offset: int¶
- property shape: slangpy.slangpy.Shape¶
- property strides: slangpy.slangpy.Shape¶
- property element_count: int¶
- property usage: slangpy.BufferUsage¶
- property memory_type: slangpy.MemoryType¶
- property storage: slangpy.Buffer¶
- clear(self, cmd: slangpy.CommandEncoder | None = None) None ¶
- cursor(self, start: int | None = None, count: int | None = None) slangpy.BufferCursor ¶
- uniforms(self) dict ¶
- to_numpy(self) numpy.ndarray[] ¶
N/A
- to_torch(self) torch.Tensor[] ¶
N/A
- copy_from_numpy(self, data: numpy.ndarray[]) None ¶
N/A
- is_contiguous(self) bool ¶
N/A
- class slangpy.slangpy.NativeNDBufferDesc¶
Base class:
slangpy.slangpy.StridedBufferViewDesc
- __init__(self) None ¶
- class slangpy.slangpy.NativeNDBuffer¶
Base class:
slangpy.slangpy.StridedBufferView
- __init__(self, device: slangpy.Device, desc: slangpy.slangpy.NativeNDBufferDesc, buffer: slangpy.Buffer | None = None) None ¶
- broadcast_to(self, shape: slangpy.slangpy.Shape) slangpy.slangpy.NativeNDBuffer ¶
- view(self, shape: slangpy.slangpy.Shape, strides: slangpy.slangpy.Shape = [invalid], offset: int = 0) slangpy.slangpy.NativeNDBuffer ¶
- class slangpy.slangpy.NativeNDBufferMarshall¶
Base class:
slangpy.slangpy.NativeMarshall
- __init__(self, dims: int, writable: bool, slang_type: slangpy.slangpy.NativeSlangType, slang_element_type: slangpy.slangpy.NativeSlangType, element_layout: slangpy.TypeLayoutReflection) None ¶
N/A
- property dims: int¶
- property writable: bool¶
- property slang_element_type: slangpy.slangpy.NativeSlangType¶
- class slangpy.slangpy.NativeNumpyMarshall¶
Base class:
slangpy.slangpy.NativeNDBufferMarshall
- __init__(self, dims: int, slang_type: slangpy.slangpy.NativeSlangType, slang_element_type: slangpy.slangpy.NativeSlangType, element_layout: slangpy.TypeLayoutReflection, numpydtype: object) None ¶
N/A
- property dtype: dlpack::dtype¶
- class slangpy.slangpy.FunctionNodeType¶
Base class:
enum.Enum
- unknown: FunctionNodeType = FunctionNodeType.unknown¶
- uniforms: FunctionNodeType = FunctionNodeType.uniforms¶
- kernelgen: FunctionNodeType = FunctionNodeType.kernelgen¶
- this: FunctionNodeType = FunctionNodeType.this¶
- class slangpy.slangpy.NativeFunctionNode¶
Base class:
slangpy.slangpy.NativeObject
- __init__(self, parent: slangpy.slangpy.NativeFunctionNode | None, type: slangpy.slangpy.FunctionNodeType, data: object | None) None ¶
N/A
- generate_call_data(self, *args, **kwargs) slangpy.slangpy.NativeCallData ¶
N/A
- read_signature(self, builder: slangpy.slangpy.SignatureBuilder) None ¶
N/A
- gather_runtime_options(self, options: slangpy.slangpy.NativeCallRuntimeOptions) None ¶
N/A
- slangpy.slangpy.get_texture_shape(texture: slangpy.Texture, mip: int = 0) slangpy.slangpy.Shape ¶
N/A
- class slangpy.slangpy.NativeBufferMarshall¶
Base class:
slangpy.slangpy.NativeMarshall
- __init__(self, slang_type: slangpy.slangpy.NativeSlangType, usage: slangpy.BufferUsage) None ¶
N/A
- write_shader_cursor_pre_dispatch(self, context: slangpy.slangpy.CallContext, binding: slangpy.slangpy.NativeBoundVariableRuntime, cursor: slangpy.ShaderCursor, value: object, read_back: list) None ¶
N/A
- get_shape(self, value: object) slangpy.slangpy.Shape ¶
N/A
- property usage: slangpy.BufferUsage¶
- property slang_type: slangpy.slangpy.NativeSlangType¶
- class slangpy.slangpy.NativeTextureMarshall¶
Base class:
slangpy.slangpy.NativeMarshall
- __init__(self, slang_type: slangpy.slangpy.NativeSlangType, element_type: slangpy.slangpy.NativeSlangType, resource_shape: slangpy.TypeReflection.ResourceShape, format: slangpy.Format, usage: slangpy.TextureUsage, dims: int) None ¶
N/A
- write_shader_cursor_pre_dispatch(self, context: slangpy.slangpy.CallContext, binding: slangpy.slangpy.NativeBoundVariableRuntime, cursor: slangpy.ShaderCursor, value: object, read_back: list) None ¶
N/A
- get_shape(self, value: object) slangpy.slangpy.Shape ¶
N/A
- get_texture_shape(self, texture: slangpy.Texture, mip: int) slangpy.slangpy.Shape ¶
N/A
- property resource_shape: slangpy.TypeReflection.ResourceShape¶
N/A
- property usage: slangpy.TextureUsage¶
N/A
- property texture_dims: int¶
N/A
- property slang_element_type: slangpy.slangpy.NativeSlangType¶
N/A
- class slangpy.slangpy.NativeTensorDesc¶
Base class:
slangpy.slangpy.StridedBufferViewDesc
- __init__(self) None ¶
- class slangpy.slangpy.NativeTensor¶
Base class:
slangpy.slangpy.StridedBufferView
- __init__(self, desc: slangpy.slangpy.NativeTensorDesc, storage: slangpy.Buffer, grad_in: slangpy.slangpy.NativeTensor | None, grad_out: slangpy.slangpy.NativeTensor | None) None ¶
- property grad_in: slangpy.slangpy.NativeTensor¶
- property grad_out: slangpy.slangpy.NativeTensor¶
- property grad: slangpy.slangpy.NativeTensor¶
- broadcast_to(self, shape: slangpy.slangpy.Shape) slangpy.slangpy.NativeTensor ¶
- view(self, shape: slangpy.slangpy.Shape, strides: slangpy.slangpy.Shape = [invalid], offset: int = 0) slangpy.slangpy.NativeTensor ¶
- with_grads(self, grad_in: slangpy.slangpy.NativeTensor | None = None, grad_out: slangpy.slangpy.NativeTensor | None = None, zero: bool = False) slangpy.slangpy.NativeTensor ¶
- class slangpy.slangpy.NativeTensorMarshall¶
Base class:
slangpy.slangpy.NativeMarshall
- __init__(self, dims: int, writable: bool, slang_type: slangpy.slangpy.NativeSlangType, slang_element_type: slangpy.slangpy.NativeSlangType, element_layout: slangpy.TypeLayoutReflection, d_in: slangpy.slangpy.NativeTensorMarshall | None, d_out: slangpy.slangpy.NativeTensorMarshall | None) None ¶
N/A
- property dims: int¶
- property writable: bool¶
- property slang_element_type: slangpy.slangpy.NativeSlangType¶
- property d_in: slangpy.slangpy.NativeTensorMarshall¶
- property d_out: slangpy.slangpy.NativeTensorMarshall¶
- class slangpy.slangpy.NativeValueMarshall¶
Base class:
slangpy.slangpy.NativeMarshall
- __init__(self) None ¶
N/A
Miscellaneous¶
- slangpy.package_dir: str = "C:\src\slangpy\slangpy"¶
- slangpy.build_dir: str = "C:/src/slangpy/build/windows-msvc/Release"¶
- class slangpy.core.native.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.native.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- slangpy.core.native.unpack_args(*args) list ¶
N/A
- slangpy.core.native.unpack_kwargs(**kwargs) dict ¶
N/A
- slangpy.core.native.unpack_arg(arg: object) object ¶
N/A
- slangpy.core.native.pack_arg(arg: object, unpacked_arg: object) None ¶
N/A
- slangpy.core.native.get_value_signature(o: object) str ¶
N/A
- class slangpy.core.native.SignatureBuilder¶
Alias class:
slangpy.slangpy.SignatureBuilder
- class slangpy.core.native.NativeObject¶
Alias class:
slangpy.slangpy.NativeObject
- class slangpy.core.native.NativeSlangType¶
Alias class:
slangpy.slangpy.NativeSlangType
- class slangpy.core.native.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.core.native.NativeBoundVariableRuntime¶
Alias class:
slangpy.slangpy.NativeBoundVariableRuntime
- class slangpy.core.native.NativeBoundCallRuntime¶
Alias class:
slangpy.slangpy.NativeBoundCallRuntime
- class slangpy.core.native.NativeCallRuntimeOptions¶
Alias class:
slangpy.slangpy.NativeCallRuntimeOptions
- class slangpy.core.native.NativeCallData¶
Alias class:
slangpy.slangpy.NativeCallData
- class slangpy.core.native.NativeCallDataCache¶
Alias class:
slangpy.slangpy.NativeCallDataCache
- class slangpy.core.native.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.core.native.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.core.native.StridedBufferViewDesc¶
Alias class:
slangpy.slangpy.StridedBufferViewDesc
- class slangpy.core.native.StridedBufferView¶
Alias class:
slangpy.slangpy.StridedBufferView
- class slangpy.core.native.NativeNDBufferDesc¶
Alias class:
slangpy.slangpy.NativeNDBufferDesc
- class slangpy.core.native.NativeNDBuffer¶
Alias class:
slangpy.slangpy.NativeNDBuffer
- class slangpy.core.native.NativeNDBufferMarshall¶
Alias class:
slangpy.slangpy.NativeNDBufferMarshall
- class slangpy.core.native.NativeNumpyMarshall¶
Alias class:
slangpy.slangpy.NativeNumpyMarshall
- class slangpy.core.native.FunctionNodeType¶
Alias class:
slangpy.slangpy.FunctionNodeType
- class slangpy.core.native.NativeFunctionNode¶
Alias class:
slangpy.slangpy.NativeFunctionNode
- slangpy.core.native.get_texture_shape(texture: slangpy.Texture, mip: int = 0) slangpy.slangpy.Shape ¶
N/A
- class slangpy.core.native.NativeBufferMarshall¶
Alias class:
slangpy.slangpy.NativeBufferMarshall
- class slangpy.core.native.NativeTextureMarshall¶
Alias class:
slangpy.slangpy.NativeTextureMarshall
- class slangpy.core.native.NativeTensorDesc¶
Alias class:
slangpy.slangpy.NativeTensorDesc
- class slangpy.core.native.NativeTensor¶
Alias class:
slangpy.slangpy.NativeTensor
- class slangpy.core.native.NativeTensorMarshall¶
Alias class:
slangpy.slangpy.NativeTensorMarshall
- class slangpy.core.native.NativeValueMarshall¶
Alias class:
slangpy.slangpy.NativeValueMarshall
- class slangpy.core.utils.PathLike¶
Alias class:
os.PathLike
- class slangpy.core.utils.DeclReflection¶
Alias class:
slangpy.DeclReflection
- class slangpy.core.utils.ProgramLayout¶
Alias class:
slangpy.ProgramLayout
- class slangpy.core.utils.TypeLayoutReflection¶
Alias class:
slangpy.TypeLayoutReflection
- class slangpy.core.utils.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.utils.DeviceType¶
Alias class:
slangpy.DeviceType
- class slangpy.core.utils.Device¶
Alias class:
slangpy.Device
- class slangpy.core.utils.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.shapes.TArgShapesResult¶
Base class:
builtins.dict
- class slangpy.core.function.Any¶
Alias class:
typing.Any
- class slangpy.core.function.Protocol¶
Alias class:
typing.Protocol
- class slangpy.core.function.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.function.SignatureBuilder¶
Alias class:
slangpy.slangpy.SignatureBuilder
- class slangpy.core.function.NativeCallRuntimeOptions¶
Alias class:
slangpy.slangpy.NativeCallRuntimeOptions
- class slangpy.core.function.NativeFunctionNode¶
Alias class:
slangpy.slangpy.NativeFunctionNode
- class slangpy.core.function.FunctionNodeType¶
Alias class:
slangpy.slangpy.FunctionNodeType
- class slangpy.core.function.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.function.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.function.CommandEncoder¶
Alias class:
slangpy.CommandEncoder
- class slangpy.core.function.TypeConformance¶
Alias class:
slangpy.TypeConformance
- class slangpy.core.function.uint3¶
Alias class:
slangpy.math.uint3
- class slangpy.core.function.Logger¶
Alias class:
slangpy.Logger
- class slangpy.core.function.IThis¶
Base class:
typing.Protocol
- get_this: function = <function IThis.get_this at 0x000002A6D15D5A80>¶
- update_this: function = <function IThis.update_this at 0x000002A6D15D5BC0>¶
- class slangpy.core.function.FunctionBuildInfo¶
- class slangpy.core.function.FunctionNode¶
Base class:
slangpy.slangpy.NativeFunctionNode
- torch: function = <function FunctionNode.torch at 0x000002A6D1611260>¶
- bind: function = <function FunctionNode.bind at 0x000002A6D1611300>¶
- map: function = <function FunctionNode.map at 0x000002A6D16113A0>¶
- set: function = <function FunctionNode.set at 0x000002A6D1611440>¶
- constants: function = <function FunctionNode.constants at 0x000002A6D16114E0>¶
- type_conformances: function = <function FunctionNode.type_conformances at 0x000002A6D1611580>¶
- return_type: function = <function FunctionNode.return_type at 0x000002A6D16116C0>¶
- thread_group_size: function = <function FunctionNode.thread_group_size at 0x000002A6D1611760>¶
- as_func: function = <function FunctionNode.as_func at 0x000002A6D1611800>¶
- as_struct: function = <function FunctionNode.as_struct at 0x000002A6D16118A0>¶
- debug_build_call_data: function = <function FunctionNode.debug_build_call_data at 0x000002A6D1611940>¶
- call: function = <function FunctionNode.call at 0x000002A6D16119E0>¶
- append_to: function = <function FunctionNode.append_to at 0x000002A6D1611A80>¶
- dispatch: function = <function FunctionNode.dispatch at 0x000002A6D1611B20>¶
- calc_build_info: function = <function FunctionNode.calc_build_info at 0x000002A6D1611BC0>¶
- generate_call_data: function = <function FunctionNode.generate_call_data at 0x000002A6D1611EE0>¶
- class slangpy.core.function.FunctionNodeBind¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeMap¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeSet¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeConstants¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeTypeConformances¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeBwds¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeReturnType¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeThreadGroupSize¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeLogger¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.Function¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.struct.Any¶
Alias class:
typing.Any
- class slangpy.core.struct.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.core.struct.Struct¶
A Slang struct, typically created by accessing it via a module or parent struct. i.e. mymodule.Foo, or mymodule.Foo.Bar.
- torch: function = <function Struct.torch at 0x000002A6D1613A60>¶
- try_get_child: function = <function Struct.try_get_child at 0x000002A6D1613B00>¶
- as_func: function = <function Struct.as_func at 0x000002A6D1613D80>¶
- as_struct: function = <function Struct.as_struct at 0x000002A6D1613E20>¶
- class slangpy.core.module.Any¶
Alias class:
typing.Any
- class slangpy.core.module.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.core.module.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.core.module.ComputeKernel¶
Alias class:
slangpy.ComputeKernel
- class slangpy.core.module.SlangModule¶
Alias class:
slangpy.SlangModule
- class slangpy.core.module.Device¶
Alias class:
slangpy.Device
- class slangpy.core.module.Logger¶
Alias class:
slangpy.Logger
- class slangpy.core.module.NativeCallDataCache¶
Alias class:
slangpy.slangpy.NativeCallDataCache
- class slangpy.core.module.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.core.module.CallDataCache¶
Base class:
slangpy.slangpy.NativeCallDataCache
- lookup_value_signature: function = <function CallDataCache.lookup_value_signature at 0x000002A6DC19D940>¶
- class slangpy.core.module.Module¶
A Slang module, created either by loading a slang file or providing a loaded SGL module.
- load_from_source: function = <function Module.load_from_source at 0x000002A6DC19DBC0>¶
- load_from_file: function = <function Module.load_from_file at 0x000002A6DC19DB20>¶
- load_from_module: function = <function Module.load_from_module at 0x000002A6DC19DC60>¶
- torch: function = <function Module.torch at 0x000002A6DC19DF80>¶
- find_struct: function = <function Module.find_struct at 0x000002A6DC19E020>¶
- require_struct: function = <function Module.require_struct at 0x000002A6DC19E0C0>¶
- find_function: function = <function Module.find_function at 0x000002A6DC19E160>¶
- require_function: function = <function Module.require_function at 0x000002A6DC19E200>¶
- find_function_in_struct: function = <function Module.find_function_in_struct at 0x000002A6DC19E2A0>¶
- on_hot_reload: function = <function Module.on_hot_reload at 0x000002A6DC19E340>¶
- class slangpy.core.callsignature.Any¶
Alias class:
typing.Any
- class slangpy.core.callsignature.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.callsignature.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.callsignature.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.core.callsignature.tr.Any¶
Alias class:
typing.Any
- class slangpy.core.callsignature.tr.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.core.callsignature.tr.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.core.callsignature.slr.reflectiontypes.Any¶
Alias class:
typing.Any
- class slangpy.core.callsignature.slr.reflectiontypes.TextureUsage¶
Alias class:
slangpy.TextureUsage
- class slangpy.core.callsignature.slr.reflectiontypes.IOType¶
Alias class:
slangpy.core.enums.IOType
- class slangpy.core.callsignature.slr.reflectiontypes.NativeSlangType¶
Alias class:
slangpy.slangpy.NativeSlangType
- class slangpy.core.callsignature.slr.reflectiontypes.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.core.callsignature.slr.reflectiontypes.FunctionReflection¶
Alias class:
slangpy.FunctionReflection
- class slangpy.core.callsignature.slr.reflectiontypes.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.callsignature.slr.reflectiontypes.ProgramLayout¶
Alias class:
slangpy.ProgramLayout
- class slangpy.core.callsignature.slr.reflectiontypes.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.core.callsignature.slr.reflectiontypes.TypeLayoutReflection¶
Alias class:
slangpy.TypeLayoutReflection
- class slangpy.core.callsignature.slr.reflectiontypes.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.callsignature.slr.reflectiontypes.TR¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.callsignature.slr.reflectiontypes.VariableReflection¶
Alias class:
slangpy.VariableReflection
- class slangpy.core.callsignature.slr.reflectiontypes.SlangLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangLayout
- class slangpy.core.callsignature.slr.reflectiontypes.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.callsignature.slr.reflectiontypes.VoidType¶
Alias class:
slangpy.reflection.reflectiontypes.VoidType
- class slangpy.core.callsignature.slr.reflectiontypes.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.core.callsignature.slr.reflectiontypes.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.core.callsignature.slr.reflectiontypes.MatrixType¶
Alias class:
slangpy.reflection.reflectiontypes.MatrixType
- class slangpy.core.callsignature.slr.reflectiontypes.ArrayType¶
Alias class:
slangpy.reflection.reflectiontypes.ArrayType
- class slangpy.core.callsignature.slr.reflectiontypes.StructType¶
Alias class:
slangpy.reflection.reflectiontypes.StructType
- class slangpy.core.callsignature.slr.reflectiontypes.InterfaceType¶
Alias class:
slangpy.reflection.reflectiontypes.InterfaceType
- class slangpy.core.callsignature.slr.reflectiontypes.ResourceType¶
Alias class:
slangpy.reflection.reflectiontypes.ResourceType
- class slangpy.core.callsignature.slr.reflectiontypes.TextureType¶
Alias class:
slangpy.reflection.reflectiontypes.TextureType
- class slangpy.core.callsignature.slr.reflectiontypes.StructuredBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.StructuredBufferType
- class slangpy.core.callsignature.slr.reflectiontypes.ByteAddressBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.ByteAddressBufferType
- class slangpy.core.callsignature.slr.reflectiontypes.DifferentialPairType¶
Alias class:
slangpy.reflection.reflectiontypes.DifferentialPairType
- class slangpy.core.callsignature.slr.reflectiontypes.RaytracingAccelerationStructureType¶
Alias class:
slangpy.reflection.reflectiontypes.RaytracingAccelerationStructureType
- class slangpy.core.callsignature.slr.reflectiontypes.SamplerStateType¶
Alias class:
slangpy.reflection.reflectiontypes.SamplerStateType
- class slangpy.core.callsignature.slr.reflectiontypes.UnhandledType¶
Alias class:
slangpy.reflection.reflectiontypes.UnhandledType
- class slangpy.core.callsignature.slr.reflectiontypes.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.callsignature.slr.reflectiontypes.BaseSlangVariable¶
Alias class:
slangpy.reflection.reflectiontypes.BaseSlangVariable
- class slangpy.core.callsignature.slr.reflectiontypes.SlangField¶
Alias class:
slangpy.reflection.reflectiontypes.SlangField
- class slangpy.core.callsignature.slr.reflectiontypes.SlangParameter¶
Alias class:
slangpy.reflection.reflectiontypes.SlangParameter
- class slangpy.core.callsignature.slr.reflectiontypes.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.core.callsignature.slr.SlangLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangLayout
- class slangpy.core.callsignature.slr.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.callsignature.slr.VoidType¶
Alias class:
slangpy.reflection.reflectiontypes.VoidType
- class slangpy.core.callsignature.slr.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.core.callsignature.slr.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.core.callsignature.slr.MatrixType¶
Alias class:
slangpy.reflection.reflectiontypes.MatrixType
- class slangpy.core.callsignature.slr.ArrayType¶
Alias class:
slangpy.reflection.reflectiontypes.ArrayType
- class slangpy.core.callsignature.slr.StructType¶
Alias class:
slangpy.reflection.reflectiontypes.StructType
- class slangpy.core.callsignature.slr.InterfaceType¶
Alias class:
slangpy.reflection.reflectiontypes.InterfaceType
- class slangpy.core.callsignature.slr.TextureType¶
Alias class:
slangpy.reflection.reflectiontypes.TextureType
- class slangpy.core.callsignature.slr.StructuredBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.StructuredBufferType
- class slangpy.core.callsignature.slr.ByteAddressBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.ByteAddressBufferType
- class slangpy.core.callsignature.slr.DifferentialPairType¶
Alias class:
slangpy.reflection.reflectiontypes.DifferentialPairType
- class slangpy.core.callsignature.slr.RaytracingAccelerationStructureType¶
Alias class:
slangpy.reflection.reflectiontypes.RaytracingAccelerationStructureType
- class slangpy.core.callsignature.slr.SamplerStateType¶
Alias class:
slangpy.reflection.reflectiontypes.SamplerStateType
- class slangpy.core.callsignature.slr.UnhandledType¶
Alias class:
slangpy.reflection.reflectiontypes.UnhandledType
- class slangpy.core.callsignature.slr.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.callsignature.slr.SlangField¶
Alias class:
slangpy.reflection.reflectiontypes.SlangField
- class slangpy.core.callsignature.slr.SlangParameter¶
Alias class:
slangpy.reflection.reflectiontypes.SlangParameter
- class slangpy.core.callsignature.slr.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.core.callsignature.slr.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.callsignature.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.callsignature.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.callsignature.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.core.callsignature.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.core.callsignature.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.core.callsignature.BoundCall¶
Alias class:
slangpy.bindings.boundvariable.BoundCall
- class slangpy.core.callsignature.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.core.callsignature.BoundVariableException¶
Alias class:
slangpy.bindings.boundvariable.BoundVariableException
- class slangpy.core.callsignature.CodeGen¶
Alias class:
slangpy.bindings.codegen.CodeGen
- class slangpy.core.callsignature.NoneMarshall¶
Alias class:
slangpy.builtin.value.NoneMarshall
- class slangpy.core.callsignature.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.core.callsignature.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.callsignature.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.callsignature.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.core.callsignature.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.core.callsignature.MismatchReason¶
- class slangpy.core.callsignature.ResolveException¶
Base class:
builtins.Exception
- class slangpy.core.callsignature.KernelGenException¶
Base class:
builtins.Exception
- class slangpy.core.logging.Any¶
Alias class:
typing.Any
- class slangpy.core.logging.FunctionReflection¶
Alias class:
slangpy.FunctionReflection
- class slangpy.core.logging.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.logging.VariableReflection¶
Alias class:
slangpy.VariableReflection
- class slangpy.core.logging.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.logging.TableColumn¶
- class slangpy.core.calldata.Path¶
Alias class:
pathlib.Path
- class slangpy.core.calldata.Any¶
Alias class:
typing.Any
- class slangpy.core.calldata.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.calldata.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.calldata.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.core.calldata.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.calldata.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.core.calldata.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.core.calldata.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.core.calldata.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.core.calldata.BoundCall¶
Alias class:
slangpy.bindings.boundvariable.BoundCall
- class slangpy.core.calldata.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.core.calldata.BoundVariableException¶
Alias class:
slangpy.bindings.boundvariable.BoundVariableException
- class slangpy.core.calldata.CodeGen¶
Alias class:
slangpy.bindings.codegen.CodeGen
- class slangpy.core.calldata.NoneMarshall¶
Alias class:
slangpy.builtin.value.NoneMarshall
- class slangpy.core.calldata.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.core.calldata.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.core.calldata.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.core.calldata.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.core.calldata.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.core.calldata.MismatchReason¶
Alias class:
slangpy.core.callsignature.MismatchReason
- class slangpy.core.calldata.ResolveException¶
Alias class:
slangpy.core.callsignature.ResolveException
- class slangpy.core.calldata.KernelGenException¶
Alias class:
slangpy.core.callsignature.KernelGenException
- class slangpy.core.calldata.NativeCallData¶
Alias class:
slangpy.slangpy.NativeCallData
- class slangpy.core.calldata.SlangCompileError¶
Alias class:
slangpy.SlangCompileError
- class slangpy.core.calldata.SlangLinkOptions¶
Alias class:
slangpy.SlangLinkOptions
- class slangpy.core.calldata.BoundCallRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundCallRuntime
- class slangpy.core.calldata.CallData¶
Base class:
slangpy.slangpy.NativeCallData
- class slangpy.core.instance.Any¶
Alias class:
typing.Any
- class slangpy.core.instance.FunctionNode¶
Alias class:
slangpy.core.function.FunctionNode
- class slangpy.core.instance.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.core.instance.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.core.instance.InstanceList¶
Represents a list of instances of a struct, either as a single buffer or an SOA style set of buffers for each field. data can either be a dictionary of field names to buffers, or a single buffer.
- set_data: function = <function InstanceList.set_data at 0x000002A6DC1A4B80>¶
- get_this: function = <function InstanceList.get_this at 0x000002A6DC1A4C20>¶
- update_this: function = <function InstanceList.update_this at 0x000002A6DC1A4CC0>¶
- construct: function = <function InstanceList.construct at 0x000002A6DC1A4D60>¶
- class slangpy.core.instance.InstanceBuffer¶
Base class:
slangpy.core.instance.InstanceList
Simplified implementation of InstanceList that uses a single buffer for all instances and provides buffer convenience functions for accessing its data.
- to_numpy: function = <function InstanceBuffer.to_numpy at 0x000002A6DC1A51C0>¶
- copy_from_numpy: function = <function InstanceBuffer.copy_from_numpy at 0x000002A6DC1A5260>¶
- class slangpy.bindings.codegen.CodeGenBlock¶
- add_import: function = <function CodeGenBlock.add_import at 0x000002A6D15D6480>¶
- inc_indent: function = <function CodeGenBlock.inc_indent at 0x000002A6D15D6520>¶
- dec_indent: function = <function CodeGenBlock.dec_indent at 0x000002A6D15D65C0>¶
- append_indent: function = <function CodeGenBlock.append_indent at 0x000002A6D15D6660>¶
- append_code: function = <function CodeGenBlock.append_code at 0x000002A6D15D6700>¶
- append_code_indented: function = <function CodeGenBlock.append_code_indented at 0x000002A6D15D67A0>¶
- empty_line: function = <function CodeGenBlock.empty_line at 0x000002A6D15D6840>¶
- append_line: function = <function CodeGenBlock.append_line at 0x000002A6D15D68E0>¶
- append_statement: function = <function CodeGenBlock.append_statement at 0x000002A6D15D6980>¶
- begin_block: function = <function CodeGenBlock.begin_block at 0x000002A6D15D6A20>¶
- end_block: function = <function CodeGenBlock.end_block at 0x000002A6D15D6AC0>¶
- begin_struct: function = <function CodeGenBlock.begin_struct at 0x000002A6D15D6B60>¶
- end_struct: function = <function CodeGenBlock.end_struct at 0x000002A6D15D6C00>¶
- type_alias: function = <function CodeGenBlock.type_alias at 0x000002A6D15D6CA0>¶
- diff_pair: function = <function CodeGenBlock.diff_pair at 0x000002A6D15D6D40>¶
- declare: function = <function CodeGenBlock.declare at 0x000002A6D15D6DE0>¶
- assign: function = <function CodeGenBlock.assign at 0x000002A6D15D6E80>¶
- declarevar: function = <function CodeGenBlock.declarevar at 0x000002A6D15D6F20>¶
- statement: function = <function CodeGenBlock.statement at 0x000002A6D15D6FC0>¶
- add_snippet: function = <function CodeGenBlock.add_snippet at 0x000002A6D15D7060>¶
- finish: function = <function CodeGenBlock.finish at 0x000002A6D15D7100>¶
- class slangpy.bindings.codegen.CodeGen¶
Tool for generating the code for a SlangPy kernel. Contains a set of different code blocks that can be filled in and then combined to generate the final code.
- add_snippet: function = <function CodeGen.add_snippet at 0x000002A6D15D7240>¶
- add_import: function = <function CodeGen.add_import at 0x000002A6D15D72E0>¶
- finish: function = <function CodeGen.finish at 0x000002A6D15D7380>¶
- class slangpy.bindings.marshall.Any¶
Alias class:
typing.Any
- class slangpy.bindings.marshall.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.bindings.marshall.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.bindings.marshall.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.bindings.marshall.BindContext¶
Contextual information passed around during kernel generation process.
- class slangpy.bindings.marshall.ReturnContext¶
Internal structure used to store information about return type of a function during generation.
- class slangpy.bindings.marshall.Marshall¶
Base class:
slangpy.slangpy.NativeMarshall
Base class for a type marshall that describes how to pass a given type to/from a SlangPy kernel. When a kernel is generated, a marshall is instantiated for each Python value. Future calls to the kernel verify type signatures match and then re-use the existing marshalls.
- gen_calldata: function = <function Marshall.gen_calldata at 0x000002A6D15D7600>¶
- reduce_type: function = <function Marshall.reduce_type at 0x000002A6D15D76A0>¶
- resolve_type: function = <function Marshall.resolve_type at 0x000002A6D15D7740>¶
- resolve_dimensionality: function = <function Marshall.resolve_dimensionality at 0x000002A6D15D77E0>¶
- class slangpy.bindings.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.bindings.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.bindings.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.bindings.boundvariable.Any¶
Alias class:
typing.Any
- class slangpy.bindings.boundvariable.IOType¶
Alias class:
slangpy.core.enums.IOType
- class slangpy.bindings.boundvariable.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.bindings.boundvariable.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.bindings.boundvariable.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.bindings.boundvariable.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.bindings.boundvariable.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.bindings.boundvariable.CodeGen¶
Alias class:
slangpy.bindings.codegen.CodeGen
- class slangpy.bindings.boundvariable.SlangField¶
Alias class:
slangpy.reflection.reflectiontypes.SlangField
- class slangpy.bindings.boundvariable.SlangFunction¶
Alias class:
slangpy.reflection.reflectiontypes.SlangFunction
- class slangpy.bindings.boundvariable.SlangParameter¶
Alias class:
slangpy.reflection.reflectiontypes.SlangParameter
- class slangpy.bindings.boundvariable.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.bindings.boundvariable.BoundVariableException¶
Base class:
builtins.Exception
Custom exception type that carries a message and the variable that caused the exception.
- class slangpy.bindings.boundvariable.BoundCall¶
Stores the binding of python arguments to slang parameters during kernel generation. This is initialized purely with a set of python arguments and later bound to corresponding slang parameters during function resolution.
- bind: function = <function BoundCall.bind at 0x000002A6D15D79C0>¶
- apply_explicit_vectorization: function = <function BoundCall.apply_explicit_vectorization at 0x000002A6D15D7D80>¶
- values: function = <function BoundCall.values at 0x000002A6D15D7E20>¶
- apply_implicit_vectorization: function = <function BoundCall.apply_implicit_vectorization at 0x000002A6D15D7EC0>¶
- finalize_mappings: function = <function BoundCall.finalize_mappings at 0x000002A6D15D7F60>¶
- class slangpy.bindings.boundvariable.BoundVariable¶
Node in a built signature tree, maintains a pairing of python+slang marshall, and a potential set of child nodes for use during kernel generation.
- bind: function = <function BoundVariable.bind at 0x000002A6D1610180>¶
- apply_explicit_vectorization: function = <function BoundVariable.apply_explicit_vectorization at 0x000002A6D1610360>¶
- apply_implicit_vectorization: function = <function BoundVariable.apply_implicit_vectorization at 0x000002A6D16104A0>¶
- finalize_mappings: function = <function BoundVariable.finalize_mappings at 0x000002A6D16105E0>¶
- calculate_differentiability: function = <function BoundVariable.calculate_differentiability at 0x000002A6D1610720>¶
- get_input_list: function = <function BoundVariable.get_input_list at 0x000002A6D16107C0>¶
- gen_call_data_code: function = <function BoundVariable.gen_call_data_code at 0x000002A6D1610A40>¶
- class slangpy.bindings.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.bindings.BoundCall¶
Alias class:
slangpy.bindings.boundvariable.BoundCall
- class slangpy.bindings.BoundVariableException¶
Alias class:
slangpy.bindings.boundvariable.BoundVariableException
- class slangpy.bindings.boundvariableruntime.NativeBoundCallRuntime¶
Alias class:
slangpy.slangpy.NativeBoundCallRuntime
- class slangpy.bindings.boundvariableruntime.NativeBoundVariableRuntime¶
Alias class:
slangpy.slangpy.NativeBoundVariableRuntime
- class slangpy.bindings.boundvariableruntime.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.bindings.boundvariableruntime.BoundCallRuntime¶
Base class:
slangpy.slangpy.NativeBoundCallRuntime
Minimal call data stored after kernel generation required to dispatch a call to a SlangPy kernel.
- class slangpy.bindings.boundvariableruntime.BoundVariableRuntime¶
Base class:
slangpy.slangpy.NativeBoundVariableRuntime
Minimal variable data stored after kernel generation required to dispatch a call to a SlangPy kernel.
- class slangpy.bindings.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.bindings.BoundCallRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundCallRuntime
- class slangpy.bindings.CodeGen¶
Alias class:
slangpy.bindings.codegen.CodeGen
- class slangpy.bindings.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.bindings.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.bindings.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.bindings.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.experimental.gridarg.Any¶
Alias class:
typing.Any
- class slangpy.experimental.gridarg.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.experimental.gridarg.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.experimental.gridarg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.experimental.gridarg.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.experimental.gridarg.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.experimental.gridarg.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.experimental.gridarg.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.experimental.gridarg.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.experimental.gridarg.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.experimental.gridarg.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.experimental.gridarg.NativeObject¶
Alias class:
slangpy.slangpy.NativeObject
- class slangpy.experimental.gridarg.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.experimental.gridarg.GridArg¶
Base class:
slangpy.slangpy.NativeObject
Passes the thread id as an argument to a SlangPy function.
- class slangpy.experimental.gridarg.GridArgType¶
Base class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.experimental.gridarg.GridArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function GridArgMarshall.gen_calldata at 0x000002A6D161E840>¶
- create_calldata: function = <function GridArgMarshall.create_calldata at 0x000002A6D161E8E0>¶
- get_shape: function = <function GridArgMarshall.get_shape at 0x000002A6D161E980>¶
- resolve_type: function = <function GridArgMarshall.resolve_type at 0x000002A6D161EA20>¶
- resolve_dimensionality: function = <function GridArgMarshall.resolve_dimensionality at 0x000002A6D161EAC0>¶
- class slangpy.experimental.diffbuffer.Any¶
Alias class:
typing.Any
- class slangpy.experimental.diffbuffer.Device¶
Alias class:
slangpy.Device
- class slangpy.experimental.diffbuffer.MemoryType¶
Alias class:
slangpy.MemoryType
- class slangpy.experimental.diffbuffer.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.experimental.diffbuffer.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.experimental.diffbuffer.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.experimental.diffbuffer.NDDifferentiableBuffer¶
Base class:
slangpy.types.buffer.NDBuffer
WIP: Use slangpy.Tensor instead.
An N dimensional buffer of a given slang type, with optional additional buffer of gradients. The supplied type can come from a SlangType (via reflection), a struct read from a Module, or simply a name. If unspecified, the type of the gradient is assumed to match that of the primal.
When specifying just a type name, it is advisable to also supply the program_layout for the module in question (see Module.layout), as this ensures type information is looked up from the right place.
- primal_to_numpy: function = <function NDDifferentiableBuffer.primal_to_numpy at 0x000002A6D162FC40>¶
- primal_from_numpy: function = <function NDDifferentiableBuffer.primal_from_numpy at 0x000002A6D162FCE0>¶
- primal_to_torch: function = <function NDDifferentiableBuffer.primal_to_torch at 0x000002A6D162FD80>¶
- grad_to_numpy: function = <function NDDifferentiableBuffer.grad_to_numpy at 0x000002A6D162FE20>¶
- grad_from_numpy: function = <function NDDifferentiableBuffer.grad_from_numpy at 0x000002A6D162FEC0>¶
- grad_to_torch: function = <function NDDifferentiableBuffer.grad_to_torch at 0x000002A6D162FF60>¶
- get_grad: function = <function NDDifferentiableBuffer.get_grad at 0x000002A6D1658040>¶
- class slangpy.types.buffer.Any¶
Alias class:
typing.Any
- class slangpy.types.buffer.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.types.buffer.NativeNDBuffer¶
Alias class:
slangpy.slangpy.NativeNDBuffer
- class slangpy.types.buffer.NativeNDBufferDesc¶
Alias class:
slangpy.slangpy.NativeNDBufferDesc
- class slangpy.types.buffer.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.types.buffer.DataType¶
Alias class:
slangpy.DataType
- class slangpy.types.buffer.Device¶
Alias class:
slangpy.Device
- class slangpy.types.buffer.MemoryType¶
Alias class:
slangpy.MemoryType
- class slangpy.types.buffer.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.types.buffer.TypeLayoutReflection¶
Alias class:
slangpy.TypeLayoutReflection
- class slangpy.types.buffer.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.buffer.CommandEncoder¶
Alias class:
slangpy.CommandEncoder
- class slangpy.types.buffer.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.types.buffer.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.types.buffer.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.buffer.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.buffer.NDBuffer¶
Base class:
slangpy.slangpy.NativeNDBuffer
An N dimensional buffer of a given slang type. The supplied type can come from a SlangType (via reflection), a struct read from a Module, or simply a name.
When specifying just a type name, it is advisable to also supply the program_layout for the module in question (see Module.layout), as this ensures type information is looked up from the right place.
- broadcast_to: function = <function NDBuffer.broadcast_to at 0x000002A6D161C180>¶
- view: function = <function NDBuffer.view at 0x000002A6D161C220>¶
- to_numpy: function = <function NDBuffer.to_numpy at 0x000002A6D161C2C0>¶
- to_torch: function = <function NDBuffer.to_torch at 0x000002A6D161C360>¶
- clear: function = <function NDBuffer.clear at 0x000002A6D161C400>¶
- zeros: function = <function NDBuffer.zeros at 0x000002A6D161C4A0>¶
- zeros_like: function = <function NDBuffer.zeros_like at 0x000002A6D161C540>¶
- class slangpy.types.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.types.diffpair.Any¶
Alias class:
typing.Any
- class slangpy.types.diffpair.PrimType¶
Alias class:
slangpy.core.enums.PrimType
- class slangpy.types.diffpair.DiffPair¶
A pair of values, one representing the primal value and the other representing the gradient value. Typically only required when wanting to output gradients from scalar calls to a function.
- get: function = <function DiffPair.get at 0x000002A6D161C720>¶
- set: function = <function DiffPair.set at 0x000002A6D161C7C0>¶
- class slangpy.types.DiffPair¶
Alias class:
slangpy.types.diffpair.DiffPair
- class slangpy.types.helpers.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.helpers.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.types.helpers.ArrayType¶
Alias class:
slangpy.reflection.reflectiontypes.ArrayType
- class slangpy.types.helpers.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.types.helpers.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.helpers.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.types.wanghasharg.Any¶
Alias class:
typing.Any
- class slangpy.types.wanghasharg.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.types.wanghasharg.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.types.wanghasharg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.types.wanghasharg.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.types.wanghasharg.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.types.wanghasharg.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.types.wanghasharg.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.types.wanghasharg.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.types.wanghasharg.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.wanghasharg.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.wanghasharg.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.wanghasharg.WangHashArg¶
Generates a random int/vector per thread when passed as an argument using a wang hash of the thread id.
- class slangpy.types.wanghasharg.WangHashArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function WangHashArgMarshall.gen_calldata at 0x000002A6D161D580>¶
- create_calldata: function = <function WangHashArgMarshall.create_calldata at 0x000002A6D161D620>¶
- resolve_type: function = <function WangHashArgMarshall.resolve_type at 0x000002A6D161D6C0>¶
- resolve_dimensionality: function = <function WangHashArgMarshall.resolve_dimensionality at 0x000002A6D161D760>¶
- class slangpy.types.randfloatarg.Any¶
Alias class:
typing.Any
- class slangpy.types.randfloatarg.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.types.randfloatarg.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.types.randfloatarg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.types.randfloatarg.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.types.randfloatarg.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.types.randfloatarg.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.types.randfloatarg.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.types.randfloatarg.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.types.randfloatarg.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.randfloatarg.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.randfloatarg.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.randfloatarg.RandFloatArg¶
Generates a random float/vector per thread when passed as an argument to a SlangPy function. The min and max values are inclusive.
- class slangpy.types.randfloatarg.RandFloatArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function RandFloatArgMarshall.gen_calldata at 0x000002A6D161DBC0>¶
- create_calldata: function = <function RandFloatArgMarshall.create_calldata at 0x000002A6D161DC60>¶
- resolve_type: function = <function RandFloatArgMarshall.resolve_type at 0x000002A6D161DD00>¶
- resolve_dimensionality: function = <function RandFloatArgMarshall.resolve_dimensionality at 0x000002A6D161DDA0>¶
- class slangpy.types.RandFloatArg¶
Alias class:
slangpy.types.randfloatarg.RandFloatArg
- class slangpy.types.threadidarg.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.types.threadidarg.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.types.threadidarg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.types.threadidarg.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.types.threadidarg.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.types.threadidarg.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.types.threadidarg.NativeObject¶
Alias class:
slangpy.slangpy.NativeObject
- class slangpy.types.threadidarg.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.threadidarg.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.threadidarg.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.threadidarg.ThreadIdArg¶
Base class:
slangpy.slangpy.NativeObject
Passes the thread id as an argument to a SlangPy function.
- class slangpy.types.threadidarg.ThreadIdArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function ThreadIdArgMarshall.gen_calldata at 0x000002A6D161E0C0>¶
- resolve_type: function = <function ThreadIdArgMarshall.resolve_type at 0x000002A6D161E160>¶
- resolve_dimensionality: function = <function ThreadIdArgMarshall.resolve_dimensionality at 0x000002A6D161E200>¶
- class slangpy.types.ThreadIdArg¶
Alias class:
slangpy.types.threadidarg.ThreadIdArg
- class slangpy.types.callidarg.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.types.callidarg.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.types.callidarg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.types.callidarg.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.types.callidarg.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.types.callidarg.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.callidarg.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.callidarg.CallIdArg¶
Passes the thread id as an argument to a SlangPy function.
- class slangpy.types.callidarg.CallIdArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function CallIdArgMarshall.gen_calldata at 0x000002A6D161ED40>¶
- resolve_type: function = <function CallIdArgMarshall.resolve_type at 0x000002A6D161EDE0>¶
- resolve_dimensionality: function = <function CallIdArgMarshall.resolve_dimensionality at 0x000002A6D161EE80>¶
- class slangpy.types.CallIdArg¶
Alias class:
slangpy.types.callidarg.CallIdArg
- class slangpy.types.valueref.Any¶
Alias class:
typing.Any
- class slangpy.types.valueref.ValueRef¶
Minimal class to hold a reference to a scalar value, allowing user to get outputs from scalar inout/out arguments.
- class slangpy.types.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.types.WangHashArg¶
Alias class:
slangpy.types.wanghasharg.WangHashArg
- class slangpy.types.tensor.Device¶
Alias class:
slangpy.Device
- class slangpy.types.tensor.Buffer¶
Alias class:
slangpy.Buffer
- class slangpy.types.tensor.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.types.tensor.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.tensor.CommandBuffer¶
Alias class:
slangpy.CommandBuffer
- class slangpy.types.tensor.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.types.tensor.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.types.tensor.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.types.tensor.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.types.tensor.NativeTensor¶
Alias class:
slangpy.slangpy.NativeTensor
- class slangpy.types.tensor.NativeTensorDesc¶
Alias class:
slangpy.slangpy.NativeTensorDesc
- slangpy.types.tensor.warn: builtin_function_or_method = <built-in function warn>¶
- class slangpy.types.tensor.Any¶
Alias class:
typing.Any
- class slangpy.types.tensor.ST¶
Alias class:
slangpy.TypeReflection.ScalarType
- class slangpy.types.tensor.Tensor¶
Base class:
slangpy.slangpy.NativeTensor
Represents an N-D view of an underlying buffer with given shape and element type, and has optional gradient information attached. Element type must be differentiable.
Strides and offset can optionally be specified and are given in terms of elements, not bytes. If omitted, a dense N-D grid is assumed (row-major).
- broadcast_to: function = <function Tensor.broadcast_to at 0x000002A6D161F880>¶
- view: function = <function Tensor.view at 0x000002A6D161F920>¶
- to_numpy: function = <function Tensor.to_numpy at 0x000002A6D161FA60>¶
- to_torch: function = <function Tensor.to_torch at 0x000002A6D161FB00>¶
- with_grads: function = <function Tensor.with_grads at 0x000002A6D161FBA0>¶
- clear: function = <function Tensor.clear at 0x000002A6D161FC40>¶
- numpy: function = <function Tensor.numpy at 0x000002A6D161FCE0>¶
- from_numpy: function = <function Tensor.from_numpy at 0x000002A6D161FD80>¶
- empty: function = <function Tensor.empty at 0x000002A6D161FE20>¶
- zeros: function = <function Tensor.zeros at 0x000002A6D161FEC0>¶
- empty_like: function = <function Tensor.empty_like at 0x000002A6D161FF60>¶
- zeros_like: function = <function Tensor.zeros_like at 0x000002A6D162C040>¶
- class slangpy.types.Tensor¶
Alias class:
slangpy.types.tensor.Tensor
- class slangpy.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.DiffPair¶
Alias class:
slangpy.types.diffpair.DiffPair
- class slangpy.RandFloatArg¶
Alias class:
slangpy.types.randfloatarg.RandFloatArg
- class slangpy.ThreadIdArg¶
Alias class:
slangpy.types.threadidarg.ThreadIdArg
- class slangpy.CallIdArg¶
Alias class:
slangpy.types.callidarg.CallIdArg
- class slangpy.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.WangHashArg¶
Alias class:
slangpy.types.wanghasharg.WangHashArg
- class slangpy.Tensor¶
Alias class:
slangpy.types.tensor.Tensor
- class slangpy.builtin.value.Any¶
Alias class:
typing.Any
- class slangpy.builtin.value.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.value.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.value.NativeValueMarshall¶
Alias class:
slangpy.slangpy.NativeValueMarshall
- class slangpy.builtin.value.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.value.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.value.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.value.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.value.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.value.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.value.ValueMarshall¶
Base class:
slangpy.slangpy.NativeValueMarshall
- gen_calldata: function = <function ValueMarshall.gen_calldata at 0x000002A6D162C5E0>¶
- create_calldata: function = <function ValueMarshall.create_calldata at 0x000002A6D162C680>¶
- create_dispatchdata: function = <function ValueMarshall.create_dispatchdata at 0x000002A6D162C720>¶
- create_output: function = <function ValueMarshall.create_output at 0x000002A6D162C7C0>¶
- read_output: function = <function ValueMarshall.read_output at 0x000002A6D162C860>¶
- resolve_type: function = <function ValueMarshall.resolve_type at 0x000002A6D162C900>¶
- reduce_type: function = <function ValueMarshall.reduce_type at 0x000002A6D162C9A0>¶
- resolve_dimensionality: function = <function ValueMarshall.resolve_dimensionality at 0x000002A6D162CA40>¶
- class slangpy.builtin.value.ScalarMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- reduce_type: function = <function ScalarMarshall.reduce_type at 0x000002A6D162CC20>¶
- class slangpy.builtin.value.NoneMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- resolve_dimensionality: function = <function NoneMarshall.resolve_dimensionality at 0x000002A6D162CE00>¶
- class slangpy.builtin.value.VectorMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- reduce_type: function = <function VectorMarshall.reduce_type at 0x000002A6D162CF40>¶
- resolve_type: function = <function VectorMarshall.resolve_type at 0x000002A6D162CFE0>¶
- gen_calldata: function = <function VectorMarshall.gen_calldata at 0x000002A6D162D080>¶
- class slangpy.builtin.value.MatrixMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- reduce_type: function = <function MatrixMarshall.reduce_type at 0x000002A6D162D1C0>¶
- slangpy.builtin.value.base_name: str = "float16_t"¶
- slangpy.builtin.value.dim: int = 4¶
- class slangpy.builtin.value.vec_type¶
Alias class:
slangpy.math.float16_t4
- slangpy.builtin.value.row: int = 4¶
- slangpy.builtin.value.col: int = 4¶
- class slangpy.builtin.value.mat_type¶
Alias class:
slangpy.math.float4x4
- class slangpy.builtin.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.valueref.Any¶
Alias class:
typing.Any
- class slangpy.builtin.valueref.BufferCursor¶
Alias class:
slangpy.BufferCursor
- class slangpy.builtin.valueref.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.valueref.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.valueref.Buffer¶
Alias class:
slangpy.Buffer
- class slangpy.builtin.valueref.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.builtin.valueref.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.valueref.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.valueref.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.valueref.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.valueref.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.valueref.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.builtin.valueref.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.valueref.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.builtin.valueref.ValueRefMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- resolve_type: function = <function ValueRefMarshall.resolve_type at 0x000002A6D162E7A0>¶
- resolve_dimensionality: function = <function ValueRefMarshall.resolve_dimensionality at 0x000002A6D162E840>¶
- gen_calldata: function = <function ValueRefMarshall.gen_calldata at 0x000002A6D162E8E0>¶
- create_calldata: function = <function ValueRefMarshall.create_calldata at 0x000002A6D162E980>¶
- create_dispatchdata: function = <function ValueRefMarshall.create_dispatchdata at 0x000002A6D162EA20>¶
- read_calldata: function = <function ValueRefMarshall.read_calldata at 0x000002A6D162EAC0>¶
- create_output: function = <function ValueRefMarshall.create_output at 0x000002A6D162EB60>¶
- read_output: function = <function ValueRefMarshall.read_output at 0x000002A6D162EC00>¶
- class slangpy.builtin.ValueRefMarshall¶
Alias class:
slangpy.builtin.valueref.ValueRefMarshall
- class slangpy.builtin.diffpair.Any¶
Alias class:
typing.Any
- class slangpy.builtin.diffpair.PrimType¶
Alias class:
slangpy.core.enums.PrimType
- class slangpy.builtin.diffpair.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.diffpair.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.diffpair.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.builtin.diffpair.Buffer¶
Alias class:
slangpy.Buffer
- class slangpy.builtin.diffpair.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.builtin.diffpair.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.diffpair.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.diffpair.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.diffpair.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.diffpair.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.diffpair.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.diffpair.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.diffpair.DiffPair¶
Alias class:
slangpy.types.diffpair.DiffPair
- class slangpy.builtin.diffpair.DiffPairMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- resolve_type: function = <function DiffPairMarshall.resolve_type at 0x000002A6D162F060>¶
- resolve_dimensionality: function = <function DiffPairMarshall.resolve_dimensionality at 0x000002A6D162F100>¶
- gen_calldata: function = <function DiffPairMarshall.gen_calldata at 0x000002A6D162F1A0>¶
- get_type: function = <function DiffPairMarshall.get_type at 0x000002A6D162F240>¶
- create_calldata: function = <function DiffPairMarshall.create_calldata at 0x000002A6D162F2E0>¶
- read_calldata: function = <function DiffPairMarshall.read_calldata at 0x000002A6D162F380>¶
- create_output: function = <function DiffPairMarshall.create_output at 0x000002A6D162F420>¶
- read_output: function = <function DiffPairMarshall.read_output at 0x000002A6D162F4C0>¶
- class slangpy.builtin.DiffPairMarshall¶
Alias class:
slangpy.builtin.diffpair.DiffPairMarshall
- class slangpy.builtin.ndbuffer.Any¶
Alias class:
typing.Any
- class slangpy.builtin.ndbuffer.PrimType¶
Alias class:
slangpy.core.enums.PrimType
- class slangpy.builtin.ndbuffer.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.ndbuffer.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.ndbuffer.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.ndbuffer.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.builtin.ndbuffer.NativeNDBuffer¶
Alias class:
slangpy.slangpy.NativeNDBuffer
- class slangpy.builtin.ndbuffer.NativeNDBufferMarshall¶
Alias class:
slangpy.slangpy.NativeNDBufferMarshall
- class slangpy.builtin.ndbuffer.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.builtin.ndbuffer.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.ndbuffer.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.ndbuffer.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.ndbuffer.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.ndbuffer.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.ndbuffer.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.ndbuffer.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.builtin.ndbuffer.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.ndbuffer.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.ndbuffer.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.builtin.ndbuffer.StructuredBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.StructuredBufferType
- class slangpy.builtin.ndbuffer.NDBuffer¶
Alias class:
slangpy.types.buffer.NDBuffer
- class slangpy.builtin.ndbuffer.NDDifferentiableBuffer¶
Alias class:
slangpy.experimental.diffbuffer.NDDifferentiableBuffer
- class slangpy.builtin.ndbuffer.StopDebuggerException¶
Base class:
builtins.Exception
- class slangpy.builtin.ndbuffer.NDBufferType¶
Base class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.ndbuffer.BaseNDBufferMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.ndbuffer.NDBufferMarshall¶
Base class:
slangpy.slangpy.NativeNDBufferMarshall
- reduce_type: function = <function NDBufferMarshall.reduce_type at 0x000002A6D1658680>¶
- resolve_type: function = <function NDBufferMarshall.resolve_type at 0x000002A6D1658720>¶
- resolve_dimensionality: function = <function NDBufferMarshall.resolve_dimensionality at 0x000002A6D16587C0>¶
- gen_calldata: function = <function NDBufferMarshall.gen_calldata at 0x000002A6D1658860>¶
- class slangpy.builtin.ndbuffer.NDDifferentiableBufferMarshall¶
Base class:
slangpy.builtin.ndbuffer.BaseNDBufferMarshall
- reduce_type: function = <function NDDifferentiableBufferMarshall.reduce_type at 0x000002A6D1658B80>¶
- resolve_type: function = <function NDDifferentiableBufferMarshall.resolve_type at 0x000002A6D1658C20>¶
- resolve_dimensionality: function = <function NDDifferentiableBufferMarshall.resolve_dimensionality at 0x000002A6D1658CC0>¶
- gen_calldata: function = <function NDDifferentiableBufferMarshall.gen_calldata at 0x000002A6D1658D60>¶
- create_calldata: function = <function NDDifferentiableBufferMarshall.create_calldata at 0x000002A6D1658E00>¶
- create_output: function = <function NDDifferentiableBufferMarshall.create_output at 0x000002A6D1658EA0>¶
- read_output: function = <function NDDifferentiableBufferMarshall.read_output at 0x000002A6D1658F40>¶
- create_dispatchdata: function = <function NDDifferentiableBufferMarshall.create_dispatchdata at 0x000002A6D1658FE0>¶
- get_shape: function = <function NDDifferentiableBufferMarshall.get_shape at 0x000002A6D1659080>¶
- class slangpy.builtin.NDBufferMarshall¶
Alias class:
slangpy.builtin.ndbuffer.NDBufferMarshall
- class slangpy.builtin.NDDifferentiableBufferMarshall¶
Alias class:
slangpy.builtin.ndbuffer.NDDifferentiableBufferMarshall
- class slangpy.builtin.struct.Any¶
Alias class:
typing.Any
- class slangpy.builtin.struct.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.struct.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- class slangpy.builtin.struct.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.struct.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.struct.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.struct.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.struct.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.struct.StructMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- resolve_type: function = <function StructMarshall.resolve_type at 0x000002A6D16594E0>¶
- resolve_dimensionality: function = <function StructMarshall.resolve_dimensionality at 0x000002A6D1659580>¶
- create_dispatchdata: function = <function StructMarshall.create_dispatchdata at 0x000002A6D1659620>¶
- class slangpy.builtin.StructMarshall¶
Alias class:
slangpy.builtin.struct.StructMarshall
- class slangpy.builtin.structuredbuffer.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.structuredbuffer.NativeBufferMarshall¶
Alias class:
slangpy.slangpy.NativeBufferMarshall
- class slangpy.builtin.structuredbuffer.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.structuredbuffer.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.structuredbuffer.StructuredBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.StructuredBufferType
- class slangpy.builtin.structuredbuffer.ByteAddressBufferType¶
Alias class:
slangpy.reflection.reflectiontypes.ByteAddressBufferType
- class slangpy.builtin.structuredbuffer.Buffer¶
Alias class:
slangpy.Buffer
- class slangpy.builtin.structuredbuffer.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.builtin.structuredbuffer.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.structuredbuffer.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.structuredbuffer.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.structuredbuffer.BufferMarshall¶
Base class:
slangpy.slangpy.NativeBufferMarshall
- resolve_type: function = <function BufferMarshall.resolve_type at 0x000002A6D16598A0>¶
- resolve_dimensionality: function = <function BufferMarshall.resolve_dimensionality at 0x000002A6D1659940>¶
- gen_calldata: function = <function BufferMarshall.gen_calldata at 0x000002A6D16599E0>¶
- reduce_type: function = <function BufferMarshall.reduce_type at 0x000002A6D1659B20>¶
- class slangpy.builtin.BufferMarshall¶
Alias class:
slangpy.builtin.structuredbuffer.BufferMarshall
- class slangpy.builtin.texture.Any¶
Alias class:
typing.Any
- class slangpy.builtin.texture.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.texture.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.texture.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.texture.NativeTextureMarshall¶
Alias class:
slangpy.slangpy.NativeTextureMarshall
- class slangpy.builtin.texture.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.texture.FormatType¶
Alias class:
slangpy.FormatType
- class slangpy.builtin.texture.TextureType¶
Alias class:
slangpy.TextureType
- class slangpy.builtin.texture.TextureUsage¶
Alias class:
slangpy.TextureUsage
- class slangpy.builtin.texture.Sampler¶
Alias class:
slangpy.Sampler
- class slangpy.builtin.texture.Texture¶
Alias class:
slangpy.Texture
- class slangpy.builtin.texture.Format¶
Alias class:
slangpy.Format
- slangpy.builtin.texture.get_format_info(arg: slangpy.Format, /) slangpy.FormatInfo ¶
- class slangpy.builtin.texture.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.texture.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.texture.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.texture.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.texture.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.texture.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.builtin.texture.TextureMarshall¶
Base class:
slangpy.slangpy.NativeTextureMarshall
- reduce_type: function = <function TextureMarshall.reduce_type at 0x000002A6D165A020>¶
- resolve_type: function = <function TextureMarshall.resolve_type at 0x000002A6D165A0C0>¶
- build_type_name: function = <function TextureMarshall.build_type_name at 0x000002A6D165A200>¶
- build_accessor_name: function = <function TextureMarshall.build_accessor_name at 0x000002A6D165A2A0>¶
- gen_calldata: function = <function TextureMarshall.gen_calldata at 0x000002A6D165A340>¶
- class slangpy.builtin.texture.SamplerMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function SamplerMarshall.gen_calldata at 0x000002A6D165A7A0>¶
- create_calldata: function = <function SamplerMarshall.create_calldata at 0x000002A6D165A840>¶
- create_dispatchdata: function = <function SamplerMarshall.create_dispatchdata at 0x000002A6D165A8E0>¶
- class slangpy.builtin.TextureMarshall¶
Alias class:
slangpy.builtin.texture.TextureMarshall
- class slangpy.builtin.array.Any¶
Alias class:
typing.Any
- class slangpy.builtin.array.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.array.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.array.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.array.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.array.ArrayMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.ArrayMarshall¶
Alias class:
slangpy.builtin.array.ArrayMarshall
- class slangpy.builtin.resourceview.Any¶
Alias class:
typing.Any
- class slangpy.builtin.resourceview.TextureView¶
Alias class:
slangpy.TextureView
- class slangpy.builtin.resourceview.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.Any¶
Alias class:
typing.Any
- class slangpy.builtin.TextureView¶
Alias class:
slangpy.TextureView
- class slangpy.builtin.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.accelerationstructure.Any¶
Alias class:
typing.Any
- class slangpy.builtin.accelerationstructure.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.accelerationstructure.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.accelerationstructure.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.accelerationstructure.AccelerationStructure¶
Alias class:
slangpy.AccelerationStructure
- class slangpy.builtin.accelerationstructure.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.accelerationstructure.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.accelerationstructure.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.accelerationstructure.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.accelerationstructure.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.accelerationstructure.AccelerationStructureMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function AccelerationStructureMarshall.gen_calldata at 0x000002A6D165AD40>¶
- create_calldata: function = <function AccelerationStructureMarshall.create_calldata at 0x000002A6D165ADE0>¶
- create_dispatchdata: function = <function AccelerationStructureMarshall.create_dispatchdata at 0x000002A6D165AE80>¶
- class slangpy.builtin.AccelerationStructureMarshall¶
Alias class:
slangpy.builtin.accelerationstructure.AccelerationStructureMarshall
- class slangpy.builtin.range.Any¶
Alias class:
typing.Any
- class slangpy.builtin.range.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.range.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.range.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.range.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.range.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.range.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.range.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.range.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.range.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.range.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.range.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.range.RangeMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- gen_calldata: function = <function RangeMarshall.gen_calldata at 0x000002A6D165B060>¶
- create_calldata: function = <function RangeMarshall.create_calldata at 0x000002A6D165B100>¶
- get_shape: function = <function RangeMarshall.get_shape at 0x000002A6D165B1A0>¶
- resolve_type: function = <function RangeMarshall.resolve_type at 0x000002A6D165B240>¶
- resolve_dimensionality: function = <function RangeMarshall.resolve_dimensionality at 0x000002A6D165B2E0>¶
- class slangpy.builtin.RangeMarshall¶
Alias class:
slangpy.builtin.range.RangeMarshall
- class slangpy.builtin.numpy.Any¶
Alias class:
typing.Any
- class slangpy.builtin.numpy.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.numpy.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.numpy.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.numpy.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.builtin.numpy.NativeNumpyMarshall¶
Alias class:
slangpy.slangpy.NativeNumpyMarshall
- class slangpy.builtin.numpy.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.numpy.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.builtin.numpy.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.numpy.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.builtin.numpy.MatrixType¶
Alias class:
slangpy.reflection.reflectiontypes.MatrixType
- class slangpy.builtin.numpy.NumpyMarshall¶
Base class:
slangpy.slangpy.NativeNumpyMarshall
- reduce_type: function = <function NumpyMarshall.reduce_type at 0x000002A6D165B600>¶
- resolve_type: function = <function NumpyMarshall.resolve_type at 0x000002A6D165B6A0>¶
- resolve_dimensionality: function = <function NumpyMarshall.resolve_dimensionality at 0x000002A6D165B740>¶
- gen_calldata: function = <function NumpyMarshall.gen_calldata at 0x000002A6D165B7E0>¶
- class slangpy.builtin.NumpyMarshall¶
Alias class:
slangpy.builtin.numpy.NumpyMarshall
- class slangpy.builtin.tensor.Any¶
Alias class:
typing.Any
- class slangpy.builtin.tensor.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.tensor.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.tensor.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.builtin.tensor.Tensor¶
Alias class:
slangpy.types.tensor.Tensor
- class slangpy.builtin.tensor.NativeTensorMarshall¶
Alias class:
slangpy.slangpy.NativeTensorMarshall
- class slangpy.builtin.tensor.NativeTensor¶
Alias class:
slangpy.slangpy.NativeTensor
- class slangpy.builtin.tensor.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.tensor.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.builtin.tensor.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.tensor.ArrayType¶
Alias class:
slangpy.reflection.reflectiontypes.ArrayType
- class slangpy.builtin.tensor.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.builtin.tensor.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.tensor.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.tensor.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.tensor.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.builtin.tensor.ITensorType¶
Base class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.builtin.tensor.TensorMarshall¶
Base class:
slangpy.slangpy.NativeTensorMarshall
- resolve_type: function = <function TensorMarshall.resolve_type at 0x000002A6D1670220>¶
- reduce_type: function = <function TensorMarshall.reduce_type at 0x000002A6D16702C0>¶
- resolve_dimensionality: function = <function TensorMarshall.resolve_dimensionality at 0x000002A6D1670360>¶
- get_shape: function = <function TensorMarshall.get_shape at 0x000002A6D1670400>¶
- gen_calldata: function = <function TensorMarshall.gen_calldata at 0x000002A6D16704A0>¶
- class slangpy.builtin.TensorMarshall¶
Alias class:
slangpy.builtin.tensor.TensorMarshall
- class slangpy.torchintegration.wrappedtensor.Any¶
Alias class:
typing.Any
- class slangpy.torchintegration.wrappedtensor.ScalarType¶
Alias class:
slangpy.reflection.reflectiontypes.ScalarType
- class slangpy.torchintegration.wrappedtensor.DataType¶
Alias class:
slangpy.DataType
- class slangpy.torchintegration.wrappedtensor.Device¶
Alias class:
slangpy.Device
- class slangpy.torchintegration.wrappedtensor.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.torchintegration.wrappedtensor.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.torchintegration.wrappedtensor.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.torchintegration.wrappedtensor.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.torchintegration.wrappedtensor.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.torchintegration.wrappedtensor.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.torchintegration.wrappedtensor.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.torchintegration.wrappedtensor.ReturnContext¶
Alias class:
slangpy.bindings.marshall.ReturnContext
- class slangpy.torchintegration.wrappedtensor.TensorMarshall¶
Alias class:
slangpy.builtin.tensor.TensorMarshall
- class slangpy.torchintegration.wrappedtensor.Buffer¶
Alias class:
slangpy.Buffer
- class slangpy.torchintegration.wrappedtensor.SlangProgramLayout¶
Alias class:
slangpy.reflection.reflectiontypes.SlangProgramLayout
- class slangpy.torchintegration.wrappedtensor.SlangType¶
Alias class:
slangpy.reflection.reflectiontypes.SlangType
- class slangpy.torchintegration.wrappedtensor.VectorType¶
Alias class:
slangpy.reflection.reflectiontypes.VectorType
- class slangpy.torchintegration.wrappedtensor.ST¶
Alias class:
slangpy.TypeReflection.ScalarType
- class slangpy.torchintegration.wrappedtensor.WrappedTensor¶
- collect_streams: function = <function WrappedTensor.collect_streams at 0x000002A6DC19C360>¶
- class slangpy.torchintegration.wrappedtensor.WrappedTensorMarshall¶
Base class:
slangpy.builtin.tensor.TensorMarshall
- get_shape: function = <function WrappedTensorMarshall.get_shape at 0x000002A6DC19C400>¶
- create_calldata: function = <function WrappedTensorMarshall.create_calldata at 0x000002A6DC19C540>¶
- read_calldata: function = <function WrappedTensorMarshall.read_calldata at 0x000002A6DC19C5E0>¶
- create_output: function = <function WrappedTensorMarshall.create_output at 0x000002A6DC19C680>¶
- read_output: function = <function WrappedTensorMarshall.read_output at 0x000002A6DC19C720>¶
- class slangpy.torchintegration.torchfunction.Any¶
Alias class:
typing.Any
- class slangpy.torchintegration.torchfunction.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.torchintegration.torchfunction.WrappedTensor¶
Alias class:
slangpy.torchintegration.wrappedtensor.WrappedTensor
- class slangpy.torchintegration.torchfunction.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.torchintegration.torchfunction.FunctionNode¶
Alias class:
slangpy.core.function.FunctionNode
- class slangpy.torchintegration.torchfunction.IThis¶
Alias class:
slangpy.core.function.IThis
- class slangpy.torchintegration.torchfunction.TypeConformance¶
Alias class:
slangpy.TypeConformance
- class slangpy.torchintegration.torchfunction.Device¶
Alias class:
slangpy.Device
- class slangpy.torchintegration.torchfunction.TorchAutoGradFunction¶
Base class:
torch.autograd.function.Function
- forward: function = <function TorchAutoGradFunction.forward at 0x000002A6DC19CD60>¶
- backward: function = <function TorchAutoGradFunction.backward at 0x000002A6DC19CE00>¶
- class slangpy.torchintegration.torchfunction.TorchFunction¶
Base class:
torch.nn.modules.module.Module
- forward: function = <function TorchFunction.forward at 0x000002A6DC19CF40>¶
- bind: function = <function TorchFunction.bind at 0x000002A6DC19CFE0>¶
- map: function = <function TorchFunction.map at 0x000002A6DC19D080>¶
- set: function = <function TorchFunction.set at 0x000002A6DC19D120>¶
- constants: function = <function TorchFunction.constants at 0x000002A6DC19D1C0>¶
- type_conformances: function = <function TorchFunction.type_conformances at 0x000002A6DC19D260>¶
- return_type: function = <function TorchFunction.return_type at 0x000002A6DC19D300>¶
- as_func: function = <function TorchFunction.as_func at 0x000002A6DC19D440>¶
- as_struct: function = <function TorchFunction.as_struct at 0x000002A6DC19D4E0>¶
- class slangpy.torchintegration.TorchFunction¶
Alias class:
slangpy.torchintegration.torchfunction.TorchFunction
- class slangpy.torchintegration.torchstruct.Any¶
Alias class:
typing.Any
- class slangpy.torchintegration.torchstruct.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.torchintegration.torchstruct.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.torchintegration.torchstruct.TorchFunction¶
Alias class:
slangpy.torchintegration.torchfunction.TorchFunction
- class slangpy.torchintegration.torchstruct.TorchStruct¶
A Slang struct, typically created by accessing it via a module or parent struct. i.e. mymodule.Foo, or mymodule.Foo.Bar.
- try_get_child: function = <function TorchStruct.try_get_child at 0x000002A6DC19E840>¶
- as_func: function = <function TorchStruct.as_func at 0x000002A6DC19EAC0>¶
- as_struct: function = <function TorchStruct.as_struct at 0x000002A6DC19EB60>¶
- class slangpy.torchintegration.torchmodule.Any¶
Alias class:
typing.Any
- class slangpy.torchintegration.torchmodule.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.torchintegration.torchmodule.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.torchintegration.torchmodule.SlangModule¶
Alias class:
slangpy.SlangModule
- class slangpy.torchintegration.torchmodule.Device¶
Alias class:
slangpy.Device
- class slangpy.torchintegration.torchmodule.Module¶
Alias class:
slangpy.core.module.Module
- class slangpy.torchintegration.torchmodule.TorchFunction¶
Alias class:
slangpy.torchintegration.torchfunction.TorchFunction
- class slangpy.torchintegration.torchmodule.TorchStruct¶
Alias class:
slangpy.torchintegration.torchstruct.TorchStruct
- class slangpy.torchintegration.torchmodule.TorchModule¶
A Slang module, created either by loading a slang file or providing a loaded SGL module.
- load_from_source: function = <function TorchModule.load_from_source at 0x000002A6DC19D8A0>¶
- load_from_file: function = <function TorchModule.load_from_file at 0x000002A6DC19EC00>¶
- load_from_module: function = <function TorchModule.load_from_module at 0x000002A6DC19ECA0>¶
- find_struct: function = <function TorchModule.find_struct at 0x000002A6DC19EF20>¶
- require_struct: function = <function TorchModule.require_struct at 0x000002A6DC19EFC0>¶
- find_function: function = <function TorchModule.find_function at 0x000002A6DC19F060>¶
- require_function: function = <function TorchModule.require_function at 0x000002A6DC19F100>¶
- find_function_in_struct: function = <function TorchModule.find_function_in_struct at 0x000002A6DC19F1A0>¶
- class slangpy.torchintegration.TorchModule¶
Alias class:
slangpy.torchintegration.torchmodule.TorchModule
- class slangpy.torchintegration.TorchStruct¶
Alias class:
slangpy.torchintegration.torchstruct.TorchStruct
- class slangpy.TorchModule¶
Alias class:
slangpy.torchintegration.torchmodule.TorchModule
- class slangpy.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.Struct¶
Alias class:
slangpy.core.struct.Struct
- class slangpy.Module¶
Alias class:
slangpy.core.module.Module
- class slangpy.InstanceList¶
Alias class:
slangpy.core.instance.InstanceList
- class slangpy.InstanceBuffer¶
Alias class:
slangpy.core.instance.InstanceBuffer
- class slangpy.TorchFunction¶
Alias class:
slangpy.torchintegration.torchfunction.TorchFunction
- class slangpy.TorchStruct¶
Alias class:
slangpy.torchintegration.torchstruct.TorchStruct
- slangpy.SHADER_PATH: str = "C:\src\slangpy\slangpy\slang"¶