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.
The main slangpy module contains all the basic types
required to load and call Slang functions from Python.
The slangpy.reflection module is a wrapper around the Slang reflection API
exposed by SlangPy. It is used extensively internally by SlangPy, but is a useful way
of introspecting the Slang code in general. The most common way to access reflection
data is by accessing the SlangProgramLayout of a module via the
Module.layout attribute.
The slangpy.bindings module contains the tools required to extend SlangPy to
support new Python types. All slangpy’s built-in types are implemented using these
classes (see slangpy/builtin).
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] = [], srgb_gamma: bool | None = None) None¶
- __init__(self, data: ndarray[device='cpu'], pixel_format: slangpy.Bitmap.PixelFormat | None = None, channel_names: collections.abc.Sequence[str] | None = None, srgb_gamma: bool | 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¶
- dds: FileFormat = FileFormat.dds¶
- class Info¶
Decoded image layout, obtained without loading pixels.
- property width: int¶
Width in pixels.
- property height: int¶
Height in pixels.
- property pixel_format: slangpy.Bitmap.PixelFormat¶
Decoded pixel format.
- property component_type: slangpy.DataStruct.Type¶
Decoded component type.
- property channel_count: int¶
Number of channels per pixel.
- static load_from_file(path: str | os.PathLike) slangpy.Bitmap¶
N/A
- static load_from_numpy(data: ndarray[device='cpu']) slangpy.Bitmap¶
N/A
- property pixel_format: slangpy.Bitmap.PixelFormat¶
The pixel format.
- property component_type: slangpy.DataStruct.Type¶
The component type.
- property pixel_struct: slangpy.DataStruct¶
DataStruct 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.
- static supports_png_metadata() bool¶
Whether this build can read PNG transfer metadata through libpng.
- property bytes_per_pixel: int¶
The number of bytes per pixel.
- property buffer_size: int¶
The total size of the bitmap in bytes.
- 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¶
- resample(self, target: slangpy.Bitmap, filter: slangpy.BoxFilter | slangpy.TentFilter | slangpy.GaussianFilter | slangpy.MitchellFilter | slangpy.LanczosFilter = <slangpy.BoxFilter object at 0x00000206312430B0>, bc: tuple[slangpy.FilterBoundaryCondition, slangpy.FilterBoundaryCondition]=(FilterBoundaryCondition.clamp, FilterBoundaryCondition.clamp), clamp: tuple[float, float]=(-inf, inf)) None¶
Resample into a pre-allocated target bitmap using a separable filter.
Source and target must have the same pixel format, component type and channel count.
Only supports float16 and float32 component types.
- Parameters:
target – Pre-allocated target bitmap.
filter – Reconstruction filter to use.
bc – Horizontal and vertical boundary conditions for out-of-bounds lookups.
clamp – Optional (min, max) range to clamp output values.
- resample(self, width: int, height: int, filter: slangpy.BoxFilter | slangpy.TentFilter | slangpy.GaussianFilter | slangpy.MitchellFilter | slangpy.LanczosFilter = <slangpy.BoxFilter object at 0x0000020631243110>, bc: tuple[slangpy.FilterBoundaryCondition, slangpy.FilterBoundaryCondition]=(FilterBoundaryCondition.clamp, FilterBoundaryCondition.clamp), clamp: tuple[float, float]=(-inf, inf)) slangpy.Bitmap
N/A
- 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: collections.abc.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.
- static read_info(path: str | os.PathLike, format: slangpy.Bitmap.FileFormat = FileFormat.auto) slangpy.Bitmap.Info¶
Read image layout without decoding pixels. Supports all bitmap formats except DDS.
- Parameters:
path – Image file path.
format – File format, or auto_ to detect it.
- Returns:
Decoded image layout.
- class slangpy.DataStruct¶
Base class:
slangpy.ObjectStructured 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.
- Parameters:
pack – If true, the struct will be packed.
byte_order – Byte order of the struct.
- class Flags¶
Base class:
enum.IntFlagStruct field flags.
- class Field¶
Struct 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.
- 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.
- Parameters:
name – Name of the field.
type – Type of the field.
flags – Field flags.
default_value – Default value.
blend – List of blend weights/names.
- Returns:
Reference to the struct.
- 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
typeis an integer type.
- static is_unsigned(arg: slangpy.DataStruct.Type, /) bool¶
Check if
typeis an unsigned type.
- static is_signed(arg: slangpy.DataStruct.Type, /) bool¶
Check if
typeis a signed type.
- static is_float(arg: slangpy.DataStruct.Type, /) bool¶
Check if
typeis a floating point type.
- class slangpy.DataStructConverter¶
Base class:
slangpy.ObjectData 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.
- Parameters:
src – Source struct definition.
dst – Destination struct definition.
- property src: slangpy.DataStruct¶
The source struct definition.
- property dst: slangpy.DataStruct¶
The destination struct definition.
- class slangpy.Timer¶
High resolution CPU timer.
- __init__(self) None¶
- reset(self) None¶
Reset the timer.
- 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.
- Parameters:
data – Data to hash.
len – Length of data in bytes.
- update(self, str: str) slangpy.SHA1
Update hash by adding the given string.
- Parameters:
str – String to hash.
Constants¶
- slangpy.ALL_LAYERS: int = 4294967295¶
- slangpy.ALL_MIPS: int = 4294967295¶
- slangpy.SGL_GIT_VERSION: str = "commit: a2c16f8f / branch: dev/skallweit/vendor-pybind11-mkdoc (local changes)"¶
- slangpy.SGL_VERSION_MAJOR: int = 0¶
- slangpy.SGL_VERSION_MINOR: int = 43¶
- slangpy.SGL_VERSION_PATCH: int = 0¶
Logging¶
- class slangpy.LogLevel¶
Base class:
enum.IntEnumLog level.
- class slangpy.LogFrequency¶
Base class:
enum.EnumLog frequency.
- always: LogFrequency = LogFrequency.always¶
- once: LogFrequency = LogFrequency.once¶
- class slangpy.Logger¶
Base class:
slangpy.ObjectDiagnostic logger. Emission is noexcept: output exceptions are suppressed, while formatting and other internal exceptions invoke std::terminate with the active exception available to a handler. Configuration operations may throw. Exceptions while evaluating arguments before a logging call are the caller’s responsibility.
- __init__(self, level: slangpy.LogLevel = LogLevel.info, name: str = '', use_default_outputs: bool = True) None¶
Constructor.
- Parameters:
level – The log level to use (messages with level >= this will be logged).
name – The name of the logger.
use_default_outputs – Whether to use the default outputs (console + debug console on windows).
- property level: slangpy.LogLevel¶
The log level.
- add_console_output(self, colored: bool = True) slangpy.LoggerOutput¶
Add a console logger output.
- Parameters:
colored – Whether to use colored output.
- Returns:
The created logger output.
- add_file_output(self, path: str | os.PathLike) slangpy.LoggerOutput¶
Add a file logger output.
- Parameters:
path – The path to the log file.
- Returns:
The created logger output.
- 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.
- Parameters:
output – The logger output to add.
- use_same_outputs(self, other: slangpy.Logger) None¶
Use the same outputs as the given logger.
- Parameters:
other – Logger to copy outputs from.
- remove_output(self, output: slangpy.LoggerOutput) None¶
Remove a logger output.
- Parameters:
output – The logger output to remove.
- 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 without propagating exceptions. Output exceptions are suppressed so the remaining outputs are still attempted. Other internal exceptions invoke std::terminate. Output failures are not logged recursively. Once messages are recorded before delivery and are not retried if an output fails.
- Parameters:
level – The log level.
msg – The message.
frequency – The log frequency.
- static get() slangpy.Logger¶
Returns the lazily initialized global logger instance. Initialization failure or a call after static_shutdown() begins invokes std::terminate. The active exception can be inspected by an application-installed termination handler. Concurrent first use is supported; shutdown must be synchronized with all logger users.
- class slangpy.LoggerOutput¶
Base class:
slangpy.ObjectAbstract base class for logger outputs.
Implementations must be thread-safe. A LoggerOutput can be shared by multiple loggers, and write() may be called concurrently from multiple threads. Outputs may throw; Logger suppresses each output’s exception and continues with the remaining outputs. Direct calls to write() are not covered by Logger’s nonthrowing guarantee.
- __init__(self) None¶
- write(self, level: slangpy.LogLevel, name: str, msg: str) None¶
Write a log message.
- Parameters:
level – The log level.
module – The module name.
msg – The message.
- class slangpy.ConsoleLoggerOutput¶
Base class:
slangpy.LoggerOutputLogger output that writes to the console. Error messages are printed to stderr, all other messages to stdout. Messages are optionally colored.
- class slangpy.FileLoggerOutput¶
Base class:
slangpy.LoggerOutputLogger output that writes to a file.
- __init__(self, path: str | os.PathLike) None¶
- class slangpy.DebugConsoleLoggerOutput¶
Base class:
slangpy.LoggerOutputLogger 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 through the global logger. See Logger::log() for emission behavior and Logger::get() for initialization and shutdown requirements.
- Parameters:
level – The log level.
msg – The message.
frequency – The log frequency.
Windowing¶
- class slangpy.CursorMode¶
Base class:
enum.EnumMouse cursor modes.
- normal: CursorMode = CursorMode.normal¶
- disabled: CursorMode = CursorMode.disabled¶
- class slangpy.CursorShape¶
Base class:
enum.EnumMouse cursor shapes.
- arrow: CursorShape = CursorShape.arrow¶
- ibeam: CursorShape = CursorShape.ibeam¶
- crosshair: CursorShape = CursorShape.crosshair¶
- hand: CursorShape = CursorShape.hand¶
- hresize: CursorShape = CursorShape.hresize¶
- vresize: CursorShape = CursorShape.vresize¶
- class slangpy.WindowMode¶
Base class:
enum.EnumWindow modes.
- normal: WindowMode = WindowMode.normal¶
- minimized: WindowMode = WindowMode.minimized¶
- fullscreen: WindowMode = WindowMode.fullscreen¶
- class slangpy.Window¶
Base class:
slangpy.ObjectWindow class.
Platform independent class for managing a window and handle input events.
- __init__(self, width: int = 1024, height: int = 1024, title: str = 'slangpy', mode: slangpy.WindowMode = WindowMode.normal, resizable: bool = True) None¶
Constructor.
- Parameters:
width – Width of the window in pixels.
height – Height of the window in pixels.
title – Title of the window.
mode – Window mode.
resizable – Whether the window is resizable.
- property width: int¶
The width of the window in pixels.
- property height: int¶
The height of the window in pixels.
- property size: slangpy.math.uint2¶
Size of the window in pixels.
- resize(self, width: int, height: int) None¶
Resize the window.
- Parameters:
width – The new width of the window in pixels.
height – The new height of the window in pixels.
- property position: slangpy.math.int2¶
Position of the window on the screen in pixels.
- close(self) None¶
Close the window.
- process_events(self) None¶
Process any pending events.
- property cursor_mode: slangpy.CursorMode¶
The mouse cursor mode.
- property cursor_shape: slangpy.CursorShape¶
The mouse cursor shape.
- property on_resize: collections.abc.Callable[[int, int], None]¶
Event handler to be called when the window is resized.
- property on_refresh: collections.abc.Callable[[], None]¶
Event handler to be called when the window contents need to be refreshed.
- 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.
- class slangpy.MouseButton¶
Base class:
enum.EnumMouse buttons.
- left: MouseButton = MouseButton.left¶
- middle: MouseButton = MouseButton.middle¶
- right: MouseButton = MouseButton.right¶
- unknown: MouseButton = MouseButton.unknown¶
- class slangpy.KeyModifierFlags¶
Base class:
enum.IntFlagKeyboard modifier flags.
- none: KeyModifierFlags = 0¶
- shift: KeyModifierFlags = 1¶
- ctrl: KeyModifierFlags = 2¶
- alt: KeyModifierFlags = 4¶
- class slangpy.KeyModifier¶
Base class:
enum.EnumKeyboard modifiers.
- shift: KeyModifier = KeyModifier.shift¶
- ctrl: KeyModifier = KeyModifier.ctrl¶
- alt: KeyModifier = KeyModifier.alt¶
- class slangpy.KeyboardEventType¶
Base class:
enum.EnumKeyboard 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.
- __init__(self) None¶
- 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.
- has_modifier(self, arg: slangpy.KeyModifier, /) bool¶
Returns true if the specified modifier is set.
- class slangpy.MouseEventType¶
Base class:
enum.EnumMouse 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.
- __init__(self) None¶
- 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.
- has_modifier(self, arg: slangpy.KeyModifier, /) bool¶
Returns true if the specified modifier is set.
- class slangpy.GamepadEventType¶
Base class:
enum.EnumGamepad 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.EnumGamepad buttons.
- unknown: GamepadButton = GamepadButton.unknown¶
- 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.
- __init__(self) None¶
- property type: slangpy.GamepadEventType¶
The event type.
- property button: slangpy.GamepadButton¶
The gamepad button that was pressed/released.
Platform¶
- slangpy.platform.open_file_dialog(filters: collections.abc.Sequence[slangpy.platform.FileDialogFilter] = []) pathlib.Path | None¶
Show a file open dialog.
- Parameters:
filters – List of file filters.
- Returns:
The selected file path or nothing if the dialog was cancelled.
- slangpy.platform.save_file_dialog(filters: collections.abc.Sequence[slangpy.platform.FileDialogFilter] = []) pathlib.Path | None¶
Show a file save dialog.
- Parameters:
filters – List of file filters.
- Returns:
The selected file path or nothing if the dialog was cancelled.
- 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.executable_path() pathlib.Path¶
The full path to the current executable.
- slangpy.platform.executable_directory() pathlib.Path¶
The current executable directory.
- 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¶
Wait for all tasks in the global task group.
Device¶
- class slangpy.AccelerationStructure¶
Base class:
slangpy.DeviceChild- 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 | slangpy.AccelerationStructureBuildInputSpheres | slangpy.AccelerationStructureBuildInputLinearSweptSpheres]¶
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¶
- allow_opacity_micromap_update: AccelerationStructureBuildFlags = 64¶
- allow_disable_opacity_micromaps: AccelerationStructureBuildFlags = 128¶
- 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¶
- 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¶
- property opacity_micromap: slangpy.AccelerationStructureOpacityMicromapDesc | None¶
Optional opacity micromap attachment.
- 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 kind: slangpy.AccelerationStructureKind¶
- property size: int¶
- class slangpy.AccelerationStructureGeometryFlags¶
Base class:
enum.IntFlag- none: AccelerationStructureGeometryFlags = 0¶
- opaque: AccelerationStructureGeometryFlags = 1¶
- no_duplicate_any_hit_invocation: AccelerationStructureGeometryFlags = 2¶
- class slangpy.AccelerationStructureHandle¶
Acceleration structure handle.
- __init__(self) None¶
- __init__(self, value: int) None
- property value: int¶
- 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¶
- force_opacity_micromap_2_state: AccelerationStructureInstanceFlags = 16¶
- disable_opacity_micromaps: AccelerationStructureInstanceFlags = 32¶
- class slangpy.AccelerationStructureInstanceList¶
Base class:
slangpy.DeviceChild- 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: collections.abc.Sequence[slangpy.AccelerationStructureInstanceDesc]) None
- buffer(self) slangpy.Buffer¶
- build_input_instances(self) slangpy.AccelerationStructureBuildInputInstances¶
- class slangpy.AccelerationStructureKind¶
Base class:
enum.Enum- unknown: AccelerationStructureKind = AccelerationStructureKind.unknown¶
- bottom_level: AccelerationStructureKind = AccelerationStructureKind.bottom_level¶
- top_level: AccelerationStructureKind = AccelerationStructureKind.top_level¶
- 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 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).
- 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
- 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.
Note
Buffer must be created with the
BufferUsage::sharedusage flag.
- property descriptor_handle_ro: slangpy.DescriptorHandle¶
Get bindless descriptor handle for read access.
- property descriptor_handle_rw: slangpy.DescriptorHandle¶
Get bindless descriptor handle for read-write access.
- 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.ObjectRepresents 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, device_type: slangpy.DeviceType, 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.
- 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.
- 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.
- reinterpret(self, new_layout: slangpy.TypeLayoutReflection) slangpy.BufferElementCursor¶
Reinterpret the current cursor using a different type layout.
- set_data(self, data: ndarray[device='cpu']) None¶
- set_data(self, data: ndarray[device='cpu']) None
- find_field(self, name: str) slangpy.BufferElementCursor¶
N/A
- find_element(self, index: int) slangpy.BufferElementCursor¶
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¶
- micromap_build_input: BufferUsage = 1024¶
- micromap_storage: BufferUsage = 2048¶
- shader_table: BufferUsage = 4096¶
- 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 logic_op: slangpy.LogicOp¶
- class slangpy.CommandBuffer¶
Base class:
slangpy.DeviceChild- property queue: slangpy.CommandQueueType¶
Command queue this command buffer is recorded for.
- property recording_id: int¶
Command recording ID, which is unique for each recording of a command buffer.
- class slangpy.CommandEncoder¶
Base class:
slangpy.DeviceChild- 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.
- Parameters:
dst – Destination buffer.
dst_offset – Destination offset in bytes.
src – Source buffer.
src_offset – Source offset in bytes.
size – Size in bytes.
- 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.
- Parameters:
dst – Destination texture.
dst_subresource_range – Destination subresource range.
dst_offset – Destination offset in texels.
src – Source texture.
src_subresource_range – Source subresource range.
src_offset – Source offset in texels.
extent – Size in texels (-1 for maximum possible size).
- 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.
- Parameters:
dst – Destination texture.
dst_layer – Destination layer.
dst_mip – Destination mip level.
dst_offset – Destination offset in texels.
src – Source texture.
src_layer – Source layer.
src_mip – Source mip level.
src_offset – Source offset in texels.
extent – Size in texels (-1 for maximum possible size).
- 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.
- Parameters:
dst – Destination buffer.
dst_offset – Destination offset in bytes.
dst_size – Destination size in bytes.
dst_row_pitch – Destination row stride in bytes.
src – Source texture.
src_layer – Source layer.
src_mip – Source mip level.
src_offset – Source offset in texels.
extent – Extent in texels (-1 for maximum possible extent).
- 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.
- Parameters:
dst – Destination texture.
dst_layer – Destination layer.
dst_mip – Destination mip level.
dst_offset – Destination offset in texels.
src – Source buffer.
src_offset – Source offset in bytes.
src_size – Size in bytes.
src_row_pitch – Source row stride in bytes.
extent – Extent in texels (-1 for maximum possible extent).
- 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: collections.abc.Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, offset: slangpy.math.uint3, extent: slangpy.math.uint3, range: slangpy.SubresourceRange, subresource_data: collections.abc.Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, range: slangpy.SubresourceRange, subresource_data: collections.abc.Sequence[numpy.ndarray[]]) None
- upload_texture_data(self, texture: slangpy.Texture, subresource_data: collections.abc.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.
- Parameters:
dst – View of the destination texture.
src – View of the source texture.
filter – Filtering mode to use.
- 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.
- Parameters:
dst – Destination texture.
src – Source texture.
filter – Filtering mode to use.
- generate_mips(self, texture: slangpy.Texture, layer: int = 0) None¶
- 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: collections.abc.Sequence[slangpy.AccelerationStructureQueryDesc] = []) None¶
- build_micromap(self, desc: slangpy.MicromapBuildDesc, dst: slangpy.Micromap, scratch_buffer: slangpy.BufferOffsetPair) None¶
- copy_acceleration_structure(self, dst: slangpy.AccelerationStructure, src: slangpy.AccelerationStructure, mode: slangpy.AccelerationStructureCopyMode) None¶
- query_acceleration_structure_properties(self, acceleration_structures: collections.abc.Sequence[slangpy.AccelerationStructure], queries: collections.abc.Sequence[slangpy.AccelerationStructureQueryDesc]) None¶
- execute_cluster_operation(self, desc: slangpy.ClusterOperationDesc) None¶
Execute an indirect cluster acceleration structure operation.
- convert_coop_vec_matrices(self, dst: slangpy.Buffer, dst_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc], src: slangpy.Buffer, src_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc]) None¶
- convert_coop_vec_matrix(self, dst: slangpy.Buffer, dst_desc: slangpy.CoopVecMatrixDesc, src: slangpy.Buffer, src_desc: slangpy.CoopVecMatrixDesc) 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.
- Parameters:
buffer – Buffer
state – New state
- 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.
- Parameters:
texture – Texture
state – New state
- set_texture_state(self, texture: slangpy.Texture, range: slangpy.SubresourceRange, state: slangpy.ResourceState) None
- global_barrier(self) None¶
Insert a global barrier that ensures all previous writes are visible to subsequent reads.
Note
This is not necessary for typical bindings, as state management is automatic, however global barriers are useful for cross-api synchronization (eg 2 slangpy devices constructed from the same native handle), or as brute force tools for synchronizing pointer/bindless operations.
- 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.
- Parameters:
name – Name of the marker.
color – Color of the marker.
- write_timestamp(self, query_pool: slangpy.QueryPool, index: int) None¶
Write a timestamp.
- Parameters:
query_pool – Query pool.
index – Index of the query.
- execute_callback(self, callback: collections.abc.Callable[[slangpy.NativeHandle], None]) None¶
- finish(self) slangpy.CommandBuffer¶
- property queue: slangpy.CommandQueueType¶
Command queue this encoder is recording for.
- property recording_id: int¶
Command recording ID, which is unique for each recording of a command buffer.
- property native_handle: slangpy.NativeHandle¶
Get the command encoder handle.
- 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, queue: slangpy.CommandQueueType = CommandQueueType.graphics, cuda_stream: slangpy.NativeHandle = NativeHandle(type=undefined, value=0x00000000), query_pool: slangpy.QueryPool | None = None, query_index_before: int = 0, query_index_after: int = 0, **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.PipelineCompute 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¶
Get the native pipeline handle.
- class slangpy.ComputePipelineDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- property compilation_policy: slangpy.PipelineCompilationPolicy¶
- class slangpy.CoopVecMatrixDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property rows: int¶
- property cols: int¶
- property element_type: slangpy.DataType¶
- property layout: slangpy.CoopVecMatrixLayout¶
- property size: int¶
Size (in bytes) of the matrix.
- property offset: int¶
Offset (in bytes) from start of buffer.
- property row_col_stride: int¶
Stride (in bytes) between rows or columns.
- 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.
- 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_func: slangpy.ComparisonFunc¶
- 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.DescriptorHandle¶
- property type: slangpy.DescriptorHandleType¶
- property value: int¶
- class slangpy.Device¶
Base class:
slangpy.Object- __init__(self, type: slangpy.DeviceType = DeviceType.automatic, enable_debug_layers: bool = False, debug_layers_log_level: slangpy.LogLevel = LogLevel.warn, enable_rhi_validation: bool = True, rhi_validation_log_level: slangpy.LogLevel = LogLevel.warn, enable_ray_tracing_validation: bool = False, enable_aftermath: bool = False, enable_cuda_interop: bool = False, enable_print: bool = False, enable_hot_reload: bool = True, enable_compilation_reports: bool = False, pipeline_compilation_mode: slangpy.PipelineCompilationMode = PipelineCompilationMode.serial, adapter_luid: collections.abc.Sequence[int] | None = None, compiler_options: slangpy.SlangCompilerOptions | None = None, module_cache_path: str | os.PathLike | None = None, shader_cache_path: str | os.PathLike | None = None, shader_cache_size: int = 134217728, existing_device_handles: collections.abc.Sequence[slangpy.NativeHandle] | None = None, bindless_options: slangpy.BindlessDesc | None = None, additional_vulkan_instance_extensions: collections.abc.Sequence[str] | None = None, additional_vulkan_device_extensions: collections.abc.Sequence[str] | None = None, enable_cuda_launch_from_gfx: bool = True, enable_ray_tracing: bool = True, label: str = '') 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 features: list[slangpy.Feature]¶
List of features supported by the device.
- property native_handles: list[slangpy.NativeHandle]¶
Get the native device handles.
- set_cuda_context_current(self) None¶
Set the CUDA context current on the calling thread. No-op for non-CUDA devices.
Use this when operating from a thread that doesn’t have the CUDA context set, or after manually switching to a different context.
- cuda_context_scope(self) slangpy.CudaContextScope¶
Returns a context manager that pushes/pops the CUDA context.
- Usage:
- with device.cuda_context_scope():
# CUDA context is active here buffer = device.create_buffer(…)
# Previous context is restored
This is useful for multi-GPU scenarios where you need to temporarily switch to a different device’s context.
- 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. All close callbacks and cleanup run even if a callback throws. The first error is rethrown after cleanup. Reentrant and repeated close calls are no-ops.
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.
- Parameters:
window – Window to create the surface for.
- Returns:
New surface object.
- create_surface(self, window_handle: slangpy.WindowHandle) slangpy.Surface
Create a new surface.
- Parameters:
window_handle – Native window handle to create the surface for.
- Returns:
New surface object.
- create_buffer(self, size: int = 0, element_count: int = 0, struct_size: int = 0, resource_type_layout: object | None = None, format: slangpy.Format = Format.undefined, memory_type: slangpy.MemoryType = MemoryType.device_local, usage: slangpy.BufferUsage = 0, default_state: slangpy.ResourceState = ResourceState.undefined, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Buffer¶
Create a new buffer.
- Parameters:
size – Buffer size in bytes.
element_count – Buffer size in number of struct elements. Can be used instead of
size.struct_size – Struct size in bytes.
resource_type_layout – Resource type layout of the buffer. Can be used instead of
struct_sizeto specify the size of the struct.format – Buffer format. Used when creating typed buffer views.
initial_state – Initial resource state.
usage – Resource usage flags.
memory_type – Memory type.
label – Debug label.
data – Initial data to upload to the buffer.
data_size – Size of the initial data in bytes.
- Returns:
New buffer object.
- create_buffer(self, desc: slangpy.BufferDesc) slangpy.Buffer
- create_buffer_from_native_handle(self, desc: slangpy.BufferDesc, handle: slangpy.NativeHandle) slangpy.Buffer¶
Create a new buffer wrapping an existing native buffer without copying.
The expected handle type depends on the device type:
D3D12Resourceon D3D12,VkBufferon Vulkan,MTLBufferon Metal,CUdeviceptron CUDA andWGPUBufferon WGPU.- Parameters:
desc – Buffer description. The size must not exceed the native allocation.
handle – Native buffer handle to wrap.
- Returns:
New buffer object.
- 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, default_state: slangpy.ResourceState = ResourceState.undefined, sampler: slangpy.Sampler | None = None, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Texture¶
Create a new texture.
- Parameters:
type – Texture type.
format – Texture format.
width – Width in pixels.
height – Height in pixels.
depth – Depth in pixels.
array_length – Array length.
mip_count – Mip level count. Number of mip levels (ALL_MIPS for all mip levels).
sample_count – Number of samples for multisampled textures.
quality – Quality level for multisampled textures.
usage – Resource usage.
memory_type – Memory type.
label – Debug label.
data – Initial data.
- Returns:
New texture object.
- 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.
- Parameters:
min_filter – Minification filter.
mag_filter – Magnification filter.
mip_filter – Mip-map filter.
reduction_op – Reduction operation.
address_u – Texture addressing mode for the U coordinate.
address_v – Texture addressing mode for the V coordinate.
address_w – Texture addressing mode for the W coordinate.
mip_lod_bias – Mip-map LOD bias.
max_anisotropy – Maximum anisotropy.
comparison_func – Comparison function.
border_color – Border color.
min_lod – Minimum LOD level.
max_lod – Maximum LOD level.
label – Debug label.
- Returns:
New sampler object.
- create_sampler(self, desc: slangpy.SamplerDesc) slangpy.Sampler
- create_fence(self, initial_value: int = 0, shared: bool = False) slangpy.Fence¶
Create a new fence.
- Parameters:
initial_value – Initial fence value.
shared – Create a shared fence.
- Returns:
New fence object.
- create_fence(self, desc: slangpy.FenceDesc) slangpy.Fence
- create_query_pool(self, type: slangpy.QueryType, count: int) slangpy.QueryPool¶
Create a new query pool.
- Parameters:
type – Query type.
count – Number of queries in the pool.
- Returns:
New query pool object.
- 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.
- Parameters:
input_elements – List of input elements (see InputElementDesc for details).
vertex_streams – List of vertex streams (see VertexStreamDesc for details).
- Returns:
New input layout object.
- create_input_layout(self, desc: slangpy.InputLayoutDesc) slangpy.InputLayout
- create_command_encoder(self, queue: slangpy.CommandQueueType = CommandQueueType.graphics) slangpy.CommandEncoder¶
Create a command encoder.
- submit_command_buffers(self, command_buffers: collections.abc.Sequence[slangpy.CommandBuffer], wait_fences: collections.abc.Sequence[slangpy.Fence] = [], wait_fence_values: collections.abc.Sequence[int] = [], signal_fences: collections.abc.Sequence[slangpy.Fence] = [], signal_fence_values: collections.abc.Sequence[int] = [], queue: slangpy.CommandQueueType = CommandQueueType.graphics, cuda_stream: slangpy.NativeHandle = NativeHandle(type=undefined, value=0x00000000)) int¶
Submit a list of command buffers to the device.
The returned submission ID can be used to wait for the submission to complete.
The wait fence values are optional. If not provided, the fence values will be set to AUTO, which means waiting for the last signaled value.
The signal fence values are optional. If not provided, the fence values will be set to AUTO, which means incrementing the last signaled value by 1. *
- Parameters:
command_buffers – List of command buffers to submit.
wait_fences – List of fences to wait for before executing the command buffers.
wait_fence_values – List of fence values to wait for before executing the command buffers.
signal_fences – List of fences to signal after executing the command buffers.
signal_fence_values – List of fence values to signal after executing the command buffers.
queue – Command queue to submit to.
cuda_stream – On none-CUDA backends, when interop is enabled, this is the stream to sync with before/after submission (assuming any resources are shared with CUDA) and use for internal copies. If not specified, sync will happen with the NULL (default) CUDA stream. On CUDA backends, this is the CUDA stream to use for the submission. If not specified, the default stream of the command queue will be used, which for CommandQueueType::graphics is the NULL stream. It is an error to specify a stream for none-CUDA backends that have interop disabled.
- Returns:
Submission ID.
- submit_command_buffer(self, command_buffer: slangpy.CommandBuffer, queue: slangpy.CommandQueueType = CommandQueueType.graphics, cuda_stream: slangpy.NativeHandle = NativeHandle(type=undefined, value=0x00000000)) int¶
Submit a command buffer to the device.
The returned submission ID can be used to wait for the submission to complete.
- Parameters:
command_buffer – Command buffer to submit.
queue – Command queue to submit to.
- Returns:
Submission ID.
- is_submit_finished(self, id: int) bool¶
Check if a submission is finished executing.
- Parameters:
id – Submission ID.
- Returns:
True if the submission is finished executing.
- wait_for_submit(self, id: int) None¶
Wait for a submission to finish execution.
- Parameters:
id – Submission ID.
- wait_for_idle(self, queue: slangpy.CommandQueueType = CommandQueueType.graphics) None¶
Wait for the command queue to be idle.
- Parameters:
queue – Command queue to wait for.
- get_timestamp_calibration(self, queue: slangpy.CommandQueueType = CommandQueueType.graphics) slangpy.TimestampCalibration¶
Get timestamp calibration data for a queue.
This can be used to synchronize CPU and GPU timestamps, which is necessary for accurate profiling and debugging.
- Parameters:
queue – Command queue to get timestamp calibration data for.
- Returns:
Timestamp calibration data
- 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.
- Parameters:
cuda_stream – CUDA stream
- 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.
- Parameters:
cuda_stream – CUDA stream
- get_acceleration_structure_sizes(self, desc: slangpy.AccelerationStructureBuildDesc) slangpy.AccelerationStructureSizes¶
Query the device for buffer sizes required for acceleration structure builds.
- Parameters:
desc – Acceleration structure build description.
- Returns:
Acceleration structure sizes.
- create_acceleration_structure(self, kind: slangpy.AccelerationStructureKind = AccelerationStructureKind.unknown, size: int = 0, label: str = '') slangpy.AccelerationStructure¶
Create a new acceleration structure.
- create_acceleration_structure(self, desc: slangpy.AccelerationStructureDesc) slangpy.AccelerationStructure
- create_acceleration_structure_instance_list(self, size: int) slangpy.AccelerationStructureInstanceList¶
Create a new acceleration structure instance list.
- get_micromap_sizes(self, desc: slangpy.MicromapBuildDesc) slangpy.MicromapSizes¶
Query the device for buffer sizes required for a micromap build.
- create_micromap(self, type: slangpy.MicromapType = MicromapType.opacity, size: int = 0, flags: slangpy.MicromapBuildFlags = 0, label: str = '') slangpy.Micromap¶
Create a new micromap.
- create_micromap(self, desc: slangpy.MicromapDesc) slangpy.Micromap
- get_cluster_operation_sizes(self, params: slangpy.ClusterOperationParams) slangpy.ClusterOperationSizes¶
Query the device for buffer sizes required for a cluster operation.
- 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 a new shader table.
- create_shader_table(self, desc: slangpy.ShaderTableDesc) slangpy.ShaderTable
- get_coop_vec_matrix_size(self, rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType, row_col_stride: int = 0) int¶
Get the size of a cooperative vector matrix in bytes.
- create_coop_vec_matrix_desc(self, rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType, offset: int = 0, row_col_stride: int = 0) slangpy.CoopVecMatrixDesc¶
Create a cooperative vector matrix descriptor.
- convert_coop_vec_matrices(self, dst: bytearray, dst_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc], src: bytes, src_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc]) None¶
Convert multiple cooperative vector matrices between formats.
- convert_coop_vec_matrix(self, dst: bytearray, dst_descs: slangpy.CoopVecMatrixDesc, src: bytes, src_descs: slangpy.CoopVecMatrixDesc) None¶
Convert multiple cooperative vector matrices between formats.
- convert_coop_vec_matrix(self, dst: ndarray[device='cpu'], src: ndarray[device='cpu'], dst_layout: slangpy.CoopVecMatrixLayout | None = None, src_layout: slangpy.CoopVecMatrixLayout | None = None) None
- 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.
- Parameters:
compiler_options – Compiler options (see SlangCompilerOptions for details).
- Returns:
New slang session object.
- reload_all_programs(self) None¶
Reload all shader programs.
- load_module(self, module_name: str) slangpy.SlangModule¶
Load a slang module by name.
- load_module_from_source(self, module_name: str, source: str, path: str | os.PathLike | None = None) slangpy.SlangModule¶
Load a slang module from source code.
- compose_modules(self, name: str, modules: collections.abc.Sequence[slangpy.SlangModule], type_conformances: collections.abc.Sequence[slangpy.TypeConformance] = []) slangpy.SlangModule¶
Compose multiple slang modules into one.
- 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 modules and entry points into a shader program.
- 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 module and link a shader program in one step.
- get_compilation_reports(self) list[CompilationReport]¶
Return compilation reports for all shader programs tracked by the device.
- create_root_shader_object(self, shader_program: slangpy.ShaderProgram) slangpy.ShaderObject¶
Create a root shader object for a shader program.
- create_shader_object(self, type_layout: slangpy.TypeLayoutReflection) slangpy.ShaderObject¶
Create a shader object from a type layout. For a reflected parameter block, pass the field’s type layout, including the container, so the backend can select the block’s storage layout.
- create_shader_object(self, cursor: slangpy.ReflectionCursor) slangpy.ShaderObject
Create a shader object from a reflection cursor.
- create_compute_pipeline(self, program: slangpy.ShaderProgram, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.ComputePipeline¶
Create a compute pipeline.
- 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, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.RenderPipeline¶
Create a render pipeline.
- 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, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.RayTracingPipeline¶
Create a ray tracing pipeline.
- create_ray_tracing_pipeline(self, desc: slangpy.RayTracingPipelineDesc) slangpy.RayTracingPipeline
- create_compute_kernel(self, program: slangpy.ShaderProgram) slangpy.ComputeKernel¶
Create a compute kernel.
- create_compute_kernel(self, desc: slangpy.ComputeKernelDesc) slangpy.ComputeKernel
- flush_print(self) None¶
Block and flush all shader side debug print output.
- wait(self) None¶
Wait for all device work to complete.
- register_device_close_callback(self, callback: collections.abc.Callable[[slangpy.Device], None]) int¶
Register a device close callback, called at start of device close.
- unregister_device_close_callback(self, id: int) None¶
Unregister a device close callback.
- register_shader_hot_reload_callback(self, callback: collections.abc.Callable[[slangpy.ShaderHotReloadEvent], None]) int¶
Register a hot reload hook, called immediately after any module is reloaded.
- unregister_shader_hot_reload_callback(self, id: int) None¶
N/A
- register_command_recording_submitted_callback(self, callback: collections.abc.Callable[[slangpy.CommandRecordingSubmittedEvent], None]) int¶
Register a callback to be called when a command recording is submitted.
- unregister_command_recording_submitted_callback(self, id: int) None¶
Unregister a command recording submitted callback.
- register_command_recording_discarded_callback(self, callback: collections.abc.Callable[[slangpy.CommandRecordingDiscardedEvent], None]) int¶
Register a callback to be called when a command recording is discarded (not submitted). Called from command encoder/buffer destructors. Callbacks must not throw: an escaping exception invokes std::terminate, including for Python callbacks.
- unregister_command_recording_discarded_callback(self, id: int) None¶
Unregister a command recording discarded callback.
- set_hot_reload_delay(self, timeout_ms: int) None¶
- hot_reload_check(self) None¶
- static enumerate_adapters(type: slangpy.DeviceType = DeviceType.automatic) list[slangpy.AdapterInfo]¶
Enumerates all available adapters of a given device type.
- static get_created_devices() list[slangpy.Device]¶
Lists all created devices
- static report_live_objects() None¶
Report live objects in the rhi layer. This is useful for checking clean shutdown with all resources released properly.
- report_heaps(self) list[slangpy.HeapReport]¶
Report status of internal heaps used by the device.
- Returns:
List of heap reports containing heap names and allocation information.
- class slangpy.DeviceChild¶
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.DeviceChild.MemoryUsage¶
The memory usage by this resource.
- class slangpy.DeviceDesc¶
- __init__(self) None¶
- __init__(self, desc: slangpy.DeviceDesc) None
- __init__(self, arg: dict, /) None
- property type: slangpy.DeviceType¶
The type of the device.
- property debug_layers_log_level: slangpy.LogLevel¶
Debug layers log level (only applicable if debug layers are enabled).
- property rhi_validation_log_level: slangpy.LogLevel¶
RHI validation layer log level (only applicable if RHI validation is enabled).
- property enable_cuda_launch_from_gfx: bool¶
Enable launching CUDA kernels from inside graphics command buffers (Vulkan only, via VK_NVX_binary_import + VK_NVX_image_view_handle). On by default. Set to false if the application doesn’t need vkCmdCuLaunchKernelNVX; enabling these extensions has been observed to interfere with concurrent cuDNN usage on some driver/GPU pairs.
- property enable_ray_tracing: bool¶
Enable Vulkan ray tracing extensions (acceleration_structure, ray_tracing_pipeline, ray_query, ray_tracing_position_fetch, plus NV variants). On by default. Set to false if the application doesn’t use ray tracing; enabling these extensions has been observed to interfere with concurrent cuDNN usage on some driver/GPU pairs.
- property enable_hot_reload: bool¶
Adapter LUID to select adapter on which the device will be created.
- property pipeline_compilation_mode: slangpy.PipelineCompilationMode¶
Control the default pipeline compilation policy and resolution of deferred pipelines.
- 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 bindless_options: slangpy.BindlessDesc¶
- property module_cache_path: pathlib.Path | None¶
Path to the module cache directory (optional). If a relative path is used, the cache is stored in the application data directory.
- property shader_cache_path: pathlib.Path | None¶
Path to the shader and pipeline cache directory (optional). If a relative path is used, the cache is stored in the application data directory.
- property shader_cache_size: int¶
Maximum size of the persistent cache used to cache both shaders and pipelines.
- property existing_device_handles: list[slangpy.NativeHandle]¶
Native device handles for initializing with externally created device. Currenlty only used for CUDA interoperability.
- property additional_vulkan_instance_extensions: list[str]¶
Additional Vulkan instance extensions to enable when SGL creates the Vulkan instance.
- class slangpy.DeviceInfo¶
- property type: slangpy.DeviceType¶
The type of the device.
- property timestamp_frequency: int¶
The frequency of the timestamp counter. To resolve a timestamp to seconds, divide by this value.
- property optix_version: int¶
The version of OptiX used by the device (0 if OptiX is not supported). The format matches the OPTIX_VERSION macro, e.g. 90000 for version 9.0.0.
- 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 min_wave_size: int¶
Minimum number of lanes in a wave/subgroup/warp. 0 if the size is unknown or not applicable.
- property max_wave_size: int¶
Maximum number of lanes in a wave/subgroup/warp. 0 if the size is unknown or not applicable.
- 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.
- property max_entry_point_uniform_size: int¶
Maximum size in bytes of inline-uniform data for entry-point parameters. On Vulkan this corresponds to push constant size (minimum 128 bytes). On D3D12 this corresponds to root constant space (~256 bytes). On CUDA this corresponds to the kernel parameter block (~4096 bytes).
- 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 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- acceleration_structure_linear_swept_spheres: Feature = Feature.acceleration_structure_linear_swept_spheres¶
- class slangpy.Fence¶
Base class:
slangpy.DeviceChildFence.
- property desc: slangpy.FenceDesc¶
- signal(self, value: int = 18446744073709551615) int¶
Signal the fence. This signals the fence from the host.
- Parameters:
value – The value to signal. If
AUTO,the signaled value will be auto-incremented.- Returns:
The signaled value.
- 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.
- Parameters:
value – The value to wait for. If
AUTO,wait for the last signaled value.timeout_ns – The timeout in nanoseconds. If
TIMEOUT_INFINITE,the function will block indefinitely.
- 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. Note: Fence must be created with the
FenceDesc::sharedflag.
- property native_handle: slangpy.NativeHandle¶
Get the native fence handle.
- 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 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 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 dxgi_format: int¶
DXGI format.
- property vk_format: int¶
Vulkan format.
- 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.
- class slangpy.FormatSupport¶
Base class:
enum.IntFlag- none: FormatSupport = 0¶
- copy_source: FormatSupport = 1¶
- copy_destination: FormatSupport = 2¶
- texture: FormatSupport = 4¶
- depth_stencil: FormatSupport = 8¶
- render_target: FormatSupport = 16¶
- blendable: FormatSupport = 32¶
- multisampling: FormatSupport = 64¶
- resolvable: FormatSupport = 128¶
- shader_load: FormatSupport = 256¶
- shader_sample: FormatSupport = 512¶
- shader_uav_load: FormatSupport = 1024¶
- shader_uav_store: FormatSupport = 2048¶
- shader_atomic: FormatSupport = 4096¶
- buffer: FormatSupport = 8192¶
- index_buffer: FormatSupport = 16384¶
- vertex_buffer: FormatSupport = 32768¶
- 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 return_type: slangpy.TypeReflection¶
Function return type.
- property parameters: slangpy.FunctionReflectionParameterList¶
List of all function parameters.
- get_user_attribute_count(self) int¶
- get_user_attribute_by_index(self, index: int) slangpy.Attribute¶
- find_user_attribute_by_name(self, name: str) slangpy.Attribute¶
- 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
- 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_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.DeviceChild- 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.DeviceChild- 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¶
- class slangpy.NativeHandle¶
Represents a native graphics API handle (e.g. D3D12/Vulkan/Metal/CUDA etc). Native handles are expected to fit into 64 bits. Type information and conversion from/to native handles is done using type traits from native_handle_traits.h which needs to be included when creating and accessing NativeHandle. This separation is done so we don’t expose the heavy backend API headers everywhere.
- __init__(self) None¶
- __init__(self, arg0: slangpy.NativeHandleType, arg1: int, /) None
- property type: slangpy.NativeHandleType¶
- property value: int¶
- static from_cuda_stream(stream: int) slangpy.NativeHandle¶
- static from_cuda_device_ptr(device_ptr: int) slangpy.NativeHandle¶
- class slangpy.NativeHandleType¶
Base class:
enum.Enum- 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¶
- VkMicromapEXT: NativeHandleType = NativeHandleType.VkMicromapEXT¶
- 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¶
- CUcontext: NativeHandleType = NativeHandleType.CUcontext¶
- 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.
- Parameters:
name – Name of the marker.
color – Color of the marker.
- write_timestamp(self, query_pool: slangpy.QueryPool, index: int) None¶
Write a timestamp.
- Parameters:
query_pool – Query pool.
index – Index of the query.
- class slangpy.Pipeline¶
Base class:
slangpy.DeviceChildPipeline 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.DeviceChild- property desc: slangpy.QueryPoolDesc¶
- reset(self) None¶
- reset(self, index: int, count: int) None
- get_result_state(self, index: int, count: int) sgl::QueryResultState¶
- get_result_state(self, index: int) sgl::QueryResultState
- get_result(self, index: int) int¶
- 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.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 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.PipelineRay tracing pipeline.
- property native_handle: slangpy.NativeHandle¶
Get the native pipeline handle.
- 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¶
- property compilation_policy: slangpy.PipelineCompilationPolicy¶
- class slangpy.RayTracingPipelineFlags¶
Base class:
enum.IntFlag- none: RayTracingPipelineFlags = 0¶
- skip_triangles: RayTracingPipelineFlags = 1¶
- skip_procedurals: RayTracingPipelineFlags = 2¶
- enable_spheres: RayTracingPipelineFlags = 4¶
- enable_linear_swept_spheres: RayTracingPipelineFlags = 8¶
- enable_clusters: RayTracingPipelineFlags = 16¶
- enable_opacity_micromaps: RayTracingPipelineFlags = 64¶
- class slangpy.ReflectionCursor¶
- __init__(self, shader_program: slangpy.ShaderProgram) None¶
- find_field(self, name: str) slangpy.ReflectionCursor¶
- find_element(self, index: int) slangpy.ReflectionCursor¶
- 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 stencil_load_op: slangpy.LoadOp¶
- property stencil_store_op: slangpy.StoreOp¶
- property stencil_clear_value: int¶
- 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 0x000002063327DBC0>) None¶
- draw_indexed_indirect(self, max_draw_count: int, arg_buffer: slangpy.BufferOffsetPair, count_buffer: slangpy.BufferOffsetPair = <slangpy.BufferOffsetPair object at 0x000002063327DBF0>) None¶
- draw_mesh_tasks(self, dimensions: slangpy.math.uint3) None¶
- class slangpy.RenderPipeline¶
Base class:
slangpy.PipelineRender pipeline.
- property native_handle: slangpy.NativeHandle¶
Get the native pipeline handle.
- 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¶
- property compilation_policy: slangpy.PipelineCompilationPolicy¶
- 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- none: RenderTargetWriteMask = 0¶
- red: RenderTargetWriteMask = 1¶
- green: RenderTargetWriteMask = 2¶
- blue: RenderTargetWriteMask = 4¶
- alpha: RenderTargetWriteMask = 8¶
- all: RenderTargetWriteMask = 15¶
- class slangpy.Resource¶
Base class:
slangpy.DeviceChild- property native_handle: slangpy.NativeHandle¶
Get the native resource handle.
- 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_read: ResourceState = ResourceState.acceleration_structure_read¶
- acceleration_structure_write: ResourceState = ResourceState.acceleration_structure_write¶
- acceleration_structure_build_output: ResourceState = ResourceState.acceleration_structure_build_output¶
- micromap_build_input: ResourceState = ResourceState.micromap_build_input¶
- micromap_read: ResourceState = ResourceState.micromap_read¶
- micromap_write: ResourceState = ResourceState.micromap_write¶
- class slangpy.Sampler¶
Base class:
slangpy.DeviceChild- property desc: slangpy.SamplerDesc¶
- property descriptor_handle: slangpy.DescriptorHandle¶
- property native_handle: slangpy.NativeHandle¶
Get the native sampler handle.
- 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 max_anisotropy: int¶
- property comparison_func: slangpy.ComparisonFunc¶
- property border_color: slangpy.math.float4¶
- 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¶
- reinterpret(self, new_layout: slangpy.TypeLayoutReflection) slangpy.ShaderCursor¶
Reinterpret the current cursor using a different type layout.
- dereference(self) slangpy.ShaderCursor¶
- find_entry_point(self, index: int) slangpy.ShaderCursor¶
- get_field_by_index(self, field_index: int) slangpy.ShaderCursor¶
N/A
- find_field(self, name: str) slangpy.ShaderCursor¶
N/A
- find_element(self, index: int) slangpy.ShaderCursor¶
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.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¶
- class slangpy.ShaderProgram¶
Base class:
slangpy.DeviceChild- property layout: slangpy.ProgramLayout¶
- property reflection: slangpy.ReflectionCursor¶
- get_compilation_report(self) CompilationReport¶
Return this shader program’s compilation report.
- 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.DeviceChild
- class slangpy.ShaderTableDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property program: slangpy.ShaderProgram¶
- 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 profile: str | None¶
Backend compilation profile, e.g. sm_6_6, spirv_1_6, or compute_75. None selects device defaults. Explicit profiles do not inherit optional device capabilities. Native Slang profiles can permit higher shader requirements. CUDA profiles select an exact NVRTC architecture.
- 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_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. Only forwarded to downstream compilers that accept pass-through arguments: DXC (D3D12) and NVRTC (CUDA). Ignored for other backends. Arguments must be compatible with the selected profile; use profile for target selection.
- 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 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.
- specialize(self, specialization_args: collections.abc.Sequence[slangpy.SpecializationArg]) slangpy.SlangEntryPoint¶
- 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. Only forwarded to downstream compilers that accept pass-through arguments: DXC (D3D12) and NVRTC (CUDA). Ignored for other backends. Arguments must be compatible with the session’s selected profile; use profile for target selection.
- 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 path: pathlib.Path¶
Module source path. This can be empty if the module was generated from a string.
- property layout: slangpy.ProgramLayout¶
Combined layout reflecting the primary module and all linked modules.
- property entry_points: list[slangpy.SlangEntryPoint]¶
Return vector of all current entry points in the module.
- property module_decl: slangpy.DeclReflection¶
Get root decl ref for this module. Throws for composed modules (no single module to reflect).
- property source_modules: list[slangpy.SlangModule]¶
Source modules that make up this composed module (empty for non- composed modules).
- entry_point(self, name: str, type_conformances: collections.abc.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.ObjectA 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.
- compose_modules(self, name: str, modules: collections.abc.Sequence[slangpy.SlangModule], type_conformances: collections.abc.Sequence[slangpy.TypeConformance] = []) slangpy.SlangModule¶
Compose multiple modules into a single composed module. The composed module provides a unified layout and entry point access across all source modules.
- 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.
- class slangpy.SlangSessionDesc¶
Descriptor for slang session initialization.
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property compiler_options: slangpy.SlangCompilerOptions¶
- 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 | None¶
Returns the surface config.
- configure(self, width: int, height: int, format: slangpy.Format = Format.undefined, usage: slangpy.TextureUsage = 0, desired_image_count: int = 3, vsync: bool = True) None¶
Configure the surface.
- configure(self, config: slangpy.SurfaceConfig) None
- unconfigure(self) None¶
Unconfigure the surface.
- 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.
- 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¶
- property descriptor_handle_ro: slangpy.DescriptorHandle¶
Get bindless texture descriptor handle for read access.
- property descriptor_handle_rw: slangpy.DescriptorHandle¶
Get bindless texture descriptor handle for read-write access.
- property descriptor_handle_combined: slangpy.DescriptorHandle¶
Get bindless combined texture/sampler descriptor handle.
Get the shared resource handle.
Note
Texture must be created with the
TextureUsage::sharedusage flag.
- 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, sampler: slangpy.Sampler | None = None, 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¶
- 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.DeviceChild- property texture: slangpy.Texture¶
- property desc: slangpy.TextureViewDesc¶
- property format: slangpy.Format¶
- property aspect: slangpy.TextureAspect¶
- property subresource_range: slangpy.SubresourceRange¶
- property descriptor_handle_ro: slangpy.DescriptorHandle¶
Get bindless texture descriptor handle for read access.
- property descriptor_handle_rw: slangpy.DescriptorHandle¶
Get bindless texture descriptor handle for read-write access.
- property descriptor_handle_combined: slangpy.DescriptorHandle¶
Get bindless combined texture/sampler descriptor handle.
- property native_handle: slangpy.NativeHandle¶
Get the native texture view handle.
- class slangpy.TextureViewDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property format: slangpy.Format¶
- property aspect: slangpy.TextureAspect¶
- property subresource_range: slangpy.SubresourceRange¶
- 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, arg: tuple, /) None
- property id: int¶
Unique id per type for an interface (optional).
- class slangpy.TypeLayoutReflection¶
Base class:
slangpy.BaseReflectionObject- property kind: slangpy.TypeReflection.Kind¶
- 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 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¶
- get_user_attribute_count(self) int¶
- get_user_attribute_by_index(self, index: int) slangpy.Attribute¶
- find_user_attribute_by_name(self, name: str) slangpy.Attribute¶
- unwrap_array(self) slangpy.TypeReflection¶
- class slangpy.TypeReflectionFieldList¶
TypeReflection lazy field list evaluation.
- class slangpy.VariableLayoutReflection¶
Base class:
slangpy.BaseReflectionObject- property variable: slangpy.VariableReflection¶
- property type_layout: slangpy.TypeLayoutReflection¶
- property offset: int¶
- class slangpy.VariableReflection¶
Base class:
slangpy.BaseReflectionObject- 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¶
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 mode: slangpy.WindowMode¶
Window mode.
- property surface_format: slangpy.Format¶
Format of the swapchain images.
- class slangpy.AppWindow¶
Base class:
slangpy.Object- __init__(self, app: slangpy.App, width: int = 1920, height: int = 1280, title: str = 'slangpy', 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¶
Math¶
- class slangpy.math.float1¶
- __init__(self) None¶
- __init__(self, scalar: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float2¶
- __init__(self) None¶
- __init__(self, scalar: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float3¶
- __init__(self) None¶
- __init__(self, scalar: 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 xy: slangpy.math.float2¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.float4¶
- __init__(self) None¶
- __init__(self, scalar: 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 xyz: slangpy.math.float3¶
- 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 xy: slangpy.math.int2¶
- 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 xyz: slangpy.math.int3¶
- 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 xy: slangpy.math.uint2¶
- 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 xyz: slangpy.math.uint3¶
- 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 shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool2¶
- __init__(self) None¶
- __init__(self, scalar: bool) None
- __init__(self, a: collections.abc.Sequence[bool]) None
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool3¶
- __init__(self) None¶
- __init__(self, scalar: 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 xy: slangpy.math.bool2¶
- property shape: tuple¶
- property element_type: object¶
- class slangpy.math.bool4¶
- __init__(self) None¶
- __init__(self, scalar: 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 xyz: slangpy.math.bool3¶
- 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 xy: slangpy.math.float16_t2¶
- 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 xyz: slangpy.math.float16_t3¶
- 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.float2x3¶
- __init__(self) None¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(2, 3)], /) None
- static zeros() slangpy.math.float2x3¶
- static identity() slangpy.math.float2x3¶
- 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.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, 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.float3x2¶
- __init__(self) None¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(3, 2)], /) None
- static zeros() slangpy.math.float3x2¶
- static identity() slangpy.math.float3x2¶
- 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.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, 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.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.float4x2¶
- __init__(self) None¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(4, 2)], /) None
- static zeros() slangpy.math.float4x2¶
- static identity() slangpy.math.float4x2¶
- 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.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, 2), writable=False]¶
- class slangpy.math.float4x3¶
- __init__(self) None¶
- __init__(self, arg: collections.abc.Sequence[float], /) None
- __init__(self, arg: ndarray[dtype=float32, shape=(4, 3)], /) None
- static zeros() slangpy.math.float4x3¶
- static identity() slangpy.math.float4x3¶
- 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.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, 3), 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.float2x3¶
Alias class:
slangpy.math.float2x3
- class slangpy.float2x4¶
Alias class:
slangpy.math.float2x4
- class slangpy.float3x2¶
Alias class:
slangpy.math.float3x2
- class slangpy.float3x3¶
Alias class:
slangpy.math.float3x3
- class slangpy.float3x4¶
Alias class:
slangpy.math.float3x4
- class slangpy.float4x2¶
Alias class:
slangpy.math.float4x2
- class slangpy.float4x3¶
Alias class:
slangpy.math.float4x3
- class slangpy.float4x4¶
Alias class:
slangpy.math.float4x4
- class slangpy.math.quatf¶
- __init__(self) None¶
- __init__(self, xyz: slangpy.math.float3, w: float) None
- __init__(self, a: collections.abc.Sequence[float]) None
- static identity() slangpy.math.quatf¶
- 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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.asfloat16(x: int) slangpy.math.float16_t¶
- 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.asuint16(x: slangpy.math.float16_t) int¶
- slangpy.math.select(condition: slangpy.math.bool1, true_value: slangpy.math.float1, false_value: slangpy.math.float1) slangpy.math.float1¶
- slangpy.math.select(condition: slangpy.math.bool2, true_value: slangpy.math.float2, false_value: slangpy.math.float2) slangpy.math.float2
- slangpy.math.select(condition: slangpy.math.bool3, true_value: slangpy.math.float3, false_value: slangpy.math.float3) slangpy.math.float3
- slangpy.math.select(condition: slangpy.math.bool4, true_value: slangpy.math.float4, false_value: slangpy.math.float4) slangpy.math.float4
- slangpy.math.select(condition: slangpy.math.bool1, true_value: slangpy.math.uint1, false_value: slangpy.math.uint1) slangpy.math.uint1
- slangpy.math.select(condition: slangpy.math.bool2, true_value: slangpy.math.uint2, false_value: slangpy.math.uint2) slangpy.math.uint2
- slangpy.math.select(condition: slangpy.math.bool3, true_value: slangpy.math.uint3, false_value: slangpy.math.uint3) slangpy.math.uint3
- slangpy.math.select(condition: slangpy.math.bool4, true_value: slangpy.math.uint4, false_value: slangpy.math.uint4) slangpy.math.uint4
- slangpy.math.select(condition: slangpy.math.bool1, true_value: slangpy.math.int1, false_value: slangpy.math.int1) slangpy.math.int1
- slangpy.math.select(condition: slangpy.math.bool2, true_value: slangpy.math.int2, false_value: slangpy.math.int2) slangpy.math.int2
- slangpy.math.select(condition: slangpy.math.bool3, true_value: slangpy.math.int3, false_value: slangpy.math.int3) slangpy.math.int3
- slangpy.math.select(condition: slangpy.math.bool4, true_value: slangpy.math.int4, false_value: slangpy.math.int4) slangpy.math.int4
- slangpy.math.select(condition: slangpy.math.bool1, true_value: slangpy.math.bool1, false_value: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.select(condition: slangpy.math.bool2, true_value: slangpy.math.bool2, false_value: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.select(condition: slangpy.math.bool3, true_value: slangpy.math.bool3, false_value: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.select(condition: slangpy.math.bool4, true_value: slangpy.math.bool4, false_value: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.eq(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.eq(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.eq(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.eq(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.eq(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.eq(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.eq(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.eq(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.eq(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.eq(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.eq(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.eq(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.eq(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.eq(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.eq(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.eq(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.eq(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.eq(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.eq(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.eq(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.eq(x: slangpy.math.quatf, y: slangpy.math.quatf) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.ne(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.ne(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.ne(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.ne(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.ne(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.ne(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.ne(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.ne(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.ne(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.ne(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.ne(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.ne(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.ne(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.ne(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.ne(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.ne(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.ne(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.ne(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.ne(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.ne(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.ne(x: slangpy.math.quatf, y: slangpy.math.quatf) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.lt(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.lt(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.lt(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.lt(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.lt(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.lt(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.lt(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.lt(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.lt(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.lt(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.lt(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.lt(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.lt(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.lt(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.lt(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.lt(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.lt(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.lt(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.lt(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.lt(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.lt(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.gt(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.gt(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.gt(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.gt(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.gt(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.gt(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.gt(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.gt(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.gt(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.gt(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.gt(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.gt(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.gt(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.gt(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.gt(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.gt(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.gt(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.gt(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.gt(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.gt(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.gt(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.le(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.le(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.le(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.le(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.le(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.le(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.le(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.le(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.le(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.le(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.le(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.le(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.le(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.le(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.le(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.le(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.le(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.le(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.le(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.le(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.le(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.float1, y: slangpy.math.float1) slangpy.math.bool1¶
- slangpy.math.ge(x: slangpy.math.float1, y: float) slangpy.math.bool1
- slangpy.math.ge(x: float, y: slangpy.math.float1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.float2, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.float2, y: float) slangpy.math.bool2
- slangpy.math.ge(x: float, y: slangpy.math.float2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.float3, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.float3, y: float) slangpy.math.bool3
- slangpy.math.ge(x: float, y: slangpy.math.float3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.float4, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.float4, y: float) slangpy.math.bool4
- slangpy.math.ge(x: float, y: slangpy.math.float4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.uint1, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.uint1, y: int) slangpy.math.bool1
- slangpy.math.ge(x: int, y: slangpy.math.uint1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.uint2, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.uint2, y: int) slangpy.math.bool2
- slangpy.math.ge(x: int, y: slangpy.math.uint2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.uint3, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.uint3, y: int) slangpy.math.bool3
- slangpy.math.ge(x: int, y: slangpy.math.uint3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.uint4, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.uint4, y: int) slangpy.math.bool4
- slangpy.math.ge(x: int, y: slangpy.math.uint4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.int1, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.int1, y: int) slangpy.math.bool1
- slangpy.math.ge(x: int, y: slangpy.math.int1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.int2, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.int2, y: int) slangpy.math.bool2
- slangpy.math.ge(x: int, y: slangpy.math.int2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.int3, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.int3, y: int) slangpy.math.bool3
- slangpy.math.ge(x: int, y: slangpy.math.int3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.int4, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.int4, y: int) slangpy.math.bool4
- slangpy.math.ge(x: int, y: slangpy.math.int4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.bool1, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.bool1, y: bool) slangpy.math.bool1
- slangpy.math.ge(x: bool, y: slangpy.math.bool1) slangpy.math.bool1
- slangpy.math.ge(x: slangpy.math.bool2, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.bool2, y: bool) slangpy.math.bool2
- slangpy.math.ge(x: bool, y: slangpy.math.bool2) slangpy.math.bool2
- slangpy.math.ge(x: slangpy.math.bool3, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.bool3, y: bool) slangpy.math.bool3
- slangpy.math.ge(x: bool, y: slangpy.math.bool3) slangpy.math.bool3
- slangpy.math.ge(x: slangpy.math.bool4, y: slangpy.math.bool4) slangpy.math.bool4
- slangpy.math.ge(x: slangpy.math.bool4, y: bool) slangpy.math.bool4
- slangpy.math.ge(x: bool, y: slangpy.math.bool4) slangpy.math.bool4
- 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.float2x3) slangpy.math.float3x2
- slangpy.math.transpose(x: slangpy.math.float2x4) slangpy.math.float4x2
- slangpy.math.transpose(x: slangpy.math.float3x2) slangpy.math.float2x3
- slangpy.math.transpose(x: slangpy.math.float3x3) slangpy.math.float3x3
- slangpy.math.transpose(x: slangpy.math.float3x4) slangpy.math.float4x3
- slangpy.math.transpose(x: slangpy.math.float4x2) slangpy.math.float2x4
- slangpy.math.transpose(x: slangpy.math.float4x3) slangpy.math.float3x4
- 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.float2) slangpy.math.float2¶
- slangpy.math.mul(x: slangpy.math.float2, y: slangpy.math.float2x2) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float2x2, y: slangpy.math.float2x2) slangpy.math.float2x2
- slangpy.math.mul(x: slangpy.math.float2x2, y: slangpy.math.float2x3) slangpy.math.float2x3
- slangpy.math.mul(x: slangpy.math.float2x2, y: slangpy.math.float2x4) slangpy.math.float2x4
- slangpy.math.mul(x: slangpy.math.float2x3, y: slangpy.math.float3) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float2, y: slangpy.math.float2x3) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float2x3, y: slangpy.math.float3x2) slangpy.math.float2x2
- slangpy.math.mul(x: slangpy.math.float2x3, y: slangpy.math.float3x3) slangpy.math.float2x3
- slangpy.math.mul(x: slangpy.math.float2x3, y: slangpy.math.float3x4) slangpy.math.float2x4
- 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.float2x4, y: slangpy.math.float4x2) slangpy.math.float2x2
- slangpy.math.mul(x: slangpy.math.float2x4, y: slangpy.math.float4x3) slangpy.math.float2x3
- slangpy.math.mul(x: slangpy.math.float2x4, y: slangpy.math.float4x4) slangpy.math.float2x4
- slangpy.math.mul(x: slangpy.math.float3x2, y: slangpy.math.float2) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float3, y: slangpy.math.float3x2) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float3x2, y: slangpy.math.float2x2) slangpy.math.float3x2
- slangpy.math.mul(x: slangpy.math.float3x2, y: slangpy.math.float2x3) slangpy.math.float3x3
- slangpy.math.mul(x: slangpy.math.float3x2, y: slangpy.math.float2x4) slangpy.math.float3x4
- 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.float3x3, y: slangpy.math.float3x2) slangpy.math.float3x2
- slangpy.math.mul(x: slangpy.math.float3x3, y: slangpy.math.float3x3) slangpy.math.float3x3
- slangpy.math.mul(x: slangpy.math.float3x3, y: slangpy.math.float3x4) slangpy.math.float3x4
- 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.float3x4, y: slangpy.math.float4x2) slangpy.math.float3x2
- slangpy.math.mul(x: slangpy.math.float3x4, y: slangpy.math.float4x3) slangpy.math.float3x3
- slangpy.math.mul(x: slangpy.math.float3x4, y: slangpy.math.float4x4) slangpy.math.float3x4
- slangpy.math.mul(x: slangpy.math.float4x2, y: slangpy.math.float2) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.float4, y: slangpy.math.float4x2) slangpy.math.float2
- slangpy.math.mul(x: slangpy.math.float4x2, y: slangpy.math.float2x2) slangpy.math.float4x2
- slangpy.math.mul(x: slangpy.math.float4x2, y: slangpy.math.float2x3) slangpy.math.float4x3
- slangpy.math.mul(x: slangpy.math.float4x2, y: slangpy.math.float2x4) slangpy.math.float4x4
- slangpy.math.mul(x: slangpy.math.float4x3, y: slangpy.math.float3) slangpy.math.float4
- slangpy.math.mul(x: slangpy.math.float4, y: slangpy.math.float4x3) slangpy.math.float3
- slangpy.math.mul(x: slangpy.math.float4x3, y: slangpy.math.float3x2) slangpy.math.float4x2
- slangpy.math.mul(x: slangpy.math.float4x3, y: slangpy.math.float3x3) slangpy.math.float4x3
- slangpy.math.mul(x: slangpy.math.float4x3, y: slangpy.math.float3x4) 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.float4x4, y: slangpy.math.float4x2) slangpy.math.float4x2
- slangpy.math.mul(x: slangpy.math.float4x4, y: slangpy.math.float4x3) slangpy.math.float4x3
- slangpy.math.mul(x: slangpy.math.float4x4, y: slangpy.math.float4x4) slangpy.math.float4x4
- 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.translate_2d(m: slangpy.math.float3x3, v: slangpy.math.float2) slangpy.math.float3x3¶
- slangpy.math.rotate(m: slangpy.math.float4x4, angle: float, axis: slangpy.math.float3) slangpy.math.float4x4¶
- slangpy.math.rotate_2d(m: slangpy.math.float3x3, angle: float) slangpy.math.float3x3¶
- slangpy.math.scale(m: slangpy.math.float4x4, v: slangpy.math.float3) slangpy.math.float4x4¶
- slangpy.math.scale_2d(m: slangpy.math.float3x3, v: slangpy.math.float2) slangpy.math.float3x3¶
- 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_translation_2d(v: slangpy.math.float2) slangpy.math.float3x3¶
- slangpy.math.matrix_from_scaling(v: slangpy.math.float3) slangpy.math.float4x4¶
- slangpy.math.matrix_from_scaling_2d(v: slangpy.math.float2) slangpy.math.float3x3¶
- slangpy.math.matrix_from_rotation(angle: float, axis: slangpy.math.float3) slangpy.math.float4x4¶
- slangpy.math.matrix_from_rotation_2d(angle: float) slangpy.math.float3x3¶
- 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.matrix_4x4_from_3x4(m: slangpy.math.float3x4) slangpy.math.float4x4¶
- slangpy.math.decompose_trs(model_matrix: slangpy.math.float4x4, scale: slangpy.math.float3, orientation: slangpy.math.quatf, translation: slangpy.math.float3) bool¶
- slangpy.math.decompose_trs(model_matrix: slangpy.math.float4x4, scale: slangpy.math.float3, orientation: slangpy.math.quatf, translation: slangpy.math.float3, rotation_matrix: slangpy.math.float3x3) bool
- slangpy.math.decompose(model_matrix: slangpy.math.float4x4, scale: slangpy.math.float3, orientation: slangpy.math.quatf, translation: slangpy.math.float3, skew: slangpy.math.float3, perspective: slangpy.math.float4) bool¶
- 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¶
- slangpy.ui.render_profiler_window(profiler: slangpy.Profiler | None = None) None¶
Render real-time frame-aligned profiler statistics from cached snapshots.
- Parameters:
profiler – Profiler to display, or nullptr to use the current profiler.
- class slangpy.ui.Context¶
Base class:
slangpy.Object- __init__(self, device: slangpy.Device) None¶
- begin_frame(self, width: int, height: int, window: slangpy.Window | None = None) None¶
Begin a new ImGui frame and renders the main screen widget. ImGui widget calls are generally only valid between begin_frame and end_frame.
- Parameters:
width – Render texture width
height – Render texture height
window – Window this UI context is rendered for (optional).
- end_frame(self, texture_view: slangpy.TextureView, command_encoder: slangpy.CommandEncoder) None¶
End the ImGui frame and renders the UI to the provided texture.
- Parameters:
texture_view – Texture view to render to
command_encoder – Command encoder to encode commands to
- end_frame(self, texture: slangpy.Texture, command_encoder: slangpy.CommandEncoder) None
End the ImGui frame and renders the UI to the provided texture.
- Parameters:
texture – Texture to render to
command_encoder – Command encoder to encode commands to
- render_draw_data(self, draw_data: object, texture_view: slangpy.TextureView, command_encoder: slangpy.CommandEncoder) None¶
- render_draw_data(self, draw_data: object, texture: slangpy.Texture, command_encoder: slangpy.CommandEncoder) None
- handle_keyboard_event(self, event: slangpy.KeyboardEvent) bool¶
Pass a keyboard event to the UI context.
- Parameters:
event – Keyboard event
- Returns:
Returns true if event was consumed.
- handle_mouse_event(self, event: slangpy.MouseEvent) bool¶
Pass a mouse event to the UI context.
- Parameters:
event – Mouse event
- Returns:
Returns true if event was consumed.
- property screen: slangpy.ui.Screen¶
The main screen widget.
- class slangpy.ui.Widget¶
Base class:
slangpy.ObjectBase class for Python UI widgets. Widgets own their children.
- property parent: slangpy.ui.Widget¶
- property children: list[slangpy.ui.Widget]¶
- 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.WidgetThis is the main widget that represents the screen. It is intended to be used as the parent for
Windowwidgets.
- 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 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¶
- class slangpy.ui.Text¶
Base class:
slangpy.ui.Widget- __init__(self, parent: slangpy.ui.Widget | None, text: str = '') None¶
- class slangpy.ui.ProgressBar¶
Base class:
slangpy.ui.Widget- __init__(self, parent: slangpy.ui.Widget | None, fraction: float = 0.0) None¶
- 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 callback: collections.abc.Callable[[], None]¶
- class slangpy.ui.ValuePropertyBool¶
Base class:
slangpy.ui.Widget
- class slangpy.ui.ValuePropertyInt¶
Base class:
slangpy.ui.Widget- property value: int¶
- property callback: collections.abc.Callable[[int], None]¶
- class slangpy.ui.ValuePropertyInt2¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.int2¶
- property callback: collections.abc.Callable[[slangpy.math.int2], None]¶
- class slangpy.ui.ValuePropertyInt3¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.int3¶
- property callback: collections.abc.Callable[[slangpy.math.int3], None]¶
- class slangpy.ui.ValuePropertyInt4¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.int4¶
- property callback: collections.abc.Callable[[slangpy.math.int4], None]¶
- class slangpy.ui.ValuePropertyFloat¶
Base class:
slangpy.ui.Widget
- class slangpy.ui.ValuePropertyFloat2¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.float2¶
- property callback: collections.abc.Callable[[slangpy.math.float2], None]¶
- class slangpy.ui.ValuePropertyFloat3¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.float3¶
- property callback: collections.abc.Callable[[slangpy.math.float3], None]¶
- class slangpy.ui.ValuePropertyFloat4¶
Base class:
slangpy.ui.Widget- property value: slangpy.math.float4¶
- property callback: collections.abc.Callable[[slangpy.math.float4], None]¶
- class slangpy.ui.ValuePropertyString¶
Base class:
slangpy.ui.Widget
- 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¶
- 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 height_in_items: int¶
- class slangpy.ui.SliderFlags¶
Base class:
enum.IntFlag- none: SliderFlags = 0¶
- always_clamp: SliderFlags = 1536¶
- 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 = 8¶
- chars_no_blank: InputTextFlags = 16¶
- auto_select_all: InputTextFlags = 4096¶
- enter_returns_true: InputTextFlags = 64¶
- callback_completion: InputTextFlags = 262144¶
- callback_history: InputTextFlags = 524288¶
- callback_always: InputTextFlags = 1048576¶
- callback_char_filter: InputTextFlags = 2097152¶
- allow_tab_input: InputTextFlags = 32¶
- ctrl_enter_for_new_line: InputTextFlags = 256¶
- no_horizontal_scroll: InputTextFlags = 32768¶
- always_overwrite: InputTextFlags = 2048¶
- read_only: InputTextFlags = 512¶
- password: InputTextFlags = 1024¶
- no_undo_redo: InputTextFlags = 65536¶
- chars_scientific: InputTextFlags = 4¶
- escape_clears_all: InputTextFlags = 128¶
- 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 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 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 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 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 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 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 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 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.ObjectUtility class for loading textures from bitmaps and image files.
- __init__(self, device: slangpy.Device, memory_budget: int = 34359738368) None¶
Create a texture loader.
- Parameters:
device – Device receiving the textures.
memory_budget – Positive, best-effort temporary CPU memory budget in bytes per bulk call. Defaults to 32 GiB. Estimates include decoding, conversion and upload storage. A single image exceeding the budget is loaded alone. Caller-owned bitmaps and final GPU textures are excluded.
- class Options¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property srgb_mode: slangpy.SRGBMode¶
Color interpretation after channel expansion. sRGB sampling is supported for 8-bit RGBA; other component types and preserved R/RG layouts retain their usual formats. DDS preserves its authored format in automatic mode; explicit modes select the corresponding sRGB or linear variant when one exists, otherwise leaving the format unchanged. Stored texels, alpha, and DDS mipmaps and layout are unchanged.
- property extend_alpha: bool¶
Extend RGB to RGBA if the RGB texture format cannot support the requested usage.
- property max_mip_count: int¶
Limit the full mip count implied by the texture dimensions; zero means unrestricted. For power-of-two textures, 13 allows up to 4096. Non- power-of-two dimensions use floor(log2(size)) + 1. DDS selects authored mips by their dimensions, or warns and uses the smallest mip if none fits. Other images are reduced before upload using successive box-filtered halvings.
- property usage: slangpy.TextureUsage¶
Resource usage flags for the texture. Render-target or unordered- access usage will be added automatically if
generate_mipsis true.
- property y_handling: slangpy.YHandling¶
Strategy for handling Y (greyscale) bitmaps, independent of sRGB interpretation. Expansion preserves component type and gamma encoding; explicit R/RG bitmaps are unchanged.
- property ya_handling: slangpy.YAHandling¶
Strategy for handling YA (greyscale + alpha) bitmaps.
- load_texture(self, bitmap: slangpy.Bitmap, options: slangpy.TextureLoader.Options | None = None) slangpy.Texture¶
Load a texture from a bitmap.
- Parameters:
bitmap – Bitmap to load.
options – Texture loading options.
- Returns:
New texture object.
- load_texture(self, path: str | os.PathLike, options: slangpy.TextureLoader.Options | None = None) slangpy.Texture
Load a texture from an image stream.
The stream must be readable and seekable. All image formats supported by the file-path overload, including DDS, are supported.
- Parameters:
stream – Image data stream.
options – Texture loading options.
- Returns:
New texture object.
- load_textures(self, bitmaps: collections.abc.Sequence[slangpy.Bitmap], options: slangpy.TextureLoader.Options | None = None) list[slangpy.Texture]¶
Load textures from a list of bitmaps.
- Parameters:
bitmaps – Bitmaps to load.
options – Texture loading options.
- Returns:
List of new of texture objects.
- load_textures(self, bitmaps: collections.abc.Sequence[slangpy.Bitmap], options: collections.abc.Sequence[slangpy.TextureLoader.Options]) list[slangpy.Texture]
Load textures from a list of bitmaps.
- Parameters:
bitmaps – Bitmaps to load.
options – Texture loading options.
- Returns:
List of new of texture objects.
- load_textures(self, paths: collections.abc.Sequence[str | os.PathLike], options: slangpy.TextureLoader.Options | None = None) list[slangpy.Texture]
Load textures from a list of image files.
- Parameters:
paths – Image file paths.
options – Texture loading options.
- Returns:
List of new texture objects.
- load_textures(self, paths: collections.abc.Sequence[str | os.PathLike], options: collections.abc.Sequence[slangpy.TextureLoader.Options]) list[slangpy.Texture]
Load textures from a list of image files.
- Parameters:
paths – Image file paths.
options – Texture loading options.
- Returns:
List of new texture objects.
- load_texture_array(self, bitmaps: collections.abc.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.
- Parameters:
bitmaps – Bitmaps to load.
options – Texture loading options.
- Returns:
New texture array object.
- load_texture_array(self, paths: collections.abc.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.
- Parameters:
paths – Image file paths.
options – Texture loading options.
- Returns:
New texture array object.
- 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.
- Parameters:
bitmap – Bitmap to show.
name – Name of the image in tev. If not specified, a unique name will be generated.
host – Host to connect to.
port – Port to connect to.
max_retries – Maximum number of retries.
- Returns:
True if successful.
- 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.
- Parameters:
texture – Texture to show.
name – Name of the image in tev. If not specified, a unique name will be generated.
host – Host to connect to.
port – Port to connect to.
max_retries – Maximum number of retries.
- Returns:
True if successful.
- 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.
- Parameters:
bitmap – Bitmap to show.
name – Name of the image in tev. If not specified, a unique name will be generated.
host – Host to connect to.
port – Port to connect to.
max_retries – Maximum number of retries.
- 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.
- Parameters:
bitmap – Texture to show.
name – Name of the image in tev. If not specified, a unique name will be generated.
host – Host to connect to.
port – Port to connect to.
max_retries – Maximum number of retries.
- 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().- Parameters:
device – The device to capture the frame for.
window – The window to capture the frame for (optional).
- Returns:
True if the frame capture was started successfully.
- 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¶
- class slangpy.slangpy.AccessType¶
Base class:
enum.Enum- none: AccessType = AccessType.none¶
- read: AccessType = AccessType.read¶
- write: AccessType = AccessType.write¶
- readwrite: AccessType = AccessType.readwrite¶
- class slangpy.slangpy.AutogradAccess¶
Base class:
enum.Enum- none: AutogradAccess = AutogradAccess.none¶
- read: AutogradAccess = AutogradAccess.read¶
- write: AutogradAccess = AutogradAccess.write¶
- readwrite: AutogradAccess = AutogradAccess.readwrite¶
- slangpy.slangpy.unpack_args(*args) tuple¶
N/A
- slangpy.slangpy.unpack_kwargs(**kwargs) tuple¶
N/A
- slangpy.slangpy.unpack_arg(arg: object) object¶
N/A
- slangpy.slangpy.pack_arg(arg: object, unpacked_arg: object) None¶
N/A
- class slangpy.slangpy.SignatureBuilder¶
Base class:
slangpy.Object- __init__(self) None¶
N/A
- class slangpy.slangpy.NativeObject¶
Base class:
slangpy.Object- __init__(self) None¶
N/A
- read_signature(self, builder: slangpy.slangpy.SignatureBuilder) None¶
N/A
- class slangpy.slangpy.NativeMarshall¶
Base class:
slangpy.Object- __init__(self) None¶
N/A
- property concrete_shape: slangpy.slangpy.Shape¶
N/A
- get_shape(self, value: object) slangpy.slangpy.Shape¶
N/A
- property slang_type: slangpy.native_refl.Type¶
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
- gen_calldata(self, cgb: object, context: object, binding: object) None¶
N/A
- reduce_type(self, context: object, dimensions: int) slangpy.native_refl.Type¶
N/A
- resolve_type(self, context: object, bound_type: slangpy.native_refl.Type) slangpy.native_refl.Type¶
N/A
- resolve_types(self, context: object, bound_type: slangpy.native_refl.Type) list[slangpy.native_refl.Type]¶
N/A
- resolve_dimensionality(self, context: object, binding: object, vector_target_type: slangpy.native_refl.Type) int¶
N/A
- build_shader_object(self, context: object, data: object) slangpy.ShaderObject¶
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.native_refl.Type¶
N/A
- property shape: slangpy.slangpy.Shape¶
N/A
- property children: dict[str, slangpy.slangpy.NativeBoundVariableRuntime] | None¶
N/A
- populate_call_shape(self, arg0: slangpy.slangpy.Shape, 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: object, 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 cuda_stream: slangpy.NativeHandle¶
N/A
- property thread_count: int¶
N/A
- class slangpy.slangpy.NativeCallData¶
Base class:
slangpy.Object- __init__(self) None¶
N/A
- property device: slangpy.Device¶
N/A
- property pipeline: slangpy.Pipeline¶
N/A
- property shader_table: slangpy.ShaderTable¶
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 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
- property call_group_shape: slangpy.slangpy.Shape¶
N/A
- property autograd_access_list: list[slangpy.slangpy.AutogradAccess]¶
N/A
- property bwds_call_data: slangpy.slangpy.NativeCallData¶
N/A
- autograd_forward(self, opts: slangpy.slangpy.NativeCallRuntimeOptions, args: list, kwargs: dict, pairs: list) tuple¶
N/A
- autograd_backward(self, function_node: object, pairs: list, args: list, kwargs: dict, saved_tensors: list, grad_outputs: tuple) tuple¶
N/A
- log(self, level: slangpy.LogLevel, msg: str, frequency: slangpy.LogFrequency = LogFrequency.always) None¶
Log a message without propagating exceptions. Output exceptions are suppressed so the remaining outputs are still attempted. Other internal exceptions invoke std::terminate. Output failures are not logged recursively. Once messages are recorded before delivery and are not retried if an output fails.
- Parameters:
level – The log level.
msg – The message.
frequency – The log frequency.
- 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
- class slangpy.slangpy.Shape¶
- __init__(self, shape: collections.abc.Sequence[int]) None¶
N/A
- __init__(self, *args) None
- as_tuple(self) tuple¶
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_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.FunctionNodeType¶
Base class:
enum.Enum- unknown: FunctionNodeType = FunctionNodeType.unknown¶
- uniforms: FunctionNodeType = FunctionNodeType.uniforms¶
- kernelgen: FunctionNodeType = FunctionNodeType.kernelgen¶
- this: FunctionNodeType = FunctionNodeType.this¶
- cuda_stream: FunctionNodeType = FunctionNodeType.cuda_stream¶
- ray_tracing: FunctionNodeType = FunctionNodeType.ray_tracing¶
- 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
- generate_bwds_call_data(self, fwds_call_data: slangpy.slangpy.NativeCallData, *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
- class slangpy.slangpy.NativePackedArg¶
Base class:
slangpy.slangpy.NativeObject- __init__(self, python: slangpy.slangpy.NativeMarshall, shader_object: slangpy.ShaderObject, python_object: object) None¶
N/A
- property python: slangpy.slangpy.NativeMarshall¶
N/A
- property shader_object: slangpy.ShaderObject¶
N/A
- property python_object: object¶
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.native_refl.Type, 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.native_refl.Type¶
- class slangpy.slangpy.NativeDescriptorMarshall¶
Base class:
slangpy.slangpy.NativeMarshall- __init__(self, slang_type: slangpy.native_refl.Type, type: slangpy.DescriptorHandleType) 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 type: slangpy.DescriptorHandleType¶
- property slang_type: slangpy.native_refl.Type¶
- class slangpy.slangpy.NativeTextureMarshall¶
Base class:
slangpy.slangpy.NativeMarshall- __init__(self, slang_type: slangpy.native_refl.Type, element_type: slangpy.native_refl.Type, 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.native_refl.Type¶
N/A
- class slangpy.slangpy.TensorMarshall¶
Base class:
slangpy.slangpy.NativeMarshall- __init__(self, dims: int, writable: bool, slang_type: slangpy.native_refl.Type, slang_element_type: slangpy.native_refl.Type, element_layout: slangpy.TypeLayoutReflection, d_in: slangpy.slangpy.TensorMarshall | None, d_out: slangpy.slangpy.TensorMarshall | None) None¶
N/A
- property dims: int¶
- property slang_element_type: slangpy.native_refl.Type¶
- property d_in: slangpy.slangpy.TensorMarshall¶
- property d_out: slangpy.slangpy.TensorMarshall¶
- class slangpy.slangpy.NativeNumpyMarshall¶
Base class:
slangpy.slangpy.TensorMarshall- __init__(self, dims: int, slang_type: slangpy.native_refl.Type, slang_element_type: slangpy.native_refl.Type, element_layout: slangpy.TypeLayoutReflection, numpydtype: object) None¶
N/A
- property dtype: dlpack::dtype¶
- class slangpy.slangpy.NativeTorchTensorMarshall¶
Base class:
slangpy.slangpy.NativeMarshall- __init__(self, dims: int, writable: bool, slang_type: slangpy.native_refl.Type, slang_element_type: slangpy.native_refl.Type, element_layout: slangpy.TypeLayoutReflection, d_in: slangpy.slangpy.NativeTorchTensorMarshall | None, d_out: slangpy.slangpy.NativeTorchTensorMarshall | None) None¶
- property dims: int¶
- property slang_element_type: slangpy.native_refl.Type¶
- property element_layout: slangpy.TypeLayoutReflection¶
- property d_in: slangpy.slangpy.NativeTorchTensorMarshall¶
- property d_out: slangpy.slangpy.NativeTorchTensorMarshall¶
- class slangpy.slangpy.NativeTorchTensorDiffPair¶
Base class:
slangpy.slangpy.NativeObject- __init__(self, primal: object | None, grad: object | None, index: int = -1, is_input: bool = True) None¶
Create a diff pair from primal and gradient tensors.
- Parameters:
primal – The primal (value) tensor. May be None for output gradients.
grad – The gradient tensor.
index – Index into saved tensors list for reconnecting in backward pass.
is_input – True if this is an input tensor, false for output.
- property primal: object¶
The primal (value) tensor.
- property grad: object¶
The gradient tensor.
- property index: int¶
Index into saved tensors list.
- clear_tensors(self) None¶
Clear tensor references (set both primal and grad to None).
- class slangpy.slangpy.NativeValueMarshall¶
Base class:
slangpy.slangpy.NativeMarshall- __init__(self) None¶
N/A
Miscellaneous¶
- class slangpy.FilterBoundaryCondition¶
Base class:
enum.EnumFilter boundary condition used for resampling images.
- clamp: FilterBoundaryCondition = FilterBoundaryCondition.clamp¶
- repeat: FilterBoundaryCondition = FilterBoundaryCondition.repeat¶
- mirror: FilterBoundaryCondition = FilterBoundaryCondition.mirror¶
- zero: FilterBoundaryCondition = FilterBoundaryCondition.zero¶
- one: FilterBoundaryCondition = FilterBoundaryCondition.one¶
- class slangpy.TentFilter¶
- class slangpy.GaussianFilter¶
- class slangpy.MitchellFilter¶
- class slangpy.DescriptorHandleType¶
Base class:
enum.IntEnum- undefined: DescriptorHandleType = DescriptorHandleType.undefined¶
- buffer: DescriptorHandleType = DescriptorHandleType.buffer¶
- rw_buffer: DescriptorHandleType = DescriptorHandleType.rw_buffer¶
- texture: DescriptorHandleType = DescriptorHandleType.texture¶
- rw_texture: DescriptorHandleType = DescriptorHandleType.rw_texture¶
- sampler: DescriptorHandleType = DescriptorHandleType.sampler¶
- combined_texture_sampler: DescriptorHandleType = DescriptorHandleType.combined_texture_sampler¶
- acceleration_structure: DescriptorHandleType = DescriptorHandleType.acceleration_structure¶
- class slangpy.CpuTimestampDomain¶
Base class:
enum.Enum- unknown: CpuTimestampDomain = CpuTimestampDomain.unknown¶
- query_performance_counter: CpuTimestampDomain = CpuTimestampDomain.query_performance_counter¶
- clock_monotonic: CpuTimestampDomain = CpuTimestampDomain.clock_monotonic¶
- clock_monotonic_raw: CpuTimestampDomain = CpuTimestampDomain.clock_monotonic_raw¶
- mach_absolute_time: CpuTimestampDomain = CpuTimestampDomain.mach_absolute_time¶
- class slangpy.TimestampCalibration¶
- __init__(self) None¶
- property cpu_domain: slangpy.CpuTimestampDomain¶
The domain of the CPU timestamp.
- property cpu_timestamp: int¶
The current CPU timestamp.
- property cpu_frequency: int¶
The frequency of the CPU timestamp in ticks per second.
- property gpu_timestamp: int¶
The current GPU timestamp.
- property gpu_frequency: int¶
The frequency of the GPU timestamp in ticks per second.
- property max_deviation_ns: int¶
The maximum deviation between the CPU and GPU timestamps in nanoseconds.
- class slangpy.PipelineCompilationPolicy¶
Base class:
enum.Enum- default: PipelineCompilationPolicy = PipelineCompilationPolicy.default¶
- immediate: PipelineCompilationPolicy = PipelineCompilationPolicy.immediate¶
- deferred: PipelineCompilationPolicy = PipelineCompilationPolicy.deferred¶
- class slangpy.Attribute¶
Base class:
slangpy.BaseReflectionObject- property argument_count: int¶
- argument_type(self, index: int) slangpy.TypeReflection¶
- argument_value_int(self, index: int) int¶
- class slangpy.SpecializationArgKind¶
Base class:
enum.Enum- unknown: SpecializationArgKind = SpecializationArgKind.unknown¶
- type: SpecializationArgKind = SpecializationArgKind.type¶
- expr: SpecializationArgKind = SpecializationArgKind.expr¶
- class slangpy.SpecializationArg¶
- __init__(self) None¶
- __init__(self, kind: slangpy.SpecializationArgKind, value: str) None
- static from_type(type_name: str) slangpy.SpecializationArg¶
- static from_expr(expr: str) slangpy.SpecializationArg¶
- property kind: slangpy.SpecializationArgKind¶
- class slangpy.MicromapType¶
Base class:
enum.Enum- opacity: MicromapType = MicromapType.opacity¶
- class slangpy.OpacityMicromapFormat¶
Base class:
enum.Enum- two_state: OpacityMicromapFormat = OpacityMicromapFormat.two_state¶
- four_state: OpacityMicromapFormat = OpacityMicromapFormat.four_state¶
- class slangpy.OpacityMicromapSpecialIndex¶
Base class:
enum.Enum- fully_transparent: OpacityMicromapSpecialIndex = OpacityMicromapSpecialIndex.fully_transparent¶
- fully_opaque: OpacityMicromapSpecialIndex = OpacityMicromapSpecialIndex.fully_opaque¶
- fully_unknown_transparent: OpacityMicromapSpecialIndex = OpacityMicromapSpecialIndex.fully_unknown_transparent¶
- fully_unknown_opaque: OpacityMicromapSpecialIndex = OpacityMicromapSpecialIndex.fully_unknown_opaque¶
- class slangpy.MicromapIndexingMode¶
Base class:
enum.Enum- linear: MicromapIndexingMode = MicromapIndexingMode.linear¶
- indexed: MicromapIndexingMode = MicromapIndexingMode.indexed¶
- class slangpy.MicromapIndexFormat¶
Base class:
enum.Enum- none: MicromapIndexFormat = MicromapIndexFormat.none¶
- uint16: MicromapIndexFormat = MicromapIndexFormat.uint16¶
- uint32: MicromapIndexFormat = MicromapIndexFormat.uint32¶
- class slangpy.MicromapBuildFlags¶
Base class:
enum.IntFlag- none: MicromapBuildFlags = 0¶
- prefer_fast_trace: MicromapBuildFlags = 1¶
- prefer_fast_build: MicromapBuildFlags = 2¶
- allow_compaction: MicromapBuildFlags = 4¶
- class slangpy.MicromapUsageCount¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property count: int¶
- property subdivision_level: int¶
- property format: slangpy.OpacityMicromapFormat¶
- class slangpy.MicromapBuildDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property type: slangpy.MicromapType¶
- property flags: slangpy.MicromapBuildFlags¶
- property data_buffer: slangpy.BufferOffsetPair¶
- property descriptor_buffer: slangpy.BufferOffsetPair¶
- property descriptor_stride: int¶
- property histogram: list[slangpy.MicromapUsageCount]¶
- class slangpy.MicromapDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property type: slangpy.MicromapType¶
- property size: int¶
- property flags: slangpy.MicromapBuildFlags¶
- class slangpy.Micromap¶
Base class:
slangpy.Resource- property desc: slangpy.MicromapDesc¶
- property device_address: int¶
- class slangpy.AccelerationStructureOpacityMicromapDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property micromap: slangpy.Micromap¶
- property indexing_mode: slangpy.MicromapIndexingMode¶
- property index_buffer: slangpy.BufferOffsetPair¶
- property index_format: slangpy.MicromapIndexFormat¶
- property index_stride: int¶
- property base_micromap_index: int¶
- property usage_counts: list[slangpy.MicromapUsageCount]¶
- class slangpy.AccelerationStructureBuildInputSpheres¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property vertex_count: int¶
- property vertex_position_buffers: list[slangpy.BufferOffsetPair]¶
- property vertex_position_format: slangpy.Format¶
- property vertex_position_stride: int¶
- property vertex_radius_buffers: list[slangpy.BufferOffsetPair]¶
- property vertex_radius_format: slangpy.Format¶
- property vertex_radius_stride: int¶
- property index_buffer: slangpy.BufferOffsetPair¶
- property index_format: slangpy.IndexFormat¶
- property index_count: int¶
- property flags: slangpy.AccelerationStructureGeometryFlags¶
- class slangpy.LinearSweptSpheresIndexingMode¶
Base class:
enum.Enum- list: LinearSweptSpheresIndexingMode = LinearSweptSpheresIndexingMode.list¶
- successive: LinearSweptSpheresIndexingMode = LinearSweptSpheresIndexingMode.successive¶
- class slangpy.LinearSweptSpheresEndCapsMode¶
Base class:
enum.Enum- none: LinearSweptSpheresEndCapsMode = LinearSweptSpheresEndCapsMode.none¶
- chained: LinearSweptSpheresEndCapsMode = LinearSweptSpheresEndCapsMode.chained¶
- class slangpy.AccelerationStructureBuildInputLinearSweptSpheres¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property vertex_count: int¶
- property primitive_count: int¶
- property vertex_position_buffers: list[slangpy.BufferOffsetPair]¶
- property vertex_position_format: slangpy.Format¶
- property vertex_position_stride: int¶
- property vertex_radius_buffers: list[slangpy.BufferOffsetPair]¶
- property vertex_radius_format: slangpy.Format¶
- property vertex_radius_stride: int¶
- property index_buffer: slangpy.BufferOffsetPair¶
- property index_format: slangpy.IndexFormat¶
- property index_count: int¶
- property indexing_mode: slangpy.LinearSweptSpheresIndexingMode¶
- property end_caps_mode: slangpy.LinearSweptSpheresEndCapsMode¶
- property flags: slangpy.AccelerationStructureGeometryFlags¶
- class slangpy.ClusterOperationType¶
Base class:
enum.Enum- move_objects: ClusterOperationType = ClusterOperationType.move_objects¶
- clas_from_triangles: ClusterOperationType = ClusterOperationType.clas_from_triangles¶
- blas_from_clas: ClusterOperationType = ClusterOperationType.blas_from_clas¶
- templates_from_triangles: ClusterOperationType = ClusterOperationType.templates_from_triangles¶
- clas_from_templates: ClusterOperationType = ClusterOperationType.clas_from_templates¶
- class slangpy.ClusterOperationMode¶
Base class:
enum.Enum- implicit_destinations: ClusterOperationMode = ClusterOperationMode.implicit_destinations¶
- explicit_destinations: ClusterOperationMode = ClusterOperationMode.explicit_destinations¶
- get_sizes: ClusterOperationMode = ClusterOperationMode.get_sizes¶
- class slangpy.ClusterOperationFlags¶
Base class:
enum.IntFlag- none: ClusterOperationFlags = 0¶
- fast_trace: ClusterOperationFlags = 1¶
- fast_build: ClusterOperationFlags = 2¶
- no_overlap: ClusterOperationFlags = 4¶
- allow_omm: ClusterOperationFlags = 8¶
- class slangpy.ClusterOperationMoveType¶
Base class:
enum.Enum- bottom_level: ClusterOperationMoveType = ClusterOperationMoveType.bottom_level¶
- cluster_level: ClusterOperationMoveType = ClusterOperationMoveType.cluster_level¶
- template: ClusterOperationMoveType = ClusterOperationMoveType.template¶
- class slangpy.ClusterOperationMoveParams¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property type: slangpy.ClusterOperationMoveType¶
- property max_size: int¶
- class slangpy.ClusterOperationClasBuildParams¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property vertex_format: slangpy.Format¶
- property max_geometry_index: int¶
- property max_unique_geometry_count: int¶
- property max_triangle_count: int¶
- property max_vertex_count: int¶
- property max_total_triangle_count: int¶
- property max_total_vertex_count: int¶
- property min_position_truncate_bit_count: int¶
- class slangpy.ClusterOperationBlasBuildParams¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property max_clas_count: int¶
- property max_total_clas_count: int¶
- class slangpy.ClusterOperationParams¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property max_arg_count: int¶
- property type: slangpy.ClusterOperationType¶
- property mode: slangpy.ClusterOperationMode¶
- property flags: slangpy.ClusterOperationFlags¶
- property move: slangpy.ClusterOperationMoveParams¶
- property clas: slangpy.ClusterOperationClasBuildParams¶
- property blas: slangpy.ClusterOperationBlasBuildParams¶
- class slangpy.ClusterOperationDesc¶
- __init__(self) None¶
- __init__(self, arg: dict, /) None
- property params: slangpy.ClusterOperationParams¶
- property arg_count_buffer: slangpy.BufferOffsetPair¶
- property args_buffer: slangpy.BufferOffsetPair¶
- property args_buffer_stride: int¶
- property scratch_buffer: slangpy.BufferOffsetPair¶
- property addresses_buffer: slangpy.BufferOffsetPair¶
- property addresses_buffer_stride: int¶
- property result_buffer: slangpy.BufferOffsetPair¶
- property sizes_buffer: slangpy.BufferOffsetPair¶
- property sizes_buffer_stride: int¶
- slangpy.CLUSTER_MAX_TRIANGLE_COUNT: int = 256¶
- slangpy.CLUSTER_MAX_VERTEX_COUNT: int = 256¶
- slangpy.CLUSTER_MAX_GEOMETRY_INDEX: int = 16777215¶
- slangpy.CLUSTER_DEFAULT_HANDLE_STRIDE: int = 8¶
- slangpy.CLUSTER_OUTPUT_ALIGNMENT: int = 128¶
- class slangpy.BindlessDesc¶
- __init__(self, buffer_count: int | None = None, texture_count: int | None = None, sampler_count: int | None = None, acceleration_structure_count: int | None = None) None¶
- property buffer_count: int¶
- property texture_count: int¶
- property sampler_count: int¶
- property acceleration_structure_count: int¶
- class slangpy.PipelineCompilationMode¶
Base class:
enum.Enum- serial: PipelineCompilationMode = PipelineCompilationMode.serial¶
- parallel: PipelineCompilationMode = PipelineCompilationMode.parallel¶
- class slangpy.HeapReport¶
Report information for a memory heap.
- property num_pages: int¶
Number of pages in the heap.
- property total_allocated: int¶
Total allocated memory in bytes.
- property total_mem_usage: int¶
Total memory usage in bytes.
- property num_allocations: int¶
Number of allocations.
- class slangpy.CudaContextScope¶
Context manager for temporarily switching CUDA contexts.
Do not instantiate directly; use device.cuda_context_scope() instead.
- class slangpy.CommandRecordingSubmittedEvent¶
Event data for command recording submission callback.
- property device: slangpy.Device¶
- property id: int¶
- property command_buffer: slangpy.CommandBuffer¶
- property submit_id: int¶
- class slangpy.CommandRecordingDiscardedEvent¶
Event data for command recording discarded callback.
- property device: slangpy.Device¶
- property id: int¶
- slangpy.get_cuda_current_context_native_handles() list[slangpy.NativeHandle]¶
Gets the device and context handles for the current CUDA context. Use to retrieve an existing context (eg from PyTorch) to pass as the existing_device_handles from which to create a device in the DeviceDesc.
- slangpy.push_current_device(device: slangpy.Device) None¶
Push a device onto the thread-local current device stack.
Stores a raw pointer in the thread-local stack. Device::close() only auto-pops if the device is on top of the stack; a closed device lower in the stack stays on the stack (it is still a valid object, as long as it is alive). The Device destructor removes any remaining entries for that device from the stack of the thread it is destroyed on, so a destroyed device is never returned by current_device() or pop_current_device(). A device destroyed on a different thread than the one that pushed it is not removed from the pushing thread’s stack; callers must pop it there before releasing the last reference.
- Parameters:
device – Device to push (must not be null).
- slangpy.pop_current_device() slangpy.Device¶
Pop the top device from the thread-local device stack. Throws if the stack is empty.
- Returns:
The popped device.
- slangpy.current_device() slangpy.Device¶
Get the current device from the top of the thread-local device stack. Throws if the stack is empty.
- Returns:
The current device.
- slangpy.create_surface(window: slangpy.Window) slangpy.Surface¶
Create a new surface.
- Parameters:
window – Window to create the surface for.
- Returns:
New surface object.
- slangpy.create_surface(window_handle: slangpy.WindowHandle) slangpy.Surface
Create a new surface.
- Parameters:
window_handle – Native window handle to create the surface for.
- Returns:
New surface object.
- slangpy.create_buffer(size: int = 0, element_count: int = 0, struct_size: int = 0, resource_type_layout: object | None = None, format: slangpy.Format = Format.undefined, memory_type: slangpy.MemoryType = MemoryType.device_local, usage: slangpy.BufferUsage = 0, default_state: slangpy.ResourceState = ResourceState.undefined, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Buffer¶
Create a new buffer.
- Parameters:
size – Buffer size in bytes.
element_count – Buffer size in number of struct elements. Can be used instead of
size.struct_size – Struct size in bytes.
resource_type_layout – Resource type layout of the buffer. Can be used instead of
struct_sizeto specify the size of the struct.format – Buffer format. Used when creating typed buffer views.
initial_state – Initial resource state.
usage – Resource usage flags.
memory_type – Memory type.
label – Debug label.
data – Initial data to upload to the buffer.
data_size – Size of the initial data in bytes.
- Returns:
New buffer object.
- slangpy.create_buffer(desc: slangpy.BufferDesc) slangpy.Buffer
- slangpy.create_texture(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, default_state: slangpy.ResourceState = ResourceState.undefined, sampler: slangpy.Sampler | None = None, label: str = '', data: numpy.ndarray[] | None = None) slangpy.Texture¶
Create a new texture.
- Parameters:
type – Texture type.
format – Texture format.
width – Width in pixels.
height – Height in pixels.
depth – Depth in pixels.
array_length – Array length.
mip_count – Mip level count. Number of mip levels (ALL_MIPS for all mip levels).
sample_count – Number of samples for multisampled textures.
quality – Quality level for multisampled textures.
usage – Resource usage.
memory_type – Memory type.
label – Debug label.
data – Initial data.
- Returns:
New texture object.
- slangpy.create_texture(desc: slangpy.TextureDesc) slangpy.Texture
- slangpy.create_sampler(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.
- Parameters:
min_filter – Minification filter.
mag_filter – Magnification filter.
mip_filter – Mip-map filter.
reduction_op – Reduction operation.
address_u – Texture addressing mode for the U coordinate.
address_v – Texture addressing mode for the V coordinate.
address_w – Texture addressing mode for the W coordinate.
mip_lod_bias – Mip-map LOD bias.
max_anisotropy – Maximum anisotropy.
comparison_func – Comparison function.
border_color – Border color.
min_lod – Minimum LOD level.
max_lod – Maximum LOD level.
label – Debug label.
- Returns:
New sampler object.
- slangpy.create_sampler(desc: slangpy.SamplerDesc) slangpy.Sampler
- slangpy.create_fence(initial_value: int = 0, shared: bool = False) slangpy.Fence¶
Create a new fence.
- Parameters:
initial_value – Initial fence value.
shared – Create a shared fence.
- Returns:
New fence object.
- slangpy.create_fence(desc: slangpy.FenceDesc) slangpy.Fence
- slangpy.create_query_pool(type: slangpy.QueryType, count: int) slangpy.QueryPool¶
Create a new query pool.
- Parameters:
type – Query type.
count – Number of queries in the pool.
- Returns:
New query pool object.
- slangpy.create_query_pool(desc: slangpy.QueryPoolDesc) slangpy.QueryPool
- slangpy.create_input_layout(input_elements: collections.abc.Sequence[slangpy.InputElementDesc], vertex_streams: collections.abc.Sequence[slangpy.VertexStreamDesc]) slangpy.InputLayout¶
Create a new input layout.
- Parameters:
input_elements – List of input elements (see InputElementDesc for details).
vertex_streams – List of vertex streams (see VertexStreamDesc for details).
- Returns:
New input layout object.
- slangpy.create_input_layout(desc: slangpy.InputLayoutDesc) slangpy.InputLayout
- slangpy.create_command_encoder(queue: slangpy.CommandQueueType = CommandQueueType.graphics) slangpy.CommandEncoder¶
Create a command encoder.
- slangpy.get_acceleration_structure_sizes(desc: slangpy.AccelerationStructureBuildDesc) slangpy.AccelerationStructureSizes¶
Query the device for buffer sizes required for acceleration structure builds.
- Parameters:
desc – Acceleration structure build description.
- Returns:
Acceleration structure sizes.
- slangpy.create_acceleration_structure(kind: slangpy.AccelerationStructureKind = AccelerationStructureKind.unknown, size: int = 0, label: str = '') slangpy.AccelerationStructure¶
Create a new acceleration structure.
- slangpy.create_acceleration_structure(desc: slangpy.AccelerationStructureDesc) slangpy.AccelerationStructure
- slangpy.create_acceleration_structure_instance_list(size: int) slangpy.AccelerationStructureInstanceList¶
Create a new acceleration structure instance list.
- slangpy.get_micromap_sizes(desc: slangpy.MicromapBuildDesc) slangpy.MicromapSizes¶
Query the current device for buffer sizes required for a micromap build.
- slangpy.create_micromap(type: slangpy.MicromapType = MicromapType.opacity, size: int = 0, flags: slangpy.MicromapBuildFlags = 0, label: str = '') slangpy.Micromap¶
Create a new micromap on the current device.
- slangpy.create_micromap(desc: slangpy.MicromapDesc) slangpy.Micromap
- slangpy.get_cluster_operation_sizes(params: slangpy.ClusterOperationParams) slangpy.ClusterOperationSizes¶
Query the current device for buffer sizes required for a cluster operation.
- slangpy.create_shader_table(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 a new shader table.
- slangpy.create_shader_table(desc: slangpy.ShaderTableDesc) slangpy.ShaderTable
- slangpy.get_coop_vec_matrix_size(rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType, row_col_stride: int = 0) int¶
Get the size of a cooperative vector matrix in bytes.
- slangpy.create_coop_vec_matrix_desc(rows: int, cols: int, layout: slangpy.CoopVecMatrixLayout, element_type: slangpy.DataType, offset: int = 0, row_col_stride: int = 0) slangpy.CoopVecMatrixDesc¶
Create a cooperative vector matrix descriptor.
- slangpy.convert_coop_vec_matrices(dst: bytearray, dst_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc], src: bytes, src_descs: collections.abc.Sequence[slangpy.CoopVecMatrixDesc]) None¶
Convert multiple cooperative vector matrices between formats.
- slangpy.convert_coop_vec_matrix(dst: bytearray, dst_desc: slangpy.CoopVecMatrixDesc, src: bytes, src_desc: slangpy.CoopVecMatrixDesc) None¶
Convert a single cooperative vector matrix between formats.
- slangpy.convert_coop_vec_matrix(dst: ndarray[device='cpu'], src: ndarray[device='cpu'], dst_layout: slangpy.CoopVecMatrixLayout | None = None, src_layout: slangpy.CoopVecMatrixLayout | None = None) None
- slangpy.create_slang_session(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.
- Parameters:
compiler_options – Compiler options (see SlangCompilerOptions for details).
- Returns:
New slang session object.
- slangpy.create_slang_session(desc: slangpy.SlangSessionDesc) slangpy.SlangSession
- slangpy.load_module(module_name: str) slangpy.SlangModule¶
Load a slang module by name.
- slangpy.load_module_from_source(module_name: str, source: str, path: str | os.PathLike | None = None) slangpy.SlangModule¶
Load a slang module from source code.
- slangpy.compose_modules(name: str, modules: collections.abc.Sequence[slangpy.SlangModule], type_conformances: collections.abc.Sequence[slangpy.TypeConformance] = []) slangpy.SlangModule¶
Compose multiple slang modules into one.
- slangpy.link_program(modules: collections.abc.Sequence[slangpy.SlangModule], entry_points: collections.abc.Sequence[slangpy.SlangEntryPoint], link_options: slangpy.SlangLinkOptions | None = None) slangpy.ShaderProgram¶
Link modules and entry points into a shader program.
- slangpy.load_program(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 module and link a shader program in one step.
- slangpy.create_root_shader_object(shader_program: slangpy.ShaderProgram) slangpy.ShaderObject¶
Create a root shader object for a shader program.
- slangpy.create_shader_object(type_layout: slangpy.TypeLayoutReflection) slangpy.ShaderObject¶
Create a shader object from a type layout. For a reflected parameter block, pass the field’s type layout, including the container, so the backend can select the block’s storage layout.
- slangpy.create_shader_object(cursor: slangpy.ReflectionCursor) slangpy.ShaderObject
Create a shader object from a reflection cursor.
- slangpy.create_compute_pipeline(program: slangpy.ShaderProgram, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.ComputePipeline¶
Create a compute pipeline.
- slangpy.create_compute_pipeline(desc: slangpy.ComputePipelineDesc) slangpy.ComputePipeline
- slangpy.create_render_pipeline(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, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.RenderPipeline¶
Create a render pipeline.
- slangpy.create_render_pipeline(desc: slangpy.RenderPipelineDesc) slangpy.RenderPipeline
- slangpy.create_ray_tracing_pipeline(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, compilation_policy: slangpy.PipelineCompilationPolicy = PipelineCompilationPolicy.default, label: str | None = None) slangpy.RayTracingPipeline¶
Create a ray tracing pipeline.
- slangpy.create_ray_tracing_pipeline(desc: slangpy.RayTracingPipelineDesc) slangpy.RayTracingPipeline
- slangpy.create_compute_kernel(program: slangpy.ShaderProgram) slangpy.ComputeKernel¶
Create a compute kernel.
- slangpy.create_compute_kernel(desc: slangpy.ComputeKernelDesc) slangpy.ComputeKernel
- slangpy.crashpad.start_handler(handler: str | os.PathLike = '', database: str | os.PathLike = '', annotations: collections.abc.Mapping[str, str] = {}) None¶
Starts the Crashpad handler.
Start the chromium Crashpad handler to capture crashes and generate crash reports.
- Parameters:
handler – Path to the handler executable. Defaults to <runtime_directory>/crashpad_handler{.exe} if empty.
database – Path to the database directory. Defaults to <runtime_directory>/crashpad_database if empty.
annotations – Annotations to include with crash reports.
- class slangpy.ProfilerTimelineType¶
Base class:
enum.EnumType of execution timeline stored in a profiler trace.
- cpu: ProfilerTimelineType = ProfilerTimelineType.cpu¶
- gpu: ProfilerTimelineType = ProfilerTimelineType.gpu¶
- class slangpy.ProfilerCaptureStopReason¶
Base class:
enum.EnumReason why a bounded profiler capture stopped recording.
- user: ProfilerCaptureStopReason = ProfilerCaptureStopReason.user¶
- memory_limit: ProfilerCaptureStopReason = ProfilerCaptureStopReason.memory_limit¶
- class slangpy.ProfilerFrameGpuStatus¶
Base class:
enum.EnumAvailability of one entry’s GPU duration in one retained frame.
- absent: ProfilerFrameGpuStatus = ProfilerFrameGpuStatus.absent¶
- complete: ProfilerFrameGpuStatus = ProfilerFrameGpuStatus.complete¶
- incomplete: ProfilerFrameGpuStatus = ProfilerFrameGpuStatus.incomplete¶
- class slangpy.ProfilerDesc¶
Configuration used to construct a Profiler.
- __init__(self, thread_event_capacity: int = 8192, live_frame_count: int = 120, live_event_capacity: int = 100000, frame_stats_window_size: int = 120, gpu_query_pool_size: int = 16384, enable_auto_zones: bool = True, enable_debug_groups: bool = False) None¶
- property thread_event_capacity: int¶
Maximum number of unread CPU events in each producer thread’s queue. Must be a positive power of two.
- property live_frame_count: int¶
Maximum number of completed frames retained in live trace snapshots.
- property live_event_capacity: int¶
Maximum number of CPU and GPU zones retained in live trace snapshots.
- property frame_stats_window_size: int¶
Maximum completed and ended GPU-pending frames retained in the global frame stream.
- property gpu_query_pool_size: int¶
Number of timestamp queries shared by GPU zones. Each GPU zone uses two queries; the count must be positive and even.
- class slangpy.ProfilerCaptureDesc¶
Configuration for a bounded profiler capture.
- __init__(self, max_memory_bytes: int = 268435456) None¶
- property max_memory_bytes: int¶
Maximum capture-owned zone and frame storage in bytes.
- class slangpy.ProfilerSite¶
Profiling-site metadata backed by process-lifetime interned strings. String views remain valid for the lifetime of the process.
- property id: int¶
One-based site identifier referenced by zones and frames.
- property line: int¶
One-based source line number, or zero when unavailable.
- class slangpy.ProfilerTimeline¶
Metadata for one CPU thread or GPU queue timeline.
- property type: slangpy.ProfilerTimelineType¶
Execution domain represented by the timeline.
- property thread_id: int¶
Platform thread identifier for CPU timelines, otherwise zero.
- property device_id: int¶
Device identity for GPU timelines, otherwise zero.
- property queue: slangpy.CommandQueueType¶
Command queue type for GPU timelines.
- class slangpy.ProfilerFrame¶
Completed frame boundary stored in a profiler trace.
- property index: int¶
Monotonically increasing profiler-wide frame index.
- property site_id: int¶
Profiling site that names this frame.
- property timeline_id: int¶
CPU timeline on which the frame was recorded.
- property start_ns: int¶
Frame start time in profiler-clock nanoseconds.
- property duration_ns: int¶
Frame duration in nanoseconds.
- class slangpy.ProfilerDurationStatistics¶
Distribution of duration samples in milliseconds.
- property count: int¶
Number of samples.
- class slangpy.ProfilerCallStatistics¶
Mergeable duration summary that does not retain individual call samples.
- property count: int¶
Number of calls.
- class slangpy.ProfilerDiagnostics¶
Diagnostic counters shared by immutable profiler snapshots.
- property producer_drop_count: int¶
Number of producer events dropped because a per-thread event queue or zone stack was full.
- property thread_event_queue_high_water_mark: int¶
Maximum number of unread events observed in any per-thread producer queue.
- property hierarchy_loss_count: int¶
Number of statistics nodes promoted to roots because their parent event was unavailable.
- property gpu_query_exhaustion_count: int¶
Number of GPU zones recorded without GPU timing because no timestamp- query pair was available.
- property pending_gpu_zone_count: int¶
Number of allocated GPU zones still awaiting submission or timestamp resolution.
- class slangpy.ProfilerFrameStatsEntry¶
Frame-aligned statistics for one hierarchical CPU zone path.
CPU time per frame is the sum of inclusive occurrences at this path. Parent and child entries are therefore not additive. GPU time is the sum of directly measured occurrences and can exceed elapsed frame time when work overlaps.
- property parent_index: int¶
Index of the parent entry in the same frame statistics list, or -1 for a root.
- property site_id: int¶
Profiling site represented by this hierarchical path.
- property cpu_time_per_frame: slangpy.ProfilerDurationStatistics¶
Distribution of summed CPU duration per retained frame.
- property gpu_time_per_frame: slangpy.ProfilerDurationStatistics¶
Distribution of summed GPU duration for frames with complete GPU measurements.
- property cpu_time_per_call: slangpy.ProfilerCallStatistics¶
Mergeable statistics over individual CPU occurrences.
- property gpu_time_per_call: slangpy.ProfilerCallStatistics¶
Mergeable statistics over individual resolved GPU occurrences.
- class slangpy.ProfilerFrameStats¶
Base class:
slangpy.ObjectImmutable snapshot of rolling statistics for the profiler’s global frame stream.
Sample matrices are row-major with shape (sample_count(), entry_count()). All columns are ordered oldest to newest.
- property sample_count: int¶
Number of retained completed frames.
- property entry_count: int¶
Number of hierarchical entries.
- property pending_frame_count: int¶
Total ended frames still waiting for GPU measurements.
- property frame_time: slangpy.ProfilerDurationStatistics¶
Distribution of completed frame durations.
- property entries: list[slangpy.ProfilerFrameStatsEntry]¶
Hierarchical CPU-zone paths in deterministic parent-before-child preorder.
- property sample_frame_index: numpy.ndarray[dtype=uint32, writable=False]¶
Profiler-wide frame index for each retained sample.
- property sample_frame_time_ms: numpy.ndarray[dtype=float64, writable=False]¶
Completed frame duration in milliseconds for each retained sample.
- property sample_call_count: numpy.ndarray[dtype=uint32, writable=False]¶
Row-major occurrence-count matrix with shape (sample_count(), entry_count()).
- property sample_cpu_time_ms: numpy.ndarray[dtype=float64, writable=False]¶
Row-major CPU-duration matrix with shape (sample_count(), entry_count()).
- property sample_gpu_time_ms: numpy.ndarray[dtype=float64, writable=False]¶
Row-major GPU-duration matrix with shape (sample_count(), entry_count()).
- property sample_gpu_status: numpy.ndarray[dtype=uint8, writable=False]¶
Row-major GPU-status matrix with shape (sample_count(), entry_count()).
- property diagnostics: slangpy.ProfilerDiagnostics¶
Diagnostic counters captured with this snapshot.
- class slangpy.ProfilerZoneChunk¶
Base class:
slangpy.ObjectImmutable structure-of-arrays storage for at most 4096 zones.
Bounded chunks let trace queries and exports process large captures without flattening all zones into one allocation. The Python bindings expose each column as a zero-copy, read-only NumPy array whose lifetime is tied to the chunk.
- property count: int¶
Number of zones in this chunk.
- property start_ns: numpy.ndarray[dtype=uint64, writable=False]¶
Zone start times in profiler-clock nanoseconds.
- property duration_ns: numpy.ndarray[dtype=uint64, writable=False]¶
Zone durations in nanoseconds.
- property correlation_id: numpy.ndarray[dtype=uint64, writable=False]¶
CPU/GPU correlation identifiers.
- property timeline_id: numpy.ndarray[dtype=uint32, writable=False]¶
Indices into ProfilerTrace::timelines().
- property site_id: numpy.ndarray[dtype=uint32, writable=False]¶
One-based identifiers into ProfilerTrace::sites().
- property parent_index: numpy.ndarray[dtype=int32, writable=False]¶
Global zone indices of parents on the same timeline, or -1 for roots.
- property frame_index: numpy.ndarray[dtype=uint32, writable=False]¶
Profiler-wide frame indices, or UINT32_MAX for zones outside a frame.
- class slangpy.ProfilerZoneSelection¶
Base class:
slangpy.ObjectImmutable set of global zone indices selected from one ProfilerTrace.
- property count: int¶
Number of selected zones.
- property indices: numpy.ndarray[dtype=uint32, writable=False]¶
Sorted global zone indices into the source trace.
- statistics(self) slangpy.ProfilerDurationStatistics¶
Calculate duration statistics for the selected zones.
- class slangpy.ProfilerTrace¶
Base class:
slangpy.ObjectImmutable profiler trace containing metadata, frame boundaries, and chunked CPU/GPU zones.
- property start_ns: int¶
Capture or live-history start time in profiler-clock nanoseconds.
- property stop_ns: int¶
Capture or live-history stop time in profiler-clock nanoseconds.
- property stop_reason: slangpy.ProfilerCaptureStopReason¶
Reason why capture recording stopped.
- property memory_bytes: int¶
Capture-owned zone and frame storage in bytes.
- property diagnostics: slangpy.ProfilerDiagnostics¶
Diagnostic counters captured with this snapshot.
- property sites: list[slangpy.ProfilerSite]¶
Process-global profiling sites visible when the snapshot was built.
- property timelines: list[slangpy.ProfilerTimeline]¶
CPU and GPU timelines referenced by this trace.
- property frames: list[slangpy.ProfilerFrame]¶
Completed frame boundaries retained by this trace.
- property zone_chunks: list[slangpy.ProfilerZoneChunk]¶
Immutable structure-of-arrays zone chunks.
- property zone_count: int¶
Total number of zones across all chunks.
- query_zones(self, name: str | None = None, timeline_type: slangpy.ProfilerTimelineType | None = None, frame_begin: int | None = None, frame_end: int | None = None, start_ns: int | None = None, end_ns: int | None = None) slangpy.ProfilerZoneSelection¶
Select zones using exact-name, timeline, frame, and timestamp filters. Frame and timestamp ranges are half-open. Zones overlap the requested timestamp range rather than requiring their complete duration to be contained in it. Zones outside frames are excluded whenever a frame bound is set.
- write_to_json(self, path: str | os.PathLike) None¶
Stream this trace as Chrome trace-event JSON suitable for Perfetto.
- class slangpy.ProfilerZoneScope¶
N/A
- class slangpy.ProfilerFrameScope¶
N/A
- class slangpy.Profiler¶
Base class:
slangpy.ObjectBounded CPU/GPU instrumentation profiler with immutable trace and frame-statistics snapshots.
- __init__(self, desc: slangpy.ProfilerDesc = <slangpy.ProfilerDesc object at 0x00000206332F8870>) None¶
- property enable_debug_groups: bool¶
Whether command-encoder profiling zones also emit backend debug groups.
- property capture_active: bool¶
Whether a bounded capture is currently recording. A capture stopped by its memory limit is ready but inactive.
- property desc: slangpy.ProfilerDesc¶
Constructor configuration. Python exposes this as a copy because changing it does not reconfigure the profiler.
- start_capture(self, desc: slangpy.ProfilerCaptureDesc = <slangpy.ProfilerCaptureDesc object at 0x00000206332E91B0>) None¶
Start a bounded capture after flushing events completed before this call.
- stop_capture(self) slangpy.ProfilerTrace¶
Stop and return the current or memory-limited capture.
This performs one tick and flushes completed CPU producer events. It does not deliberately wait for submitted GPU work or unresolved timestamp queries, but a backend timestamp-calibration refresh performed by tick() may synchronize queued GPU work. Call Device::wait(), then tick(), before stopping when complete GPU data is required.
- discard_capture(self) None¶
Discard the active or completed capture without producing a trace.
- live_snapshot(self) slangpy.ProfilerTrace¶
Return the most recently published immutable live trace and request periodic live-trace publication.
- frame_stats_snapshot(self) slangpy.ProfilerFrameStats¶
Return the most recently published immutable frame statistics and request periodic statistics publication.
- clear_frame_stats(self) None¶
Clear completed and pending frame statistics after flushing current producer events.
- tick(self) None¶
Poll submitted GPU timestamp queries and queue resolved measurements for the collector.
The poll does not deliberately wait for profiled submissions or unresolved queries. On CUDA, refreshing timestamp calibration synchronizes queued GPU work.
- flush(self) None¶
Block until a collector pass started for this request consumes inputs whose publication happens-before the request and publishes both snapshot products. Concurrent publications may be included or deferred. Active zones, unsealed frames, and unresolved GPU queries are not published inputs and are not awaited.
- slangpy.current_profiler() slangpy.Profiler¶
Return the current thread’s profiler or throw if none is active.
- slangpy.current_profiler_or_null() Profiler | None¶
Return the current thread’s profiler, or nullptr if none is active.
- slangpy.profile_zone(name: str, command_encoder: slangpy.CommandEncoder | None = None) slangpy.ProfilerZoneScope¶
Profile a named CPU zone and optional command-encoder GPU zone using the current profiler.
- slangpy.profile_function(command_encoder: slangpy.CommandEncoder | None = None) slangpy.ProfilerZoneScope¶
Profile the calling Python function and optional command-encoder GPU work using the current profiler.
- slangpy.profile_frame(name: str = 'frame') slangpy.ProfilerFrameScope¶
Record a named frame boundary using the current profiler.
- slangpy.native_refl.get_builtin_layout(device: slangpy.Device) slangpy.native_refl.Layout¶
N/A
- slangpy.native_refl.name_for_scalar_type(scalar_type: slangpy.TypeReflection.ScalarType) str¶
N/A
- slangpy.native_refl.resolve_layout(device: slangpy.Device, element_type: object | None = None, layout: object | None = None) slangpy.native_refl.Layout¶
N/A
- slangpy.native_refl.resolve_element_type(layout: slangpy.native_refl.Layout, element_type: object) slangpy.native_refl.Type¶
N/A
- class slangpy.native_refl.TypeLayout¶
Base class:
slangpy.ObjectN/A
- property reflection: slangpy.TypeLayoutReflection¶
N/A
- property size: int¶
N/A
- property alignment: int¶
N/A
- property stride: int¶
N/A
- class slangpy.native_refl.Type¶
Base class:
slangpy.ObjectN/A
- property layout: slangpy.native_refl.Layout¶
N/A
- property program: slangpy.native_refl.Layout¶
N/A
- property type_reflection: slangpy.TypeReflection¶
N/A
- property element_type: slangpy.native_refl.Type¶
N/A
- property shape: slangpy.slangpy.Shape¶
N/A
- property num_dims: int¶
N/A
- property uniform_layout: slangpy.native_refl.TypeLayout¶
N/A
- property buffer_layout: slangpy.native_refl.TypeLayout¶
N/A
- property derivative: slangpy.native_refl.Type¶
N/A
- property fields: dict¶
N/A
- class slangpy.native_refl.UnknownType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.VoidType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.PointerType¶
Base class:
slangpy.native_refl.TypeN/A
- property target_type: slangpy.native_refl.Type¶
N/A
- property slang_scalar_type: slangpy.TypeReflection.ScalarType¶
N/A
- class slangpy.native_refl.ScalarType¶
Base class:
slangpy.native_refl.TypeN/A
- property slang_scalar_type: slangpy.TypeReflection.ScalarType¶
N/A
- class slangpy.native_refl.VectorType¶
Base class:
slangpy.native_refl.TypeN/A
- property num_elements: int¶
N/A
- property scalar_type: slangpy.native_refl.ScalarType¶
N/A
- property slang_scalar_type: slangpy.TypeReflection.ScalarType¶
N/A
- class slangpy.native_refl.MatrixType¶
Base class:
slangpy.native_refl.TypeN/A
- property rows: int¶
N/A
- property cols: int¶
N/A
- property scalar_type: slangpy.native_refl.ScalarType¶
N/A
- property slang_scalar_type: slangpy.TypeReflection.ScalarType¶
N/A
- property inner_element_type: slangpy.native_refl.Type¶
N/A
- class slangpy.native_refl.ArrayType¶
Base class:
slangpy.native_refl.TypeN/A
- property num_elements: int¶
N/A
- property array_shape: slangpy.slangpy.Shape¶
N/A
- property inner_element_type: slangpy.native_refl.Type¶
N/A
- property array_dims: int¶
N/A
- class slangpy.native_refl.StructType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.InterfaceType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.ResourceType¶
Base class:
slangpy.native_refl.TypeN/A
- property resource_shape: slangpy.TypeReflection.ResourceShape¶
N/A
- property resource_access: slangpy.TypeReflection.ResourceAccess¶
N/A
- class slangpy.native_refl.TextureType¶
Base class:
slangpy.native_refl.ResourceTypeN/A
- property texture_dims: int¶
N/A
- property usage: slangpy.TextureUsage¶
N/A
- class slangpy.native_refl.StructuredBufferType¶
Base class:
slangpy.native_refl.ResourceTypeN/A
- class slangpy.native_refl.ByteAddressBufferType¶
Base class:
slangpy.native_refl.ResourceTypeN/A
- class slangpy.native_refl.DifferentialPairType¶
Base class:
slangpy.native_refl.TypeN/A
- property primal: slangpy.native_refl.Type¶
N/A
- class slangpy.native_refl.RaytracingAccelerationStructureType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.SamplerStateType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.TensorType¶
Base class:
slangpy.native_refl.TypeN/A
- property tensor_kind: slangpy.native_refl.TensorType.Kind¶
N/A
- property tensor_type: slangpy.native_refl.TensorType.Kind¶
N/A
- property access: slangpy.native_refl.TensorType.Access¶
N/A
- property dims: int¶
N/A
- property dtype: slangpy.native_refl.Type¶
N/A
- static build_tensor_name(element_type: slangpy.native_refl.Type, dims: int, access: slangpy.native_refl.TensorType.Access = Access.read_write, tensor_kind: slangpy.native_refl.TensorType.Kind = Kind.tensor) str¶
N/A
- class slangpy.native_refl.TensorViewType¶
Base class:
slangpy.native_refl.TypeN/A
- property dtype: slangpy.native_refl.Type¶
N/A
- static build_tensorview_name(element_type: slangpy.native_refl.Type) str¶
N/A
- class slangpy.native_refl.DiffTensorViewType¶
Base class:
slangpy.native_refl.TypeN/A
- property dtype: slangpy.native_refl.Type¶
N/A
- property wrapper_type: slangpy.native_refl.Type¶
N/A
- static build_difftensorview_name(element_type: slangpy.native_refl.Type) str¶
N/A
- class slangpy.native_refl.UnhandledType¶
Base class:
slangpy.native_refl.TypeN/A
- class slangpy.native_refl.Variable¶
Base class:
slangpy.ObjectN/A
- property layout: slangpy.native_refl.Layout¶
N/A
- property program: slangpy.native_refl.Layout¶
N/A
- property reflection: slangpy.VariableReflection¶
N/A
- property type: slangpy.native_refl.Type¶
N/A
- property modifiers: list[slangpy.ModifierID]¶
N/A
- property io_type: slangpy.native_refl.IOType¶
N/A
- property derivative: slangpy.native_refl.Type¶
N/A
- has_modifier(self, modifier: slangpy.ModifierID) bool¶
N/A
- class slangpy.native_refl.Field¶
Base class:
slangpy.native_refl.VariableN/A
- class slangpy.native_refl.Parameter¶
Base class:
slangpy.native_refl.VariableN/A
- property index: int¶
N/A
- class slangpy.native_refl.Function¶
Base class:
slangpy.ObjectN/A
- property layout: slangpy.native_refl.Layout¶
N/A
- property program: slangpy.native_refl.Layout¶
N/A
- property reflection: slangpy.FunctionReflection¶
N/A
- property this_type: slangpy.native_refl.Type¶
N/A
- property this: slangpy.native_refl.Type¶
N/A
- property return_type: slangpy.native_refl.Type¶
N/A
- property parameters: list[slangpy.native_refl.Parameter]¶
N/A
- property overloads: list[slangpy.native_refl.Function]¶
N/A
- specialize_with_arg_types(self, types: collections.abc.Sequence[slangpy.native_refl.Type]) slangpy.native_refl.Function¶
N/A
- class slangpy.native_refl.Layout¶
Base class:
slangpy.ObjectN/A
- __init__(self, low_level_layout: object) None¶
N/A
- property generation: int¶
N/A
- property low_level_layout: slangpy.ProgramLayout¶
N/A
- property program_layout: slangpy.ProgramLayout¶
N/A
- find_type(self, type_reflection: object) slangpy.native_refl.Type¶
N/A
- find_type_by_name(self, name: str) slangpy.native_refl.Type¶
N/A
- require_type_by_name(self, name: str) slangpy.native_refl.Type¶
N/A
- find_function(self, function_reflection: object, this_type: object | None = None) slangpy.native_refl.Function¶
N/A
- find_function_by_name(self, name: str) slangpy.native_refl.Function¶
N/A
- require_function_by_name(self, name: str) slangpy.native_refl.Function¶
N/A
- find_function_by_name_in_type(self, type: slangpy.native_refl.Type, name: str) slangpy.native_refl.Function¶
N/A
- require_function_by_name_in_type(self, type: slangpy.native_refl.Type, name: str) slangpy.native_refl.Function¶
N/A
- scalar_type(self, scalar_type: slangpy.TypeReflection.ScalarType) slangpy.native_refl.Type¶
N/A
- vector_type(self, scalar_type: slangpy.TypeReflection.ScalarType, size: int) slangpy.native_refl.VectorType¶
N/A
- matrix_type(self, scalar_type: slangpy.TypeReflection.ScalarType, rows: int, cols: int) slangpy.native_refl.MatrixType¶
N/A
- array_type(self, element_type: slangpy.native_refl.Type, count: int) slangpy.native_refl.ArrayType¶
N/A
- tensor_type(self, element_type: slangpy.native_refl.Type, dims: int, access: slangpy.native_refl.TensorType.Access = Access.read_write, tensor_kind: slangpy.native_refl.TensorType.Kind = Kind.tensor) slangpy.native_refl.TensorType¶
N/A
- tensorview_type(self, element_type: slangpy.native_refl.Type) slangpy.native_refl.TensorViewType¶
N/A
- difftensorview_type(self, element_type: slangpy.native_refl.Type) slangpy.native_refl.DiffTensorViewType¶
N/A
- get_resolved_generic_args(self, type_reflection: object) object¶
N/A
- on_hot_reload(self, low_level_layout: object) None¶
N/A
- class slangpy.native_func.BaseModule¶
Base class:
slangpy.ObjectN/A
- __init__(self, module: object, layout: object) None¶
N/A
- on_hot_reload(self, module: object, low_level_layout: object) None¶
N/A
- property device_module: slangpy.SlangModule¶
N/A
- property layout: slangpy.native_refl.Layout¶
N/A
- property session: slangpy.SlangSession¶
N/A
- property device: slangpy.Device¶
N/A
- class slangpy.native_func.BaseStruct¶
Base class:
slangpy.ObjectN/A
- __init__(self, module: object, type: object) None¶
N/A
- on_hot_reload(self, type: object) None¶
N/A
- property module: slangpy.native_func.BaseModule¶
N/A
- property layout: slangpy.native_refl.Layout¶
N/A
- property program: slangpy.native_refl.Layout¶
N/A
- property type: slangpy.native_refl.Type¶
N/A
- property struct: slangpy.native_refl.Type¶
N/A
- property type_reflection: slangpy.TypeReflection¶
N/A
- property shape: slangpy.slangpy.Shape¶
N/A
- class slangpy.native_func.TensorDesc¶
- __init__(self) None¶
- property dtype: slangpy.native_refl.Type¶
- 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.native_func.Tensor¶
Base class:
slangpy.Object- __init__(self, storage: slangpy.Buffer, dtype: slangpy.native_refl.Type, shape: slangpy.slangpy.Shape, strides: slangpy.slangpy.Shape = [invalid], offset: int = 0, grad_in: slangpy.native_func.Tensor | None = None, grad_out: slangpy.native_func.Tensor | None = None) None¶
- __init__(self, desc: slangpy.native_func.TensorDesc, storage: slangpy.Buffer, grad_in: slangpy.native_func.Tensor | None = None, grad_out: slangpy.native_func.Tensor | None = None) None
- property device: slangpy.Device¶
- property dtype: slangpy.native_refl.Type¶
- 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¶
- property grad_in: slangpy.native_func.Tensor¶
- property grad_out: slangpy.native_func.Tensor¶
- property grad: slangpy.native_func.Tensor¶
- 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[]¶
- to_torch(self) torch.Tensor[]¶
- copy_from_numpy(self, data: numpy.ndarray[]) None¶
- copy_from_torch(self, tensor: object) None¶
- point_to(self, target: slangpy.native_func.Tensor) None¶
- broadcast_to(self, shape: slangpy.slangpy.Shape) slangpy.native_func.Tensor¶
- view(self, shape: slangpy.slangpy.Shape, strides: slangpy.slangpy.Shape = [invalid], offset: int = 0) slangpy.native_func.Tensor¶
- with_grads(self, grad_in: slangpy.native_func.Tensor | None = None, grad_out: slangpy.native_func.Tensor | None = None, zero: bool = True) slangpy.native_func.Tensor¶
- detach(self) slangpy.native_func.Tensor¶
- static numpy(device: slangpy.Device, ndarray: object) slangpy.native_func.Tensor¶
- static from_numpy(device: slangpy.Device, ndarray: object, usage: slangpy.BufferUsage = 24, memory_type: slangpy.MemoryType = MemoryType.device_local, program_layout: slangpy.native_refl.Layout | None = None, target_slang_dtype: object | None = None) slangpy.native_func.Tensor¶
- static empty(device: slangpy.Device, shape: slangpy.slangpy.Shape, dtype: object | None = None, usage: slangpy.BufferUsage = 24, memory_type: slangpy.MemoryType = MemoryType.device_local, program_layout: slangpy.native_refl.Layout | None = None) slangpy.native_func.Tensor¶
- static zeros(device: slangpy.Device, shape: slangpy.slangpy.Shape, dtype: object, usage: slangpy.BufferUsage = 24, memory_type: slangpy.MemoryType = MemoryType.device_local, program_layout: slangpy.native_refl.Layout | None = None) slangpy.native_func.Tensor¶
- static empty_like(other: slangpy.native_func.Tensor) slangpy.native_func.Tensor¶
- static zeros_like(other: slangpy.native_func.Tensor) slangpy.native_func.Tensor¶
- static from_torch(device: slangpy.Device, tensor: object, dtype: object, usage: slangpy.BufferUsage = 24, program_layout: slangpy.native_refl.Layout | None = None) slangpy.native_func.Tensor¶
- static load_from_image(device: slangpy.Device, path: object, flip_y: bool = False, linearize: bool = False, scale: float = 1.0, offset: float = 0.0, grayscale: bool = False) slangpy.native_func.Tensor¶
- class slangpy.SRGBMode¶
Base class:
enum.EnumInterpretation of stored image color values; does not re-encode texels or modify source metadata.
- class slangpy.YHandling¶
Base class:
enum.EnumStrategy for handling Y (greyscale) bitmaps during texture loading.
- class slangpy.YAHandling¶
Base class:
enum.EnumStrategy for handling YA (greyscale + alpha) bitmaps during texture loading.
- expand_to_rgba: YAHandling = YAHandling.expand_to_rgba¶
- preserve_as_rg: YAHandling = YAHandling.preserve_as_rg¶
- slangpy.extract_torch_tensor_info(tensor: object) object¶
N/A
- slangpy.copy_torch_tensor_to_buffer(tensor: object, buffer: slangpy.Buffer) bool¶
N/A
- slangpy.copy_buffer_to_torch_tensor(buffer: slangpy.Buffer, tensor: object) bool¶
N/A
- slangpy.create_torch_zeros_like_tensor(tensor: object) object¶
N/A
- class slangpy.core.native.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.native.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.native.AutogradAccess¶
Alias class:
slangpy.slangpy.AutogradAccess
- slangpy.core.native.unpack_args(*args) tuple¶
N/A
- slangpy.core.native.unpack_kwargs(**kwargs) tuple¶
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
- class slangpy.core.native.SignatureBuilder¶
Alias class:
slangpy.slangpy.SignatureBuilder
- class slangpy.core.native.NativeObject¶
Alias class:
slangpy.slangpy.NativeObject
- 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.FunctionNodeType¶
Alias class:
slangpy.slangpy.FunctionNodeType
- class slangpy.core.native.NativeFunctionNode¶
Alias class:
slangpy.slangpy.NativeFunctionNode
- class slangpy.core.native.NativePackedArg¶
Alias class:
slangpy.slangpy.NativePackedArg
- 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.NativeDescriptorMarshall¶
Alias class:
slangpy.slangpy.NativeDescriptorMarshall
- class slangpy.core.native.NativeTextureMarshall¶
Alias class:
slangpy.slangpy.NativeTextureMarshall
- class slangpy.core.native.TensorMarshall¶
Alias class:
slangpy.slangpy.TensorMarshall
- class slangpy.core.native.NativeNumpyMarshall¶
Alias class:
slangpy.slangpy.NativeNumpyMarshall
- class slangpy.core.native.NativeTorchTensorMarshall¶
Alias class:
slangpy.slangpy.NativeTorchTensorMarshall
- class slangpy.core.native.NativeTorchTensorDiffPair¶
Alias class:
slangpy.slangpy.NativeTorchTensorDiffPair
- class slangpy.core.native.NativeValueMarshall¶
Alias class:
slangpy.slangpy.NativeValueMarshall
- class slangpy.core.utils.PathLike¶
Alias class:
os.PathLike
- class slangpy.core.utils.Any¶
Alias class:
typing.Any
- 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.PipelineCompilationMode¶
Alias class:
slangpy.PipelineCompilationMode
- class slangpy.core.utils.Device¶
Alias class:
slangpy.Device
- class slangpy.core.utils.DeviceDesc¶
Alias class:
slangpy.DeviceDesc
- class slangpy.core.utils.NativeHandle¶
Alias class:
slangpy.NativeHandle
- slangpy.core.utils.get_cuda_current_context_native_handles() list[slangpy.NativeHandle]¶
Gets the device and context handles for the current CUDA context. Use to retrieve an existing context (eg from PyTorch) to pass as the existing_device_handles from which to create a device in the DeviceDesc.
- class slangpy.core.utils.BindlessDesc¶
Alias class:
slangpy.BindlessDesc
- class slangpy.core.utils.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.core.utils.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.core.enums.IOType¶
Alias class:
slangpy.native_refl.IOType
- 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.native_refl.Function
- class slangpy.core.logging.TableColumn¶
- class slangpy.core.generator.Any¶
Alias class:
typing.Any
- class slangpy.core.generator.CodeGen¶
Alias class:
slangpy.bindings.codegen.CodeGen
- class slangpy.core.generator.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.core.generator.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.generator.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- slangpy.core.generator.MAX_INLINE_TYPE_LEN: int = 60¶
- slangpy.core.generator.MAX_GENERATED_THREAD_GROUP_SIZE: int = 1024¶
- slangpy.core.generator.MAX_DISPATCH_THREAD_GROUPS_X: int = 2097151¶
- class slangpy.core.generator.KernelGenException¶
Base class:
builtins.Exception
- class slangpy.core.shapes.TArgShapesResult¶
Base class:
builtins.dict
- class slangpy.core.callsignature.Any¶
Alias class:
typing.Any
- class slangpy.core.callsignature.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- 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.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.callsignature.TypeReflection¶
Alias class:
slangpy.TypeReflection
- 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.NoneMarshall¶
Alias class:
slangpy.builtin.value.NoneMarshall
- class slangpy.core.callsignature.SlangFunction¶
Alias class:
slangpy.native_refl.Function
- class slangpy.core.callsignature.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.core.callsignature.ResolvedParam¶
Alias class:
slangpy.reflection.typeresolution.ResolvedParam
- class slangpy.core.callsignature.ResolutionDiagnostic¶
Alias class:
slangpy.reflection.typeresolution.ResolutionDiagnostic
- class slangpy.core.callsignature.Tensor¶
Alias class:
slangpy.native_func.Tensor
- 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¶
Alias class:
slangpy.core.generator.KernelGenException
- 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.native_refl.Function
- class slangpy.core.function.SlangType¶
Alias class:
slangpy.native_refl.Type
- 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.NativeHandle¶
Alias class:
slangpy.NativeHandle
- class slangpy.core.function.NativeHandleType¶
Alias class:
slangpy.NativeHandleType
- class slangpy.core.function.RayTracingPipelineFlags¶
Alias class:
slangpy.RayTracingPipelineFlags
- class slangpy.core.function.HitGroupDesc¶
Alias class:
slangpy.HitGroupDesc
- class slangpy.core.function.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.core.function.IThis¶
Base class:
typing.Protocol
- class slangpy.core.function.PipelineType¶
Base class:
enum.Enum- compute: PipelineType = PipelineType.compute¶
- ray_tracing: PipelineType = PipelineType.ray_tracing¶
- class slangpy.core.function.FunctionBuildInfo¶
- class slangpy.core.function.FunctionNode¶
Base class:
slangpy.slangpy.NativeFunctionNode- debug_build_call_data: function = <function FunctionNode.debug_build_call_data at 0x0000020661FDB740>¶
- 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.FunctionNodeCUDAStream¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeConstants¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodePrelude¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeTypeConformances¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.FunctionNodeRayTracing¶
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.FunctionNodeCallGroupShape¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.function.Function¶
Base class:
slangpy.core.function.FunctionNode
- class slangpy.core.calldata.Path¶
Alias class:
pathlib.Path
- class slangpy.core.calldata.Any¶
Alias class:
typing.Any
- class slangpy.core.calldata.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.calldata.ModifierID¶
Alias class:
slangpy.ModifierID
- class slangpy.core.calldata.TypeReflection¶
Alias class:
slangpy.TypeReflection
- 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.NoneMarshall¶
Alias class:
slangpy.builtin.value.NoneMarshall
- class slangpy.core.calldata.SlangFunction¶
Alias class:
slangpy.native_refl.Function
- class slangpy.core.calldata.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.core.calldata.ResolvedParam¶
Alias class:
slangpy.reflection.typeresolution.ResolvedParam
- class slangpy.core.calldata.ResolutionDiagnostic¶
Alias class:
slangpy.reflection.typeresolution.ResolutionDiagnostic
- class slangpy.core.calldata.Tensor¶
Alias class:
slangpy.native_func.Tensor
- 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.generator.KernelGenException
- class slangpy.core.calldata.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.core.calldata.NativeCallData¶
Alias class:
slangpy.slangpy.NativeCallData
- slangpy.core.calldata.unpack_args(*args) tuple¶
N/A
- slangpy.core.calldata.unpack_kwargs(**kwargs) tuple¶
N/A
- class slangpy.core.calldata.PipelineType¶
Alias class:
slangpy.core.function.PipelineType
- class slangpy.core.calldata.SlangCompileError¶
Alias class:
slangpy.SlangCompileError
- class slangpy.core.calldata.SlangLinkOptions¶
Alias class:
slangpy.SlangLinkOptions
- class slangpy.core.calldata.NativeHandle¶
Alias class:
slangpy.NativeHandle
- class slangpy.core.calldata.DeviceType¶
Alias class:
slangpy.DeviceType
- class slangpy.core.calldata.PipelineCompilationPolicy¶
Alias class:
slangpy.PipelineCompilationPolicy
- class slangpy.core.calldata.TypeConformance¶
Alias class:
slangpy.TypeConformance
- class slangpy.core.calldata.BoundCallRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundCallRuntime
- 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.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.core.calldata.ITensorType¶
Alias class:
slangpy.native_refl.TensorType
- class slangpy.core.calldata.TensorAccess¶
Alias class:
slangpy.native_refl.TensorType.Access
- class slangpy.core.calldata.CallData¶
Base class:
slangpy.slangpy.NativeCallData
- class slangpy.core.struct.Any¶
Alias class:
typing.Any
- class slangpy.core.struct.Function¶
Alias class:
slangpy.core.function.Function
- class slangpy.core.struct.BaseStruct¶
Alias class:
slangpy.native_func.BaseStruct
- class slangpy.core.struct.Struct¶
Base class:
slangpy.native_func.BaseStructA Slang struct, typically created by accessing it via a module or parent struct. i.e. mymodule.Foo, or mymodule.Foo.Bar.
- 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.Pipeline¶
Alias class:
slangpy.Pipeline
- class slangpy.core.module.ShaderTable¶
Alias class:
slangpy.ShaderTable
- 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.BaseModule¶
Alias class:
slangpy.native_func.BaseModule
- class slangpy.core.module.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.core.module.CallDataCache¶
Base class:
slangpy.slangpy.NativeCallDataCache
- class slangpy.core.module.Module¶
Base class:
slangpy.native_func.BaseModuleA Slang module, created either by loading a slang file or providing a loaded SGL module.
- 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.Tensor¶
Alias class:
slangpy.native_func.Tensor
- 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.
- class slangpy.core.instance.InstanceTensor¶
Base class:
slangpy.core.instance.InstanceListSimplified implementation of InstanceList that uses a single buffer for all instances and provides buffer convenience functions for accessing its data.
- class slangpy.core.packedarg.Any¶
Alias class:
typing.Any
- class slangpy.core.packedarg.Module¶
Alias class:
slangpy.core.module.Module
- class slangpy.core.packedarg.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.core.packedarg.NativePackedArg¶
Alias class:
slangpy.slangpy.NativePackedArg
- slangpy.core.packedarg.unpack_arg(arg: object) object¶
N/A
- class slangpy.core.packedarg.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.core.packedarg.PackedArg¶
Base class:
slangpy.slangpy.NativePackedArgRepresents an argument that has been efficiently packed into a shader object for use in later functionc alls.
- class slangpy.reflection.reflectiontypes.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.reflection.reflectiontypes.TR¶
Alias class:
slangpy.TypeReflection
- class slangpy.reflection.reflectiontypes.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.reflection.reflectiontypes.ArrayType¶
Alias class:
slangpy.native_refl.ArrayType
- class slangpy.reflection.reflectiontypes.ByteAddressBufferType¶
Alias class:
slangpy.native_refl.ByteAddressBufferType
- class slangpy.reflection.reflectiontypes.DiffTensorViewType¶
Alias class:
slangpy.native_refl.DiffTensorViewType
- class slangpy.reflection.reflectiontypes.DifferentialPairType¶
Alias class:
slangpy.native_refl.DifferentialPairType
- class slangpy.reflection.reflectiontypes.SlangField¶
Alias class:
slangpy.native_refl.Field
- class slangpy.reflection.reflectiontypes.SlangFunction¶
Alias class:
slangpy.native_refl.Function
- class slangpy.reflection.reflectiontypes.InterfaceType¶
Alias class:
slangpy.native_refl.InterfaceType
- class slangpy.reflection.reflectiontypes.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.reflection.reflectiontypes.MatrixType¶
Alias class:
slangpy.native_refl.MatrixType
- class slangpy.reflection.reflectiontypes.SlangParameter¶
Alias class:
slangpy.native_refl.Parameter
- class slangpy.reflection.reflectiontypes.PointerType¶
Alias class:
slangpy.native_refl.PointerType
- class slangpy.reflection.reflectiontypes.RaytracingAccelerationStructureType¶
Alias class:
slangpy.native_refl.RaytracingAccelerationStructureType
- class slangpy.reflection.reflectiontypes.ResourceType¶
Alias class:
slangpy.native_refl.ResourceType
- class slangpy.reflection.reflectiontypes.SamplerStateType¶
Alias class:
slangpy.native_refl.SamplerStateType
- class slangpy.reflection.reflectiontypes.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.reflection.reflectiontypes.StructuredBufferType¶
Alias class:
slangpy.native_refl.StructuredBufferType
- class slangpy.reflection.reflectiontypes.StructType¶
Alias class:
slangpy.native_refl.StructType
- class slangpy.reflection.reflectiontypes.ITensorType¶
Alias class:
slangpy.native_refl.TensorType
- class slangpy.reflection.reflectiontypes.TensorViewType¶
Alias class:
slangpy.native_refl.TensorViewType
- class slangpy.reflection.reflectiontypes.TextureType¶
Alias class:
slangpy.native_refl.TextureType
- class slangpy.reflection.reflectiontypes.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.reflection.reflectiontypes.SlangLayout¶
Alias class:
slangpy.native_refl.TypeLayout
- class slangpy.reflection.reflectiontypes.UnhandledType¶
Alias class:
slangpy.native_refl.UnhandledType
- class slangpy.reflection.reflectiontypes.UnknownType¶
Alias class:
slangpy.native_refl.UnknownType
- class slangpy.reflection.reflectiontypes.VectorType¶
Alias class:
slangpy.native_refl.VectorType
- class slangpy.reflection.reflectiontypes.VoidType¶
Alias class:
slangpy.native_refl.VoidType
- class slangpy.reflection.reflectiontypes.TensorType¶
Alias class:
slangpy.native_refl.TensorType.Kind
- class slangpy.reflection.reflectiontypes.TensorAccess¶
Alias class:
slangpy.native_refl.TensorType.Access
- class slangpy.reflection.SlangLayout¶
Alias class:
slangpy.native_refl.TypeLayout
- class slangpy.reflection.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.reflection.VoidType¶
Alias class:
slangpy.native_refl.VoidType
- class slangpy.reflection.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.reflection.VectorType¶
Alias class:
slangpy.native_refl.VectorType
- class slangpy.reflection.MatrixType¶
Alias class:
slangpy.native_refl.MatrixType
- class slangpy.reflection.ArrayType¶
Alias class:
slangpy.native_refl.ArrayType
- class slangpy.reflection.StructType¶
Alias class:
slangpy.native_refl.StructType
- class slangpy.reflection.InterfaceType¶
Alias class:
slangpy.native_refl.InterfaceType
- class slangpy.reflection.TextureType¶
Alias class:
slangpy.native_refl.TextureType
- class slangpy.reflection.PointerType¶
Alias class:
slangpy.native_refl.PointerType
- class slangpy.reflection.UnknownType¶
Alias class:
slangpy.native_refl.UnknownType
- class slangpy.reflection.ResourceType¶
Alias class:
slangpy.native_refl.ResourceType
- class slangpy.reflection.StructuredBufferType¶
Alias class:
slangpy.native_refl.StructuredBufferType
- class slangpy.reflection.ByteAddressBufferType¶
Alias class:
slangpy.native_refl.ByteAddressBufferType
- class slangpy.reflection.DifferentialPairType¶
Alias class:
slangpy.native_refl.DifferentialPairType
- class slangpy.reflection.RaytracingAccelerationStructureType¶
Alias class:
slangpy.native_refl.RaytracingAccelerationStructureType
- class slangpy.reflection.SamplerStateType¶
Alias class:
slangpy.native_refl.SamplerStateType
- class slangpy.reflection.UnhandledType¶
Alias class:
slangpy.native_refl.UnhandledType
- class slangpy.reflection.ITensorType¶
Alias class:
slangpy.native_refl.TensorType
- class slangpy.reflection.TensorType¶
Alias class:
slangpy.native_refl.TensorType.Kind
- class slangpy.reflection.TensorAccess¶
Alias class:
slangpy.native_refl.TensorType.Access
- class slangpy.reflection.TensorViewType¶
Alias class:
slangpy.native_refl.TensorViewType
- class slangpy.reflection.DiffTensorViewType¶
Alias class:
slangpy.native_refl.DiffTensorViewType
- class slangpy.reflection.SlangFunction¶
Alias class:
slangpy.native_refl.Function
- class slangpy.reflection.SlangField¶
Alias class:
slangpy.native_refl.Field
- class slangpy.reflection.SlangParameter¶
Alias class:
slangpy.native_refl.Parameter
- class slangpy.reflection.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.reflection.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.reflection.typeresolution.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.reflection.typeresolution.ResolutionArg¶
Holds a single argument for type resolution. Starts with the python marshall and slang type being resolved, and ends with the resolved vector type (if any). In the case of functions with optional parameters, the python variable can be None and the parameter type will be used
- class slangpy.reflection.typeresolution.ResolutionDiagnostic¶
- class slangpy.reflection.typeresolution.ResolvedParam¶
- class slangpy.reflection.typeresolution.ResolveResult¶
- class slangpy.reflection.lookup.Any¶
Alias class:
typing.Any
- class slangpy.reflection.lookup.Device¶
Alias class:
slangpy.Device
- class slangpy.reflection.lookup.TypeLayoutReflection¶
Alias class:
slangpy.TypeLayoutReflection
- class slangpy.reflection.lookup.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.reflection.lookup.Marshall¶
Alias class:
slangpy.bindings.marshall.Marshall
- class slangpy.reflection.lookup.BaseStruct¶
Alias class:
slangpy.native_func.BaseStruct
- slangpy.reflection.lookup.get_builtin_layout(device: slangpy.Device) slangpy.native_refl.Layout¶
N/A
- slangpy.reflection.lookup.resolve_element_type(layout: slangpy.native_refl.Layout, element_type: object) slangpy.native_refl.Type¶
N/A
- slangpy.reflection.lookup.resolve_layout(device: slangpy.Device, element_type: object | None = None, layout: object | None = None) slangpy.native_refl.Layout¶
N/A
- class slangpy.reflection.lookup.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.reflection.lookup.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.reflection.lookup.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.reflection.lookup.ST¶
Alias class:
slangpy.TypeReflection.ScalarType
- class slangpy.bindings.codegen.CodeGenBlock¶
- 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.
- 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.NativeMarshallBase 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.
- 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.native_refl.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.NativeMarshall¶
Alias class:
slangpy.slangpy.NativeMarshall
- 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.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.bindings.boundvariable.SlangField¶
Alias class:
slangpy.native_refl.Field
- class slangpy.bindings.boundvariable.SlangFunction¶
Alias class:
slangpy.native_refl.Function
- class slangpy.bindings.boundvariable.SlangParameter¶
Alias class:
slangpy.native_refl.Parameter
- class slangpy.bindings.boundvariable.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.bindings.boundvariable.ResolvedParam¶
Alias class:
slangpy.reflection.typeresolution.ResolvedParam
- slangpy.bindings.boundvariable.MAX_INLINE_TYPE_LEN: int = 60¶
- class slangpy.bindings.boundvariable.BoundVariableException¶
Base class:
builtins.ExceptionCustom 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.
- apply_explicit_vectorization: function = <function BoundCall.apply_explicit_vectorization at 0x0000020661F64AE0>¶
- 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.
- gen_calldata_type_name: function = <function BoundVariable.gen_calldata_type_name at 0x0000020661F64F40>¶
- apply_explicit_vectorization: function = <function BoundVariable.apply_explicit_vectorization at 0x0000020661F65260>¶
- apply_implicit_vectorization: function = <function BoundVariable.apply_implicit_vectorization at 0x0000020661F653A0>¶
- calculate_differentiability: function = <function BoundVariable.calculate_differentiability at 0x0000020661F65620>¶
- 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.NativeBoundCallRuntimeMinimal call data stored after kernel generation required to dispatch a call to a SlangPy kernel.
- class slangpy.bindings.boundvariableruntime.BoundVariableRuntime¶
Base class:
slangpy.slangpy.NativeBoundVariableRuntimeMinimal 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.cursor.Any¶
Alias class:
typing.Any
- class slangpy.bindings.cursor.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.bindings.cursor.BoundVariableException¶
Alias class:
slangpy.bindings.boundvariable.BoundVariableException
- class slangpy.bindings.cursor.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.bindings.cursor.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.bindings.cursor.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.bindings.cursor.NativeValueMarshall¶
Alias class:
slangpy.slangpy.NativeValueMarshall
- class slangpy.bindings.cursor.WriteToCursorMarshallInfo¶
Metadata needed to marshal values through native cursor-writer registration.
- class slangpy.bindings.cursor.WriteToCursorMarshall¶
Base class:
slangpy.slangpy.NativeValueMarshallMarshall for scalar values that are written through the native cursor fast path.
- class slangpy.bindings.WriteToCursorMarshall¶
Alias class:
slangpy.bindings.cursor.WriteToCursorMarshall
- class slangpy.bindings.WriteToCursorMarshallInfo¶
Alias class:
slangpy.bindings.cursor.WriteToCursorMarshallInfo
- 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.native_refl.Layout
- class slangpy.experimental.gridarg.SlangType¶
Alias class:
slangpy.native_refl.Type
- 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.NativeObjectPasses the thread id as an argument to a SlangPy function.
- class slangpy.experimental.gridarg.GridArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- 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.
- 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.native_refl.ArrayType
- class slangpy.types.helpers.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.types.helpers.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.types.helpers.VectorType¶
Alias class:
slangpy.native_refl.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.native_refl.Layout
- class slangpy.types.wanghasharg.SlangType¶
Alias class:
slangpy.native_refl.Type
- 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
- 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.native_refl.Layout
- class slangpy.types.randfloatarg.SlangType¶
Alias class:
slangpy.native_refl.Type
- 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
- 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.native_refl.Layout
- class slangpy.types.threadidarg.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.types.threadidarg.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.types.threadidarg.ThreadIdArg¶
Base class:
slangpy.slangpy.NativeObjectPasses the thread id as an argument to a SlangPy function.
- class slangpy.types.threadidarg.ThreadIdArgMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- 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.native_refl.Layout
- class slangpy.types.callidarg.SlangType¶
Alias class:
slangpy.native_refl.Type
- 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
- 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.Tensor¶
Alias class:
slangpy.native_func.Tensor
- class slangpy.types.tensor.TensorDesc¶
Alias class:
slangpy.native_func.TensorDesc
- class slangpy.types.Tensor¶
Alias class:
slangpy.native_func.Tensor
- 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.native_func.Tensor
- class slangpy.gpu_structs.Any¶
Alias class:
typing.Any
- slangpy.gpu_structs.CLUSTER_FLAG_NONE: int = 0¶
- slangpy.gpu_structs.CLUSTER_FLAG_ALLOW_DISABLE_OMMS: int = 1¶
- slangpy.gpu_structs.CLUSTER_INDEX_FORMAT_UINT8: int = 1¶
- slangpy.gpu_structs.CLUSTER_INDEX_FORMAT_UINT16: int = 2¶
- slangpy.gpu_structs.CLUSTER_INDEX_FORMAT_UINT32: int = 4¶
- slangpy.gpu_structs.CLUSTER_GEOMETRY_FLAG_NONE: int = 0¶
- slangpy.gpu_structs.CLUSTER_GEOMETRY_FLAG_CULL_DISABLE: int = 536870912¶
- slangpy.gpu_structs.CLUSTER_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION: int = 1073741824¶
- slangpy.gpu_structs.CLUSTER_GEOMETRY_FLAG_OPAQUE: int = 2147483648¶
- 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
- slangpy.builtin.value.unpack_arg(arg: object) object¶
N/A
- 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.native_refl.Type
- class slangpy.builtin.value.ValueMarshall¶
Base class:
slangpy.slangpy.NativeValueMarshall- gen_trampoline_store: function = <function ValueMarshall.gen_trampoline_store at 0x0000020661FB5260>¶
- class slangpy.builtin.value.ScalarMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.value.NoneMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.value.VectorMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.value.MatrixMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall
- 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.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.native_refl.Type
- class slangpy.builtin.valueref.ValueRef¶
Alias class:
slangpy.types.valueref.ValueRef
- class slangpy.builtin.valueref.ValueRefMarshall¶
Base class:
slangpy.bindings.marshall.Marshall- resolve_dimensionality: function = <function ValueRefMarshall.resolve_dimensionality at 0x0000020661FB7C40>¶
- gen_trampoline_load: function = <function ValueRefMarshall.gen_trampoline_load at 0x0000020661FB7E20>¶
- gen_trampoline_store: function = <function ValueRefMarshall.gen_trampoline_store at 0x0000020661FB7EC0>¶
- 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.native_refl.Layout
- class slangpy.builtin.diffpair.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.diffpair.DiffPair¶
Alias class:
slangpy.types.diffpair.DiffPair
- class slangpy.builtin.diffpair.DiffPairMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.DiffPairMarshall¶
Alias class:
slangpy.builtin.diffpair.DiffPairMarshall
- 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.native_refl.Layout
- class slangpy.builtin.struct.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.struct.UnknownType¶
Alias class:
slangpy.native_refl.UnknownType
- class slangpy.builtin.struct.StructType¶
Alias class:
slangpy.native_refl.StructType
- class slangpy.builtin.struct.InterfaceType¶
Alias class:
slangpy.native_refl.InterfaceType
- class slangpy.builtin.struct.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.struct.ValueMarshall¶
Alias class:
slangpy.builtin.value.ValueMarshall
- class slangpy.builtin.struct.StructMarshall¶
Base class:
slangpy.builtin.value.ValueMarshall- resolve_dimensionality: function = <function StructMarshall.resolve_dimensionality at 0x0000020661FB8FE0>¶
- gen_trampoline_load: function = <function StructMarshall.gen_trampoline_load at 0x0000020661FB9120>¶
- 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.native_refl.Layout
- class slangpy.builtin.structuredbuffer.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.structuredbuffer.StructuredBufferType¶
Alias class:
slangpy.native_refl.StructuredBufferType
- class slangpy.builtin.structuredbuffer.ByteAddressBufferType¶
Alias class:
slangpy.native_refl.ByteAddressBufferType
- class slangpy.builtin.structuredbuffer.PointerType¶
Alias class:
slangpy.native_refl.PointerType
- 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
- class slangpy.builtin.BufferMarshall¶
Alias class:
slangpy.builtin.structuredbuffer.BufferMarshall
- class slangpy.builtin.descriptor.Any¶
Alias class:
typing.Any
- class slangpy.builtin.descriptor.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.descriptor.NativeDescriptorMarshall¶
Alias class:
slangpy.slangpy.NativeDescriptorMarshall
- slangpy.builtin.descriptor.unpack_arg(arg: object) object¶
N/A
- class slangpy.builtin.descriptor.Shape¶
Alias class:
slangpy.slangpy.Shape
- class slangpy.builtin.descriptor.TypeReflection¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.descriptor.ShaderCursor¶
Alias class:
slangpy.ShaderCursor
- class slangpy.builtin.descriptor.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.descriptor.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.descriptor.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.descriptor.DescriptorHandle¶
Alias class:
slangpy.DescriptorHandle
- class slangpy.builtin.descriptor.DescriptorHandleType¶
Alias class:
slangpy.DescriptorHandleType
- class slangpy.builtin.descriptor.DescriptorMarshall¶
Base class:
slangpy.slangpy.NativeDescriptorMarshall
- class slangpy.builtin.DescriptorMarshall¶
Alias class:
slangpy.builtin.descriptor.DescriptorMarshall
- 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- resolve_dimensionality: function = <function TextureMarshall.resolve_dimensionality at 0x0000020661FBA520>¶
- class slangpy.builtin.texture.SamplerMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- 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.native_refl.Type
- class slangpy.builtin.array.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.builtin.array.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.array.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.array.BoundVariableRuntime¶
Alias class:
slangpy.bindings.boundvariableruntime.BoundVariableRuntime
- class slangpy.builtin.array.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.array.ShaderCursor¶
Alias class:
slangpy.ShaderCursor
- class slangpy.builtin.array.ShaderObject¶
Alias class:
slangpy.ShaderObject
- class slangpy.builtin.array.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.array.CallContext¶
Alias class:
slangpy.slangpy.CallContext
- class slangpy.builtin.array.NativeValueMarshall¶
Alias class:
slangpy.slangpy.NativeValueMarshall
- slangpy.builtin.array.unpack_arg(arg: object) object¶
N/A
- 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.native_refl.Layout
- class slangpy.builtin.Any¶
Alias class:
typing.Any
- class slangpy.builtin.TextureView¶
Alias class:
slangpy.TextureView
- class slangpy.builtin.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- 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 0x0000020661FBB4C0>¶
- 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.native_refl.Layout
- class slangpy.builtin.range.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.range.TR¶
Alias class:
slangpy.TypeReflection
- class slangpy.builtin.range.RangeMarshall¶
Base class:
slangpy.bindings.marshall.Marshall
- class slangpy.builtin.RangeMarshall¶
Alias class:
slangpy.builtin.range.RangeMarshall
- class slangpy.builtin.tensorcommon.Protocol¶
Alias class:
typing.Protocol
- class slangpy.builtin.tensorcommon.DeviceType¶
Alias class:
slangpy.DeviceType
- class slangpy.builtin.tensorcommon.BoundVariable¶
Alias class:
slangpy.bindings.boundvariable.BoundVariable
- class slangpy.builtin.tensorcommon.BindContext¶
Alias class:
slangpy.bindings.marshall.BindContext
- class slangpy.builtin.tensorcommon.CodeGenBlock¶
Alias class:
slangpy.bindings.codegen.CodeGenBlock
- class slangpy.builtin.tensorcommon.CallMode¶
Alias class:
slangpy.slangpy.CallMode
- class slangpy.builtin.tensorcommon.AccessType¶
Alias class:
slangpy.slangpy.AccessType
- class slangpy.builtin.tensorcommon.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.tensorcommon.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.builtin.tensorcommon.ITensorType¶
Alias class:
slangpy.native_refl.TensorType
- class slangpy.builtin.tensorcommon.TensorType¶
Alias class:
slangpy.native_refl.TensorType.Kind
- class slangpy.builtin.tensorcommon.TensorViewType¶
Alias class:
slangpy.native_refl.TensorViewType
- class slangpy.builtin.tensorcommon.DiffTensorViewType¶
Alias class:
slangpy.native_refl.DiffTensorViewType
- class slangpy.builtin.tensorcommon.ArrayType¶
Alias class:
slangpy.native_refl.ArrayType
- class slangpy.builtin.tensorcommon.InterfaceType¶
Alias class:
slangpy.native_refl.InterfaceType
- class slangpy.builtin.tensorcommon.UnknownType¶
Alias class:
slangpy.native_refl.UnknownType
- class slangpy.builtin.tensorcommon.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.builtin.tensorcommon.ResourceType¶
Alias class:
slangpy.native_refl.ResourceType
- class slangpy.builtin.tensorcommon.TensorAccess¶
Alias class:
slangpy.native_refl.TensorType.Access
- class slangpy.builtin.tensorcommon.VectorType¶
Alias class:
slangpy.native_refl.VectorType
- class slangpy.builtin.tensorcommon.ITensorMarshall¶
Base class:
typing.ProtocolProtocol for type marshalling of any container that behaves as a tensor.
- class slangpy.builtin.tensor.Any¶
Alias class:
typing.Any
- class slangpy.builtin.tensor.ShaderObject¶
Alias class:
slangpy.ShaderObject
- class slangpy.builtin.tensor.ShaderCursor¶
Alias class:
slangpy.ShaderCursor
- class slangpy.builtin.tensor.BufferUsage¶
Alias class:
slangpy.BufferUsage
- class slangpy.builtin.tensor.TensorMarshallBase¶
Alias class:
slangpy.slangpy.TensorMarshall
- class slangpy.builtin.tensor.Tensor¶
Alias class:
slangpy.native_func.Tensor
- class slangpy.builtin.tensor.SlangProgramLayout¶
Alias class:
slangpy.native_refl.Layout
- class slangpy.builtin.tensor.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.tensor.ArrayType¶
Alias class:
slangpy.native_refl.ArrayType
- class slangpy.builtin.tensor.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.builtin.tensor.VectorType¶
Alias class:
slangpy.native_refl.VectorType
- class slangpy.builtin.tensor.MatrixType¶
Alias class:
slangpy.native_refl.MatrixType
- class slangpy.builtin.tensor.TensorType¶
Alias class:
slangpy.native_refl.TensorType.Kind
- class slangpy.builtin.tensor.TensorAccess¶
Alias class:
slangpy.native_refl.TensorType.Access
- 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.TensorMarshall¶
Base class:
slangpy.slangpy.TensorMarshall- resolve_dimensionality: function = <function TensorMarshall.resolve_dimensionality at 0x0000020661FD9080>¶
- gen_trampoline_load: function = <function TensorMarshall.gen_trampoline_load at 0x0000020661FD9260>¶
- 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.native_refl.Layout
- class slangpy.builtin.numpy.ScalarType¶
Alias class:
slangpy.native_refl.ScalarType
- class slangpy.builtin.numpy.SlangType¶
Alias class:
slangpy.native_refl.Type
- class slangpy.builtin.numpy.VectorType¶
Alias class:
slangpy.native_refl.VectorType
- class slangpy.builtin.numpy.MatrixType¶
Alias class:
slangpy.native_refl.MatrixType
- class slangpy.builtin.numpy.NumpyMarshall¶
Base class:
slangpy.slangpy.NativeNumpyMarshall
- class slangpy.builtin.NumpyMarshall¶
Alias class:
slangpy.builtin.numpy.NumpyMarshall
- class slangpy.builtin.TensorMarshall¶
Alias class:
slangpy.builtin.tensor.TensorMarshall
- 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.InstanceTensor¶
Alias class:
slangpy.core.instance.InstanceTensor
- class slangpy.torchintegration.Any¶
Alias class:
typing.Any
- class slangpy.torchintegration.NativeTorchTensorDiffPair¶
Alias class:
slangpy.slangpy.NativeTorchTensorDiffPair
- class slangpy.Any¶
Alias class:
typing.Any
- class slangpy.NativeTorchTensorDiffPair¶
Alias class:
slangpy.slangpy.NativeTorchTensorDiffPair