ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
ComputePipeline Struct Reference

An SDL_GPUComputePipeline: a compiled compute program and its binding layout. More...

#include <ComputePipeline.h>

Inheritance diagram for ComputePipeline:

Public Member Functions

ComputePipelineinitWithDevice (ComputePipeline *self, RenderDevice *device, const SDL_GPUComputePipelineCreateInfo *info)
 Initializes this ComputePipeline from a fully-populated SDL_GPUComputePipelineCreateInfo.
 
Class * _ComputePipeline (void)
 The ComputePipeline archetype.
 

Data Fields

Object object
 The superclass.
 
SDL_GPUComputePipeline * pipeline
 The underlying SDL compute pipeline.
 
ident data
 User data.
 

Protected Attributes

ComputePipelineInterface * interface
 The interface.
 

Detailed Description

An SDL_GPUComputePipeline: a compiled compute program and its binding layout.

ComputePipeline owns its underlying SDL_GPUComputePipeline and releases it in dealloc, so a pipeline is freed with release like any other Objectively object. Bind it with ComputePass::bindPipeline via its pipeline handle.

Member Function Documentation

◆ _ComputePipeline()

Class * _ComputePipeline ( void  )

The ComputePipeline archetype.

Returns
The ComputePipeline Class.

◆ initWithDevice()

ComputePipeline * initWithDevice ( ComputePipeline self,
RenderDevice device,
const SDL_GPUComputePipelineCreateInfo *  info 
)

Initializes this ComputePipeline from a fully-populated SDL_GPUComputePipelineCreateInfo.

The designated (and only) initializer: a thin wrapper over SDL_CreateGPUComputePipeline. All fields of info, including code, code_size, format, and entrypoint, must be set by the caller. Prefer RenderDevice::loadComputePipeline, which resolves a compiled blob from the Resource system, selects the device-appropriate format, and fills these in.

Parameters
selfThe ComputePipeline.
deviceThe RenderDevice used to create and release the pipeline. Retained.
infoThe ComputePipeline creation parameters with all fields populated.
Returns
The initialized ComputePipeline, or NULL on failure.

Field Documentation

◆ data

ident ComputePipeline::data

User data.

◆ interface

ComputePipelineInterface* ComputePipeline::interface
protected

The interface.

◆ object

Object ComputePipeline::object

The superclass.

◆ pipeline

SDL_GPUComputePipeline* ComputePipeline::pipeline

The underlying SDL compute pipeline.


The documentation for this struct was generated from the following files: