wgpu-hs-0.4.0.0: WGPU
Safe HaskellNone
LanguageHaskell2010

WGPU.Internal.Shader

Description

 
Synopsis

Types

data ShaderModule Source #

Handle to a compiled shader module.

Instances

Instances details
Eq ShaderModule Source # 
Instance details

Defined in WGPU.Internal.Shader

Show ShaderModule Source # 
Instance details

Defined in WGPU.Internal.Shader

ToRaw ShaderModule WGPUShaderModule Source # 
Instance details

Defined in WGPU.Internal.Shader

data ShaderSource Source #

Source for a shader module.

Constructors

ShaderSourceSPIRV !SPIRV

Use shader source from a SPIRV module (pre-compiled).

ShaderSourceWGSL !WGSL

Use shader source from WGSL string.

Instances

Instances details
Eq ShaderSource Source # 
Instance details

Defined in WGPU.Internal.Shader

Show ShaderSource Source # 
Instance details

Defined in WGPU.Internal.Shader

newtype SPIRV Source #

Pre-compiled SPIRV module bytes.

Constructors

SPIRV ByteString 

Instances

Instances details
Eq SPIRV Source # 
Instance details

Defined in WGPU.Internal.Shader

Methods

(==) :: SPIRV -> SPIRV -> Bool #

(/=) :: SPIRV -> SPIRV -> Bool #

Show SPIRV Source # 
Instance details

Defined in WGPU.Internal.Shader

Methods

showsPrec :: Int -> SPIRV -> ShowS #

show :: SPIRV -> String #

showList :: [SPIRV] -> ShowS #

ToRaw SPIRV WGPUShaderModuleSPIRVDescriptor Source # 
Instance details

Defined in WGPU.Internal.Shader

newtype WGSL Source #

WGSL shader source code.

Constructors

WGSL Text 

Instances

Instances details
Eq WGSL Source # 
Instance details

Defined in WGPU.Internal.Shader

Methods

(==) :: WGSL -> WGSL -> Bool #

(/=) :: WGSL -> WGSL -> Bool #

Show WGSL Source # 
Instance details

Defined in WGPU.Internal.Shader

Methods

showsPrec :: Int -> WGSL -> ShowS #

show :: WGSL -> String #

showList :: [WGSL] -> ShowS #

ToRaw WGSL WGPUShaderModuleWGSLDescriptor Source # 
Instance details

Defined in WGPU.Internal.Shader

newtype ShaderEntryPoint Source #

Name of a shader entry point.

Constructors

ShaderEntryPoint 

Functions

createShaderModule Source #

Arguments

:: MonadIO m 
=> Device

Device for the shader.

-> ShaderModuleDescriptor

Descriptor of the shader module.

-> m ShaderModule

IO action producing the shader module.

Create a shader module from either SPIR-V or WGSL source code.

createShaderModuleSPIRV Source #

Arguments

:: MonadIO m 
=> Device

Device for which the shader should be created.

-> Text

Debugging label for the shader.

-> SPIRV

Shader source code (SPIR-V bytestring).

-> m ShaderModule

IO action creating the shader module.

Create a shader module from SPIR-V source code.

createShaderModuleWGSL Source #

Arguments

:: MonadIO m 
=> Device

Device for which the shader should be created.

-> Text

Debugging label for the shader.

-> WGSL

Shader source code (WGSL source string).

-> m ShaderModule

IO action creating the shader module.

Create a shader module from WGSL source code.