SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::GPUComputePipeline Class Reference

An opaque handle representing a compute pipeline. More...

Public Member Functions

constexpr GPUComputePipeline (GPUComputePipelineRaw gPUComputePipeline={})
 Wraps GPUComputePipeline. More...
 
 GPUComputePipeline (GPUDeviceParam device, const GPUComputePipelineCreateInfo &createinfo)
 Creates a pipeline object to be used in a compute workflow. More...
 
constexpr bool operator== (const GPUComputePipeline &other) const =default
 Default comparison operator.
 
constexpr bool operator== (GPUComputePipelineRaw gPUComputePipeline) const
 Compares with the underlying type.
 
constexpr operator GPUComputePipelineRaw () const
 Unwraps to the underlying GPUComputePipeline. More...
 

Detailed Description

Used during compute passes.

Since
This struct is available since SDL 3.2.0.
See also
GPUComputePipeline.GPUComputePipeline
GPUComputePass.BindPipeline
GPUDevice.ReleaseComputePipeline

Constructor & Destructor Documentation

◆ GPUComputePipeline() [1/2]

constexpr SDL::GPUComputePipeline::GPUComputePipeline ( GPUComputePipelineRaw  gPUComputePipeline = {})
inlineconstexpr
Parameters
gPUComputePipelinethe value to be wrapped

◆ GPUComputePipeline() [2/2]

SDL::GPUComputePipeline::GPUComputePipeline ( GPUDeviceParam  device,
const GPUComputePipelineCreateInfo createinfo 
)
inline

Shader resource bindings must be authored to follow a particular order depending on the shader format.

For SPIR-V shaders, use the following resource sets:

  • 0: Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • 1: Read-write storage textures, followed by read-write storage buffers
  • 2: Uniform buffers

For DXBC and DXIL shaders, use the following register order:

  • (t[n], space0): Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • (u[n], space1): Read-write storage textures, followed by read-write storage buffers
  • (b[n], space2): Uniform buffers

For MSL/metallib, use the following order:

  • [[buffer]]: Uniform buffers, followed by read-only storage buffers, followed by read-write storage buffers
  • [[texture]]: Sampled textures, followed by read-only storage textures, followed by read-write storage textures

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUComputePipeline.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the compute pipeline to create.
Postcondition
a compute pipeline object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUComputePass.BindPipeline
GPUDevice.ReleaseComputePipeline

Member Function Documentation

◆ operator GPUComputePipelineRaw()

constexpr SDL::GPUComputePipeline::operator GPUComputePipelineRaw ( ) const
inlineconstexpr
Returns
the underlying GPUComputePipelineRaw.

The documentation for this class was generated from the following file: