wgpu

package
v0.0.0-...-e35089e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 11

Documentation

Index

Constants

View Source
const (
	ArrayLayerCountUndefined        = 0xffffffff
	CopyStrideUndefined             = 0xffffffff
	LimitU32Undefined        uint32 = 0xffffffff
	LimitU64Undefined        uint64 = 0xffffffffffffffff
	MipLevelCountUndefined          = 0xffffffff
	WholeMapSize                    = ^uint(0)
	WholeSize                       = 0xffffffffffffffff
)
View Source
const (
	// Buffer-Texture copies must have `TextureDataLayout.BytesPerRow` aligned to this number.
	//
	// This doesn't apply to `(*Queue).WriteTexture()`.
	CopyBytesPerRowAlignment = 256
	// An offset into the query resolve buffer has to be aligned to this.
	QueryResolveBufferAlignment = 256
	// Buffer to buffer copy as well as buffer clear offsets and sizes must be aligned to this number.
	CopyBufferAlignment = 4
	// Size to align mappings.
	MapAlignment = 8
	// Vertex buffer strides have to be aligned to this number.
	VertexStrideAlignment = 4
	// Alignment all push constants need
	PushConstantAlignment = 4
	// Maximum queries in a query set
	QuerySetMaxQueries = 8192
	// Size of a single piece of query data.
	QuerySize = 8
)

Variables

View Source
var (
	ColorTransparent = Color{0, 0, 0, 0}
	ColorBlack       = Color{0, 0, 0, 1}
	ColorWhite       = Color{1, 1, 1, 1}
	ColorRed         = Color{1, 0, 0, 1}
	ColorGreen       = Color{0, 1, 0, 1}
	ColorBlue        = Color{0, 0, 1, 1}

	BlendComponentReplace = BlendComponent{
		SrcFactor: BlendFactorOne,
		DstFactor: BlendFactorZero,
		Operation: BlendOperationAdd,
	}
	BlendComponentOver = BlendComponent{
		SrcFactor: BlendFactorOne,
		DstFactor: BlendFactorOneMinusSrcAlpha,
		Operation: BlendOperationAdd,
	}

	BlendStateReplace = BlendState{
		Color: BlendComponentReplace,
		Alpha: BlendComponentReplace,
	}
	BlendStateAlphaBlending = BlendState{
		Color: BlendComponent{
			SrcFactor: BlendFactorSrcAlpha,
			DstFactor: BlendFactorOneMinusSrcAlpha,
			Operation: BlendOperationAdd,
		},
		Alpha: BlendComponentOver,
	}
	BlendStatePremultipliedAlphaBlending = BlendState{
		Color: BlendComponentOver,
		Alpha: BlendComponentOver,
	}
)

Functions

func FromBytes

func FromBytes[E any](src []byte) []E

func SetLogLevel

func SetLogLevel(level LogLevel)

func ToBytes

func ToBytes[E any](src []E) []byte

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func (*Adapter) EnumerateFeatures

func (p *Adapter) EnumerateFeatures() []FeatureName

func (*Adapter) GetInfo

func (p *Adapter) GetInfo() AdapterInfo

func (*Adapter) GetLimits

func (p *Adapter) GetLimits() SupportedLimits

func (*Adapter) HasFeature

func (p *Adapter) HasFeature(feature FeatureName) bool

func (*Adapter) Release

func (p *Adapter) Release()

func (*Adapter) RequestDevice

func (p *Adapter) RequestDevice(descriptor *DeviceDescriptor) (*Device, error)

type AdapterInfo

type AdapterInfo struct {
	VendorId          uint32
	VendorName        string
	Architecture      string
	DeviceId          uint32
	Name              string
	DriverDescription string
	AdapterType       AdapterType
	BackendType       BackendType
}

type AdapterType

type AdapterType uint32
const (
	AdapterTypeDiscreteGPU   AdapterType = 0x00000000
	AdapterTypeIntegratedGPU AdapterType = 0x00000001
	AdapterTypeCPU           AdapterType = 0x00000002
	AdapterTypeUnknown       AdapterType = 0x00000003
)

func (AdapterType) String

func (v AdapterType) String() string

type AddressMode

type AddressMode uint32
const (
	AddressModeRepeat       AddressMode = 0x00000000
	AddressModeMirrorRepeat AddressMode = 0x00000001
	AddressModeClampToEdge  AddressMode = 0x00000002
)

func (AddressMode) String

func (v AddressMode) String() string

type BackendType

type BackendType uint32
const (
	BackendTypeUndefined BackendType = 0x00000000
	BackendTypeNull      BackendType = 0x00000001
	BackendTypeWebGPU    BackendType = 0x00000002
	BackendTypeD3D11     BackendType = 0x00000003
	BackendTypeD3D12     BackendType = 0x00000004
	BackendTypeMetal     BackendType = 0x00000005
	BackendTypeVulkan    BackendType = 0x00000006
	BackendTypeOpenGL    BackendType = 0x00000007
	BackendTypeOpenGLES  BackendType = 0x00000008
)

func (BackendType) String

func (v BackendType) String() string

type BindGroup

type BindGroup struct {
	// contains filtered or unexported fields
}

func (*BindGroup) Release

func (p *BindGroup) Release()

type BindGroupDescriptor

type BindGroupDescriptor struct {
	Label   string
	Layout  *BindGroupLayout
	Entries []BindGroupEntry
}

BindGroupDescriptor as described: https://gpuweb.github.io/gpuweb/#dictdef-gpubindgroupdescriptor

type BindGroupEntry

type BindGroupEntry struct {
	Binding     uint32
	Buffer      *Buffer
	Offset      uint64
	Size        uint64
	Sampler     *Sampler
	TextureView *TextureView
}

BindGroupEntry as described: https://gpuweb.github.io/gpuweb/#dictdef-gpubindgroupentry

type BindGroupLayout

type BindGroupLayout struct {
	// contains filtered or unexported fields
}

func (*BindGroupLayout) Release

func (p *BindGroupLayout) Release()

type BindGroupLayoutDescriptor

type BindGroupLayoutDescriptor struct {
	Label   string
	Entries []BindGroupLayoutEntry
}

BindGroupLayoutDescriptor as described: https://gpuweb.github.io/gpuweb/#dictdef-gpubindgrouplayoutdescriptor

type BindGroupLayoutEntry

type BindGroupLayoutEntry struct {
	Binding        uint32
	Visibility     ShaderStage
	Buffer         BufferBindingLayout
	Sampler        SamplerBindingLayout
	Texture        TextureBindingLayout
	StorageTexture StorageTextureBindingLayout
}

type BlendComponent

type BlendComponent struct {
	Operation BlendOperation
	SrcFactor BlendFactor
	DstFactor BlendFactor
}

type BlendFactor

type BlendFactor uint32
const (
	BlendFactorZero              BlendFactor = 0x00000000
	BlendFactorOne               BlendFactor = 0x00000001
	BlendFactorSrc               BlendFactor = 0x00000002
	BlendFactorOneMinusSrc       BlendFactor = 0x00000003
	BlendFactorSrcAlpha          BlendFactor = 0x00000004
	BlendFactorOneMinusSrcAlpha  BlendFactor = 0x00000005
	BlendFactorDst               BlendFactor = 0x00000006
	BlendFactorOneMinusDst       BlendFactor = 0x00000007
	BlendFactorDstAlpha          BlendFactor = 0x00000008
	BlendFactorOneMinusDstAlpha  BlendFactor = 0x00000009
	BlendFactorSrcAlphaSaturated BlendFactor = 0x0000000A
	BlendFactorConstant          BlendFactor = 0x0000000B
	BlendFactorOneMinusConstant  BlendFactor = 0x0000000C
)

func (BlendFactor) String

func (v BlendFactor) String() string

type BlendOperation

type BlendOperation uint32
const (
	BlendOperationAdd             BlendOperation = 0x00000000
	BlendOperationSubtract        BlendOperation = 0x00000001
	BlendOperationReverseSubtract BlendOperation = 0x00000002
	BlendOperationMin             BlendOperation = 0x00000003
	BlendOperationMax             BlendOperation = 0x00000004
)

func (BlendOperation) String

func (v BlendOperation) String() string

type BlendState

type BlendState struct {
	Color BlendComponent
	Alpha BlendComponent
}

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func (*Buffer) Destroy

func (p *Buffer) Destroy()

func (*Buffer) GetMappedRange

func (p *Buffer) GetMappedRange(offset, size uint) []byte

func (*Buffer) GetSize

func (p *Buffer) GetSize() uint64

func (*Buffer) GetUsage

func (p *Buffer) GetUsage() BufferUsage

func (*Buffer) MapAsync

func (p *Buffer) MapAsync(mode MapMode, offset uint64, size uint64, callback BufferMapCallback) (err error)

func (*Buffer) Release

func (p *Buffer) Release()

func (*Buffer) Unmap

func (p *Buffer) Unmap() (err error)

type BufferBindingLayout

type BufferBindingLayout struct {
	Type             BufferBindingType
	HasDynamicOffset bool
	MinBindingSize   uint64
}

type BufferBindingType

type BufferBindingType uint32
const (
	BufferBindingTypeUndefined       BufferBindingType = 0x00000000
	BufferBindingTypeUniform         BufferBindingType = 0x00000001
	BufferBindingTypeStorage         BufferBindingType = 0x00000002
	BufferBindingTypeReadOnlyStorage BufferBindingType = 0x00000003
)

func (BufferBindingType) String

func (v BufferBindingType) String() string

type BufferDescriptor

type BufferDescriptor struct {
	Label            string
	Usage            BufferUsage
	Size             uint64
	MappedAtCreation bool
}

BufferDescriptor as described: https://gpuweb.github.io/gpuweb/#gpubufferdescriptor

type BufferInitDescriptor

type BufferInitDescriptor struct {
	Label    string
	Contents []byte
	Usage    BufferUsage
}

type BufferMapAsyncStatus

type BufferMapAsyncStatus uint32
const (
	BufferMapAsyncStatusSuccess                 BufferMapAsyncStatus = 0x00000000
	BufferMapAsyncStatusValidationError         BufferMapAsyncStatus = 0x00000001
	BufferMapAsyncStatusUnknown                 BufferMapAsyncStatus = 0x00000002
	BufferMapAsyncStatusDeviceLost              BufferMapAsyncStatus = 0x00000003
	BufferMapAsyncStatusDestroyedBeforeCallback BufferMapAsyncStatus = 0x00000004
	BufferMapAsyncStatusUnmappedBeforeCallback  BufferMapAsyncStatus = 0x00000005
	BufferMapAsyncStatusMappingAlreadyPending   BufferMapAsyncStatus = 0x00000006
	BufferMapAsyncStatusOffsetOutOfRange        BufferMapAsyncStatus = 0x00000007
	BufferMapAsyncStatusSizeOutOfRange          BufferMapAsyncStatus = 0x00000008
)

func (BufferMapAsyncStatus) String

func (v BufferMapAsyncStatus) String() string

type BufferMapCallback

type BufferMapCallback func(BufferMapAsyncStatus)

type BufferMapState

type BufferMapState uint32
const (
	BufferMapStateUnmapped BufferMapState = 0x00000000
	BufferMapStatePending  BufferMapState = 0x00000001
	BufferMapStateMapped   BufferMapState = 0x00000002
)

func (BufferMapState) String

func (v BufferMapState) String() string

type BufferUsage

type BufferUsage uint32
const (
	BufferUsageNone         BufferUsage = 0x00000000
	BufferUsageMapRead      BufferUsage = 0x00000001
	BufferUsageMapWrite     BufferUsage = 0x00000002
	BufferUsageCopySrc      BufferUsage = 0x00000004
	BufferUsageCopyDst      BufferUsage = 0x00000008
	BufferUsageIndex        BufferUsage = 0x00000010
	BufferUsageVertex       BufferUsage = 0x00000020
	BufferUsageUniform      BufferUsage = 0x00000040
	BufferUsageStorage      BufferUsage = 0x00000080
	BufferUsageIndirect     BufferUsage = 0x00000100
	BufferUsageQueryResolve BufferUsage = 0x00000200
)

func (BufferUsage) String

func (v BufferUsage) String() string

type Color

type Color struct {
	R, G, B, A float64
}

Color as described: https://gpuweb.github.io/gpuweb/#typedefdef-gpucolor

type ColorTargetState

type ColorTargetState struct {
	Format    TextureFormat
	Blend     *BlendState
	WriteMask ColorWriteMask
}

type ColorWriteMask

type ColorWriteMask uint32
const (
	ColorWriteMaskNone  ColorWriteMask = 0x00000000
	ColorWriteMaskRed   ColorWriteMask = 0x00000001
	ColorWriteMaskGreen ColorWriteMask = 0x00000002
	ColorWriteMaskBlue  ColorWriteMask = 0x00000004
	ColorWriteMaskAlpha ColorWriteMask = 0x00000008
	ColorWriteMaskAll   ColorWriteMask = 0x0000000F
)

func (ColorWriteMask) String

func (v ColorWriteMask) String() string

type CommandBuffer

type CommandBuffer struct {
	// contains filtered or unexported fields
}

func (*CommandBuffer) Release

func (p *CommandBuffer) Release()

type CommandBufferDescriptor

type CommandBufferDescriptor struct {
	Label string
}

type CommandEncoder

type CommandEncoder struct {
	// contains filtered or unexported fields
}

func (*CommandEncoder) BeginComputePass

func (p *CommandEncoder) BeginComputePass(descriptor *ComputePassDescriptor) *ComputePassEncoder

func (*CommandEncoder) BeginRenderPass

func (p *CommandEncoder) BeginRenderPass(descriptor *RenderPassDescriptor) *RenderPassEncoder

func (*CommandEncoder) ClearBuffer

func (p *CommandEncoder) ClearBuffer(buffer *Buffer, offset uint64, size uint64) (err error)

func (*CommandEncoder) CopyBufferToBuffer

func (p *CommandEncoder) CopyBufferToBuffer(source *Buffer, sourceOffset uint64, destination *Buffer, destinatonOffset uint64, size uint64) (err error)

func (*CommandEncoder) CopyBufferToTexture

func (p *CommandEncoder) CopyBufferToTexture(source *ImageCopyBuffer, destination *ImageCopyTexture, copySize *Extent3D) (err error)

func (*CommandEncoder) CopyTextureToBuffer

func (p *CommandEncoder) CopyTextureToBuffer(source *ImageCopyTexture, destination *ImageCopyBuffer, copySize *Extent3D) (err error)

func (*CommandEncoder) CopyTextureToTexture

func (p *CommandEncoder) CopyTextureToTexture(source *ImageCopyTexture, destination *ImageCopyTexture, copySize *Extent3D) (err error)

func (*CommandEncoder) Finish

func (p *CommandEncoder) Finish(descriptor *CommandBufferDescriptor) (*CommandBuffer, error)

func (*CommandEncoder) InsertDebugMarker

func (p *CommandEncoder) InsertDebugMarker(markerLabel string) (err error)

func (*CommandEncoder) PopDebugGroup

func (p *CommandEncoder) PopDebugGroup() (err error)

func (*CommandEncoder) PushDebugGroup

func (p *CommandEncoder) PushDebugGroup(groupLabel string) (err error)

func (*CommandEncoder) Release

func (p *CommandEncoder) Release()

func (*CommandEncoder) ResolveQuerySet

func (p *CommandEncoder) ResolveQuerySet(querySet *QuerySet, firstQuery uint32, queryCount uint32, destination *Buffer, destinationOffset uint64) (err error)

func (*CommandEncoder) WriteTimestamp

func (p *CommandEncoder) WriteTimestamp(querySet *QuerySet, queryIndex uint32) (err error)

type CommandEncoderDescriptor

type CommandEncoderDescriptor struct {
	Label string
}

type CompareFunction

type CompareFunction uint32
const (
	CompareFunctionUndefined    CompareFunction = 0x00000000
	CompareFunctionNever        CompareFunction = 0x00000001
	CompareFunctionLess         CompareFunction = 0x00000002
	CompareFunctionLessEqual    CompareFunction = 0x00000003
	CompareFunctionGreater      CompareFunction = 0x00000004
	CompareFunctionGreaterEqual CompareFunction = 0x00000005
	CompareFunctionEqual        CompareFunction = 0x00000006
	CompareFunctionNotEqual     CompareFunction = 0x00000007
	CompareFunctionAlways       CompareFunction = 0x00000008
)

func (CompareFunction) String

func (v CompareFunction) String() string

type CompilationInfoRequestStatus

type CompilationInfoRequestStatus uint32
const (
	CompilationInfoRequestStatusSuccess    CompilationInfoRequestStatus = 0x00000000
	CompilationInfoRequestStatusError      CompilationInfoRequestStatus = 0x00000001
	CompilationInfoRequestStatusDeviceLost CompilationInfoRequestStatus = 0x00000002
	CompilationInfoRequestStatusUnknown    CompilationInfoRequestStatus = 0x00000003
)

func (CompilationInfoRequestStatus) String

type CompilationMessageType

type CompilationMessageType uint32
const (
	CompilationMessageTypeError   CompilationMessageType = 0x00000000
	CompilationMessageTypeWarning CompilationMessageType = 0x00000001
	CompilationMessageTypeInfo    CompilationMessageType = 0x00000002
)

func (CompilationMessageType) String

func (v CompilationMessageType) String() string

type CompositeAlphaMode

type CompositeAlphaMode uint32
const (
	CompositeAlphaModeAuto            CompositeAlphaMode = 0x00000000
	CompositeAlphaModeOpaque          CompositeAlphaMode = 0x00000001
	CompositeAlphaModePremultiplied   CompositeAlphaMode = 0x00000002
	CompositeAlphaModeUnpremultiplied CompositeAlphaMode = 0x00000003
	CompositeAlphaModeInherit         CompositeAlphaMode = 0x00000004
)

func (CompositeAlphaMode) String

func (v CompositeAlphaMode) String() string

type ComputePassDescriptor

type ComputePassDescriptor struct {
	Label string
}

type ComputePassEncoder

type ComputePassEncoder struct {
	// contains filtered or unexported fields
}

func (*ComputePassEncoder) BeginPipelineStatisticsQuery

func (p *ComputePassEncoder) BeginPipelineStatisticsQuery(querySet *QuerySet, queryIndex uint32)

func (*ComputePassEncoder) DispatchWorkgroups

func (p *ComputePassEncoder) DispatchWorkgroups(workgroupCountX, workgroupCountY, workgroupCountZ uint32)

func (*ComputePassEncoder) DispatchWorkgroupsIndirect

func (p *ComputePassEncoder) DispatchWorkgroupsIndirect(indirectBuffer *Buffer, indirectOffset uint64)

func (*ComputePassEncoder) End

func (p *ComputePassEncoder) End() (err error)

func (*ComputePassEncoder) EndPipelineStatisticsQuery

func (p *ComputePassEncoder) EndPipelineStatisticsQuery()

func (*ComputePassEncoder) InsertDebugMarker

func (p *ComputePassEncoder) InsertDebugMarker(markerLabel string)

func (*ComputePassEncoder) PopDebugGroup

func (p *ComputePassEncoder) PopDebugGroup()

func (*ComputePassEncoder) PushDebugGroup

func (p *ComputePassEncoder) PushDebugGroup(groupLabel string)

func (*ComputePassEncoder) Release

func (p *ComputePassEncoder) Release()

func (*ComputePassEncoder) SetBindGroup

func (p *ComputePassEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)

func (*ComputePassEncoder) SetPipeline

func (p *ComputePassEncoder) SetPipeline(pipeline *ComputePipeline)

type ComputePipeline

type ComputePipeline struct {
	// contains filtered or unexported fields
}

func (*ComputePipeline) GetBindGroupLayout

func (p *ComputePipeline) GetBindGroupLayout(groupIndex uint32) *BindGroupLayout

func (*ComputePipeline) Release

func (p *ComputePipeline) Release()

type ComputePipelineDescriptor

type ComputePipelineDescriptor struct {
	Label   string
	Layout  *PipelineLayout
	Compute ProgrammableStageDescriptor
}

type ConstantEntry

type ConstantEntry struct {
	Key   string
	Value float64
}

type CreatePipelineAsyncStatus

type CreatePipelineAsyncStatus uint32
const (
	CreatePipelineAsyncStatusSuccess         CreatePipelineAsyncStatus = 0x00000000
	CreatePipelineAsyncStatusValidationError CreatePipelineAsyncStatus = 0x00000001
	CreatePipelineAsyncStatusInternalError   CreatePipelineAsyncStatus = 0x00000002
	CreatePipelineAsyncStatusDeviceLost      CreatePipelineAsyncStatus = 0x00000003
	CreatePipelineAsyncStatusDeviceDestroyed CreatePipelineAsyncStatus = 0x00000004
	CreatePipelineAsyncStatusUnknown         CreatePipelineAsyncStatus = 0x00000005
)

func (CreatePipelineAsyncStatus) String

func (v CreatePipelineAsyncStatus) String() string

type CullMode

type CullMode uint32
const (
	CullModeNone  CullMode = 0x00000000
	CullModeFront CullMode = 0x00000001
	CullModeBack  CullMode = 0x00000002
)

func (CullMode) String

func (v CullMode) String() string

type DepthStencilState

type DepthStencilState struct {
	Format              TextureFormat
	DepthWriteEnabled   bool
	DepthCompare        CompareFunction
	StencilFront        StencilFaceState
	StencilBack         StencilFaceState
	StencilReadMask     uint32
	StencilWriteMask    uint32
	DepthBias           int32
	DepthBiasSlopeScale float32
	DepthBiasClamp      float32
}

type Device

type Device struct {
	// contains filtered or unexported fields
}

func (*Device) CreateBindGroup

func (p *Device) CreateBindGroup(descriptor *BindGroupDescriptor) (*BindGroup, error)

func (*Device) CreateBindGroupLayout

func (p *Device) CreateBindGroupLayout(descriptor *BindGroupLayoutDescriptor) (*BindGroupLayout, error)

func (*Device) CreateBuffer

func (p *Device) CreateBuffer(descriptor *BufferDescriptor) (*Buffer, error)

func (*Device) CreateBufferInit

func (p *Device) CreateBufferInit(descriptor *BufferInitDescriptor) (*Buffer, error)

func (*Device) CreateCommandEncoder

func (p *Device) CreateCommandEncoder(descriptor *CommandEncoderDescriptor) (*CommandEncoder, error)

func (*Device) CreateComputePipeline

func (p *Device) CreateComputePipeline(descriptor *ComputePipelineDescriptor) (*ComputePipeline, error)

func (*Device) CreatePipelineLayout

func (p *Device) CreatePipelineLayout(descriptor *PipelineLayoutDescriptor) (*PipelineLayout, error)

func (*Device) CreateQuerySet

func (p *Device) CreateQuerySet(descriptor *QuerySetDescriptor) (*QuerySet, error)

func (*Device) CreateRenderBundleEncoder

func (p *Device) CreateRenderBundleEncoder(descriptor *RenderBundleEncoderDescriptor) (*RenderBundleEncoder, error)

func (*Device) CreateRenderPipeline

func (p *Device) CreateRenderPipeline(descriptor *RenderPipelineDescriptor) (*RenderPipeline, error)

func (*Device) CreateSampler

func (p *Device) CreateSampler(descriptor *SamplerDescriptor) (*Sampler, error)

func (*Device) CreateShaderModule

func (p *Device) CreateShaderModule(descriptor *ShaderModuleDescriptor) (*ShaderModule, error)

func (*Device) CreateTexture

func (p *Device) CreateTexture(descriptor *TextureDescriptor) (*Texture, error)

func (*Device) EnumerateFeatures

func (p *Device) EnumerateFeatures() []FeatureName

func (*Device) GetLimits

func (p *Device) GetLimits() SupportedLimits

func (*Device) GetQueue

func (p *Device) GetQueue() *Queue

func (*Device) HasFeature

func (p *Device) HasFeature(feature FeatureName) bool

func (*Device) Poll

func (p *Device) Poll(wait bool, wrappedSubmissionIndex *WrappedSubmissionIndex) (queueEmpty bool)

func (*Device) Release

func (p *Device) Release()

type DeviceDescriptor

type DeviceDescriptor struct {
	Label              string
	RequiredFeatures   []FeatureName
	RequiredLimits     *RequiredLimits
	DeviceLostCallback DeviceLostCallback
	TracePath          string
}

type DeviceLostCallback

type DeviceLostCallback func(reason DeviceLostReason, message string)

type DeviceLostReason

type DeviceLostReason uint32
const (
	DeviceLostReasonUnknown   DeviceLostReason = 0x00000001
	DeviceLostReasonDestroyed DeviceLostReason = 0x00000002
)

func (DeviceLostReason) String

func (v DeviceLostReason) String() string

type Dx12Compiler

type Dx12Compiler uint32
const (
	Dx12CompilerUndefined Dx12Compiler = 0x00000000
	Dx12CompilerFxc       Dx12Compiler = 0x00000001
	Dx12CompilerDxc       Dx12Compiler = 0x00000002
)

func (Dx12Compiler) String

func (v Dx12Compiler) String() string

type Error

type Error struct {
	Type    ErrorType
	Message string
}

func (*Error) Error

func (v *Error) Error() string

type ErrorFilter

type ErrorFilter uint32
const (
	ErrorFilterValidation  ErrorFilter = 0x00000000
	ErrorFilterOutOfMemory ErrorFilter = 0x00000001
	ErrorFilterInternal    ErrorFilter = 0x00000002
)

func (ErrorFilter) String

func (v ErrorFilter) String() string

type ErrorType

type ErrorType uint32
const (
	ErrorTypeNoError     ErrorType = 0x00000000
	ErrorTypeValidation  ErrorType = 0x00000001
	ErrorTypeOutOfMemory ErrorType = 0x00000002
	ErrorTypeInternal    ErrorType = 0x00000003
	ErrorTypeUnknown     ErrorType = 0x00000004
	ErrorTypeDeviceLost  ErrorType = 0x00000005
)

func (ErrorType) String

func (v ErrorType) String() string

type Extent3D

type Extent3D struct {
	Width              uint32
	Height             uint32
	DepthOrArrayLayers uint32
}

type FeatureName

type FeatureName uint32
const (
	FeatureNameUndefined                                               FeatureName = 0x00000000
	FeatureNameDepthClipControl                                        FeatureName = 0x00000001
	FeatureNameDepth32FloatStencil8                                    FeatureName = 0x00000002
	FeatureNameTimestampQuery                                          FeatureName = 0x00000003
	FeatureNameTextureCompressionBC                                    FeatureName = 0x00000004
	FeatureNameTextureCompressionETC2                                  FeatureName = 0x00000005
	FeatureNameTextureCompressionASTC                                  FeatureName = 0x00000006
	FeatureNameIndirectFirstInstance                                   FeatureName = 0x00000007
	FeatureNameShaderF16                                               FeatureName = 0x00000008
	FeatureNameRG11B10UfloatRenderable                                 FeatureName = 0x00000009
	FeatureNameBGRA8UnormStorage                                       FeatureName = 0x0000000A
	FeatureNameFloat32Filterable                                       FeatureName = 0x0000000B
	NativeFeaturePushConstants                                         FeatureName = 0x00030001
	NativeFeatureTextureAdapterSpecificFormatFeatures                  FeatureName = 0x00030002
	NativeFeatureMultiDrawIndirect                                     FeatureName = 0x00030003
	NativeFeatureMultiDrawIndirectCount                                FeatureName = 0x00030004
	NativeFeatureVertexWritableStorage                                 FeatureName = 0x00030005
	NativeFeatureTextureBindingArray                                   FeatureName = 0x00030006
	NativeFeatureSampledTextureAndStorageBufferArrayNonUniformIndexing FeatureName = 0x00030007
	NativeFeaturePipelineStatisticsQuery                               FeatureName = 0x00030008
	NativeFeatureStorageResourceBindingArray                           FeatureName = 0x00030009
	NativeFeaturePartiallyBoundBindingArray                            FeatureName = 0x0003000A
	NativeFeatureTextureFormat16bitNorm                                FeatureName = 0x0003000B
	NativeFeatureTextureCompressionAstcHdr                             FeatureName = 0x0003000C
	NativeFeatureMappablePrimaryBuffers                                FeatureName = 0x0003000E
	NativeFeatureBufferBindingArray                                    FeatureName = 0x0003000F
	NativeFeatureUniformBufferAndStorageTextureArrayNonUniformIndexing FeatureName = 0x00030010
	NativeFeatureVertexAttribute64bit                                  FeatureName = 0x00030019
	NativeFeatureShaderUnusedVertexOutput                              FeatureName = 0x0003001A
	NativeFeatureTextureFormatNv12                                     FeatureName = 0x0003001B
	NativeFeatureRayTracingAccelerationStructure                       FeatureName = 0x0003001C
	NativeFeatureRayQuery                                              FeatureName = 0x0003001D
	NativeFeatureShaderF64                                             FeatureName = 0x0003001E
	NativeFeatureShaderI16                                             FeatureName = 0x0003001F
	NativeFeatureShaderPrimitiveIndex                                  FeatureName = 0x00030020
	NativeFeatureShaderEarlyDepthTest                                  FeatureName = 0x00030021
)

func (FeatureName) String

func (v FeatureName) String() string

type FilterMode

type FilterMode uint32
const (
	FilterModeNearest FilterMode = 0x00000000
	FilterModeLinear  FilterMode = 0x00000001
)

func (FilterMode) String

func (v FilterMode) String() string

type FragmentState

type FragmentState struct {
	Module     *ShaderModule
	EntryPoint string
	Targets    []ColorTargetState
}

type FrontFace

type FrontFace uint32
const (
	FrontFaceCCW FrontFace = 0x00000000
	FrontFaceCW  FrontFace = 0x00000001
)

func (FrontFace) String

func (v FrontFace) String() string

type Gles3MinorVersion

type Gles3MinorVersion uint32
const (
	Gles3MinorVersionAutomatic Gles3MinorVersion = 0x00000000
	Gles3MinorVersionVersion0  Gles3MinorVersion = 0x00000001
	Gles3MinorVersionVersion1  Gles3MinorVersion = 0x00000002
	Gles3MinorVersionVersion2  Gles3MinorVersion = 0x00000003
)

func (Gles3MinorVersion) String

func (v Gles3MinorVersion) String() string

type GlobalReport

type GlobalReport struct {
	Surfaces RegistryReport
	Vulkan   *HubReport
	Metal    *HubReport
	Dx12     *HubReport
	Dx11     *HubReport
	Gl       *HubReport
}

type HubReport

type HubReport struct {
	Adapters         RegistryReport
	Devices          RegistryReport
	PipelineLayouts  RegistryReport
	ShaderModules    RegistryReport
	BindGroupLayouts RegistryReport
	BindGroups       RegistryReport
	CommandBuffers   RegistryReport
	RenderBundles    RegistryReport
	RenderPipelines  RegistryReport
	ComputePipelines RegistryReport
	QuerySets        RegistryReport
	Buffers          RegistryReport
	Textures         RegistryReport
	TextureViews     RegistryReport
	Samplers         RegistryReport
}

type ImageCopyBuffer

type ImageCopyBuffer struct {
	Layout TextureDataLayout
	Buffer *Buffer
}

type ImageCopyTexture

type ImageCopyTexture struct {
	Texture  *Texture
	MipLevel uint32
	Origin   Origin3D
	Aspect   TextureAspect
}

type IndexFormat

type IndexFormat uint32
const (
	IndexFormatUndefined IndexFormat = 0x00000000
	IndexFormatUint16    IndexFormat = 0x00000001
	IndexFormatUint32    IndexFormat = 0x00000002
)

func (IndexFormat) String

func (v IndexFormat) String() string

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

func CreateInstance

func CreateInstance(descriptor *InstanceDescriptor) *Instance

func (*Instance) CreateSurface

func (p *Instance) CreateSurface(descriptor *SurfaceDescriptor) *Surface

func (*Instance) EnumerateAdapters

func (p *Instance) EnumerateAdapters(options *InstanceEnumerateAdapterOptons) []*Adapter

func (*Instance) GenerateReport

func (p *Instance) GenerateReport() GlobalReport

func (*Instance) Release

func (p *Instance) Release()

func (*Instance) RequestAdapter

func (p *Instance) RequestAdapter(options *RequestAdapterOptions) (*Adapter, error)

type InstanceBackend

type InstanceBackend uint32
const (
	InstanceBackendAll           InstanceBackend = 0x00000000
	InstanceBackendVulkan        InstanceBackend = 0x00000001
	InstanceBackendGL            InstanceBackend = 0x00000002
	InstanceBackendMetal         InstanceBackend = 0x00000004
	InstanceBackendDX12          InstanceBackend = 0x00000008
	InstanceBackendDX11          InstanceBackend = 0x00000010
	InstanceBackendSecondary     InstanceBackend = 0x00000012
	InstanceBackendBrowserWebGPU InstanceBackend = 0x00000020
	InstanceBackendPrimary       InstanceBackend = 0x0000002D
)

func (InstanceBackend) String

func (v InstanceBackend) String() string

type InstanceDescriptor

type InstanceDescriptor struct {
	Backends           InstanceBackend
	Dx12ShaderCompiler Dx12Compiler
	DxilPath           string
	DxcPath            string
}

type InstanceEnumerateAdapterOptons

type InstanceEnumerateAdapterOptons struct {
	Backends InstanceBackend
}

type InstanceFlag

type InstanceFlag uint32
const (
	InstanceFlagDefault          InstanceFlag = 0x00000000
	InstanceFlagDebug            InstanceFlag = 0x00000001
	InstanceFlagValidation       InstanceFlag = 0x00000002
	InstanceFlagDiscardHalLabels InstanceFlag = 0x00000004
)

func (InstanceFlag) String

func (v InstanceFlag) String() string

type Limits

type Limits struct {
	MaxTextureDimension1D                     uint32
	MaxTextureDimension2D                     uint32
	MaxTextureDimension3D                     uint32
	MaxTextureArrayLayers                     uint32
	MaxBindGroups                             uint32
	MaxBindingsPerBindGroup                   uint32
	MaxDynamicUniformBuffersPerPipelineLayout uint32
	MaxDynamicStorageBuffersPerPipelineLayout uint32
	MaxSampledTexturesPerShaderStage          uint32
	MaxSamplersPerShaderStage                 uint32
	MaxStorageBuffersPerShaderStage           uint32
	MaxStorageTexturesPerShaderStage          uint32
	MaxUniformBuffersPerShaderStage           uint32
	MaxUniformBufferBindingSize               uint64
	MaxStorageBufferBindingSize               uint64
	MinUniformBufferOffsetAlignment           uint32
	MinStorageBufferOffsetAlignment           uint32
	MaxVertexBuffers                          uint32
	MaxBufferSize                             uint64
	MaxVertexAttributes                       uint32
	MaxVertexBufferArrayStride                uint32
	MaxInterStageShaderComponents             uint32
	MaxInterStageShaderVariables              uint32
	MaxColorAttachments                       uint32
	MaxColorAttachmentBytesPerSample          uint32
	MaxComputeWorkgroupStorageSize            uint32
	MaxComputeInvocationsPerWorkgroup         uint32
	MaxComputeWorkgroupSizeX                  uint32
	MaxComputeWorkgroupSizeY                  uint32
	MaxComputeWorkgroupSizeZ                  uint32
	MaxComputeWorkgroupsPerDimension          uint32

	MaxPushConstantSize uint32
}

func DefaultLimits

func DefaultLimits() Limits

type LoadOp

type LoadOp uint32
const (
	LoadOpUndefined LoadOp = 0x00000000
	LoadOpClear     LoadOp = 0x00000001
	LoadOpLoad      LoadOp = 0x00000002
)

func (LoadOp) String

func (v LoadOp) String() string

type LogLevel

type LogLevel uint32
const (
	LogLevelOff   LogLevel = 0x00000000
	LogLevelError LogLevel = 0x00000001
	LogLevelWarn  LogLevel = 0x00000002
	LogLevelInfo  LogLevel = 0x00000003
	LogLevelDebug LogLevel = 0x00000004
	LogLevelTrace LogLevel = 0x00000005
)

func (LogLevel) String

func (v LogLevel) String() string

type MapMode

type MapMode uint32
const (
	MapModeNone  MapMode = 0x00000000
	MapModeRead  MapMode = 0x00000001
	MapModeWrite MapMode = 0x00000002
)

func (MapMode) String

func (v MapMode) String() string

type MipmapFilterMode

type MipmapFilterMode uint32
const (
	MipmapFilterModeNearest MipmapFilterMode = 0x00000000
	MipmapFilterModeLinear  MipmapFilterMode = 0x00000001
)

func (MipmapFilterMode) String

func (v MipmapFilterMode) String() string

type MultisampleState

type MultisampleState struct {
	Count                  uint32
	Mask                   uint32
	AlphaToCoverageEnabled bool
}

type NativeQueryType

type NativeQueryType uint32
const NativeQueryTypePipelineStatistics NativeQueryType = 0x00030000

func (NativeQueryType) String

func (v NativeQueryType) String() string

type NativeTextureFormat

type NativeTextureFormat uint32
const (
	NativeTextureFormatR16Unorm    NativeTextureFormat = 0x00030001
	NativeTextureFormatR16Snorm    NativeTextureFormat = 0x00030002
	NativeTextureFormatRg16Unorm   NativeTextureFormat = 0x00030003
	NativeTextureFormatRg16Snorm   NativeTextureFormat = 0x00030004
	NativeTextureFormatRgba16Unorm NativeTextureFormat = 0x00030005
	NativeTextureFormatRgba16Snorm NativeTextureFormat = 0x00030006
	NativeTextureFormatNV12        NativeTextureFormat = 0x00030007
)

func (NativeTextureFormat) String

func (v NativeTextureFormat) String() string

type Origin3D

type Origin3D struct {
	X, Y, Z uint32
}

type PipelineLayout

type PipelineLayout struct {
	// contains filtered or unexported fields
}

func (*PipelineLayout) Release

func (p *PipelineLayout) Release()

type PipelineLayoutDescriptor

type PipelineLayoutDescriptor struct {
	Label              string
	BindGroupLayouts   []*BindGroupLayout
	PushConstantRanges []PushConstantRange
}

type PipelineStatisticName

type PipelineStatisticName uint32
const (
	PipelineStatisticNameVertexShaderInvocations   PipelineStatisticName = 0x00000000
	PipelineStatisticNameClipperInvocations        PipelineStatisticName = 0x00000001
	PipelineStatisticNameClipperPrimitivesOut      PipelineStatisticName = 0x00000002
	PipelineStatisticNameFragmentShaderInvocations PipelineStatisticName = 0x00000003
	PipelineStatisticNameComputeShaderInvocations  PipelineStatisticName = 0x00000004
)

func (PipelineStatisticName) String

func (v PipelineStatisticName) String() string

type PowerPreference

type PowerPreference uint32
const (
	PowerPreferenceUndefined       PowerPreference = 0x00000000
	PowerPreferenceLowPower        PowerPreference = 0x00000001
	PowerPreferenceHighPerformance PowerPreference = 0x00000002
)

func (PowerPreference) String

func (v PowerPreference) String() string

type PresentMode

type PresentMode uint32
const (
	PresentModeFifo        PresentMode = 0x00000000
	PresentModeFifoRelaxed PresentMode = 0x00000001
	PresentModeImmediate   PresentMode = 0x00000002
	PresentModeMailbox     PresentMode = 0x00000003
)

func (PresentMode) String

func (v PresentMode) String() string

type PrimitiveState

type PrimitiveState struct {
	Topology         PrimitiveTopology
	StripIndexFormat IndexFormat
	FrontFace        FrontFace
	CullMode         CullMode
}

type PrimitiveTopology

type PrimitiveTopology uint32
const (
	PrimitiveTopologyPointList     PrimitiveTopology = 0x00000000
	PrimitiveTopologyLineList      PrimitiveTopology = 0x00000001
	PrimitiveTopologyLineStrip     PrimitiveTopology = 0x00000002
	PrimitiveTopologyTriangleList  PrimitiveTopology = 0x00000003
	PrimitiveTopologyTriangleStrip PrimitiveTopology = 0x00000004
)

func (PrimitiveTopology) String

func (v PrimitiveTopology) String() string

type ProgrammableStageDescriptor

type ProgrammableStageDescriptor struct {
	Module     *ShaderModule
	EntryPoint string
}

ProgrammableStageDescriptor as described: https://gpuweb.github.io/gpuweb/#gpuprogrammablestage

type PushConstantRange

type PushConstantRange struct {
	Stages ShaderStage
	Start  uint32
	End    uint32
}

type QuerySet

type QuerySet struct {
	// contains filtered or unexported fields
}

func (*QuerySet) Release

func (p *QuerySet) Release()

type QuerySetDescriptor

type QuerySetDescriptor struct {
	Label              string
	Type               QueryType
	Count              uint32
	PipelineStatistics []PipelineStatisticName
}

type QueryType

type QueryType uint32
const (
	QueryTypeOcclusion QueryType = 0x00000000
	QueryTypeTimestamp QueryType = 0x00000001
)

func (QueryType) String

func (v QueryType) String() string

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func (*Queue) OnSubmittedWorkDone

func (p *Queue) OnSubmittedWorkDone(callback QueueWorkDoneCallback)

func (*Queue) Release

func (p *Queue) Release()

func (*Queue) Submit

func (p *Queue) Submit(commands ...*CommandBuffer) (submissionIndex SubmissionIndex)

func (*Queue) WriteBuffer

func (p *Queue) WriteBuffer(buffer *Buffer, bufferOffset uint64, data []byte) (err error)

func (*Queue) WriteTexture

func (p *Queue) WriteTexture(destination *ImageCopyTexture, data []byte, dataLayout *TextureDataLayout, writeSize *Extent3D) (err error)

type QueueWorkDoneCallback

type QueueWorkDoneCallback func(QueueWorkDoneStatus)

type QueueWorkDoneStatus

type QueueWorkDoneStatus uint32
const (
	QueueWorkDoneStatusSuccess    QueueWorkDoneStatus = 0x00000000
	QueueWorkDoneStatusError      QueueWorkDoneStatus = 0x00000001
	QueueWorkDoneStatusUnknown    QueueWorkDoneStatus = 0x00000002
	QueueWorkDoneStatusDeviceLost QueueWorkDoneStatus = 0x00000003
)

func (QueueWorkDoneStatus) String

func (v QueueWorkDoneStatus) String() string

type RegistryReport

type RegistryReport struct {
	NumAllocated        uint64
	NumKeptFromUser     uint64
	NumReleasedFromUser uint64
	NumError            uint64
	ElementSize         uint64
}

type RenderBundle

type RenderBundle struct {
	// contains filtered or unexported fields
}

func (*RenderBundle) Release

func (p *RenderBundle) Release()

type RenderBundleDescriptor

type RenderBundleDescriptor struct {
	Label string
}

type RenderBundleEncoder

type RenderBundleEncoder struct {
	// contains filtered or unexported fields
}

func (*RenderBundleEncoder) Draw

func (p *RenderBundleEncoder) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)

func (*RenderBundleEncoder) DrawIndexed

func (p *RenderBundleEncoder) DrawIndexed(indexCount, instanceCount, firstIndex, baseVertex, firstInstance uint32)

func (*RenderBundleEncoder) DrawIndexedIndirect

func (p *RenderBundleEncoder) DrawIndexedIndirect(indirectBuffer *Buffer, indirectOffset uint64)

func (*RenderBundleEncoder) DrawIndirect

func (p *RenderBundleEncoder) DrawIndirect(indirectBuffer *Buffer, indirectOffset uint64)

func (*RenderBundleEncoder) Finish

func (*RenderBundleEncoder) InsertDebugMarker

func (p *RenderBundleEncoder) InsertDebugMarker(markerLabel string)

func (*RenderBundleEncoder) PopDebugGroup

func (p *RenderBundleEncoder) PopDebugGroup()

func (*RenderBundleEncoder) PushDebugGroup

func (p *RenderBundleEncoder) PushDebugGroup(groupLabel string)

func (*RenderBundleEncoder) Release

func (p *RenderBundleEncoder) Release()

func (*RenderBundleEncoder) SetBindGroup

func (p *RenderBundleEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)

func (*RenderBundleEncoder) SetIndexBuffer

func (p *RenderBundleEncoder) SetIndexBuffer(buffer *Buffer, format IndexFormat, offset uint64, size uint64)

func (*RenderBundleEncoder) SetPipeline

func (p *RenderBundleEncoder) SetPipeline(pipeline *RenderPipeline)

func (*RenderBundleEncoder) SetVertexBuffer

func (p *RenderBundleEncoder) SetVertexBuffer(slot uint32, buffer *Buffer, offset uint64, size uint64)

type RenderBundleEncoderDescriptor

type RenderBundleEncoderDescriptor struct {
	Label              string
	ColorFormats       []TextureFormat
	DepthStencilFormat TextureFormat
	SampleCount        uint32
	DepthReadOnly      bool
	StencilReadOnly    bool
}

type RenderPassColorAttachment

type RenderPassColorAttachment struct {
	View          *TextureView
	ResolveTarget *TextureView
	LoadOp        LoadOp
	StoreOp       StoreOp
	ClearValue    Color
}

RenderPassColorAttachment as described: https://gpuweb.github.io/gpuweb/#dictdef-gpurenderpasscolorattachment

type RenderPassDepthStencilAttachment

type RenderPassDepthStencilAttachment struct {
	View              *TextureView
	DepthLoadOp       LoadOp
	DepthStoreOp      StoreOp
	DepthClearValue   float32
	DepthReadOnly     bool
	StencilLoadOp     LoadOp
	StencilStoreOp    StoreOp
	StencilClearValue uint32
	StencilReadOnly   bool
}

type RenderPassDescriptor

type RenderPassDescriptor struct {
	Label                  string
	ColorAttachments       []RenderPassColorAttachment
	DepthStencilAttachment *RenderPassDepthStencilAttachment
}

RenderPassDescriptor as described: https://gpuweb.github.io/gpuweb/#dictdef-gpurenderpassdescriptor

type RenderPassEncoder

type RenderPassEncoder struct {
	// contains filtered or unexported fields
}

func (*RenderPassEncoder) BeginOcclusionQuery

func (p *RenderPassEncoder) BeginOcclusionQuery(queryIndex uint32)

func (*RenderPassEncoder) BeginPipelineStatisticsQuery

func (p *RenderPassEncoder) BeginPipelineStatisticsQuery(querySet *QuerySet, queryIndex uint32)

func (*RenderPassEncoder) Draw

func (p *RenderPassEncoder) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)

func (*RenderPassEncoder) DrawIndexed

func (p *RenderPassEncoder) DrawIndexed(indexCount uint32, instanceCount uint32, firstIndex uint32, baseVertex int32, firstInstance uint32)

func (*RenderPassEncoder) DrawIndexedIndirect

func (p *RenderPassEncoder) DrawIndexedIndirect(indirectBuffer *Buffer, indirectOffset uint64)

func (*RenderPassEncoder) DrawIndirect

func (p *RenderPassEncoder) DrawIndirect(indirectBuffer *Buffer, indirectOffset uint64)

func (*RenderPassEncoder) End

func (p *RenderPassEncoder) End() (err error)

func (*RenderPassEncoder) EndOcclusionQuery

func (p *RenderPassEncoder) EndOcclusionQuery()

func (*RenderPassEncoder) EndPipelineStatisticsQuery

func (p *RenderPassEncoder) EndPipelineStatisticsQuery()

func (*RenderPassEncoder) ExecuteBundles

func (p *RenderPassEncoder) ExecuteBundles(bundles ...*RenderBundle)

func (*RenderPassEncoder) InsertDebugMarker

func (p *RenderPassEncoder) InsertDebugMarker(markerLabel string)

func (*RenderPassEncoder) MultiDrawIndexedIndirect

func (p *RenderPassEncoder) MultiDrawIndexedIndirect(encoder *RenderPassEncoder, buffer Buffer, offset uint64, count uint32)

func (*RenderPassEncoder) MultiDrawIndexedIndirectCount

func (p *RenderPassEncoder) MultiDrawIndexedIndirectCount(encoder *RenderPassEncoder, buffer Buffer, offset uint64, countBuffer Buffer, countBufferOffset uint64, maxCount uint32)

func (*RenderPassEncoder) MultiDrawIndirect

func (p *RenderPassEncoder) MultiDrawIndirect(encoder *RenderPassEncoder, buffer Buffer, offset uint64, count uint32)

func (*RenderPassEncoder) MultiDrawIndirectCount

func (p *RenderPassEncoder) MultiDrawIndirectCount(encoder *RenderPassEncoder, buffer Buffer, offset uint64, countBuffer Buffer, countBufferOffset uint64, maxCount uint32)

func (*RenderPassEncoder) PopDebugGroup

func (p *RenderPassEncoder) PopDebugGroup()

func (*RenderPassEncoder) PushDebugGroup

func (p *RenderPassEncoder) PushDebugGroup(groupLabel string)

func (*RenderPassEncoder) Release

func (p *RenderPassEncoder) Release()

func (*RenderPassEncoder) SetBindGroup

func (p *RenderPassEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)

func (*RenderPassEncoder) SetBlendConstant

func (p *RenderPassEncoder) SetBlendConstant(color *Color)

func (*RenderPassEncoder) SetIndexBuffer

func (p *RenderPassEncoder) SetIndexBuffer(buffer *Buffer, format IndexFormat, offset uint64, size uint64)

func (*RenderPassEncoder) SetPipeline

func (p *RenderPassEncoder) SetPipeline(pipeline *RenderPipeline)

func (*RenderPassEncoder) SetPushConstants

func (p *RenderPassEncoder) SetPushConstants(stages ShaderStage, offset uint32, data []byte)

func (*RenderPassEncoder) SetScissorRect

func (p *RenderPassEncoder) SetScissorRect(x, y, width, height uint32)

func (*RenderPassEncoder) SetStencilReference

func (p *RenderPassEncoder) SetStencilReference(reference uint32)

func (*RenderPassEncoder) SetVertexBuffer

func (p *RenderPassEncoder) SetVertexBuffer(slot uint32, buffer *Buffer, offset uint64, size uint64)

func (*RenderPassEncoder) SetViewport

func (p *RenderPassEncoder) SetViewport(x, y, width, height, minDepth, maxDepth float32)

type RenderPipeline

type RenderPipeline struct {
	// contains filtered or unexported fields
}

func (*RenderPipeline) GetBindGroupLayout

func (p *RenderPipeline) GetBindGroupLayout(groupIndex uint32) *BindGroupLayout

func (*RenderPipeline) Release

func (p *RenderPipeline) Release()

type RenderPipelineDescriptor

type RenderPipelineDescriptor struct {
	Label        string
	Layout       *PipelineLayout
	Vertex       VertexState
	Primitive    PrimitiveState
	DepthStencil *DepthStencilState
	Multisample  MultisampleState
	Fragment     *FragmentState
}

RenderPipelineDescriptor as described: https://gpuweb.github.io/gpuweb/#dictdef-gpurenderpipelinedescriptor

type RequestAdapterOptions

type RequestAdapterOptions struct {
	CompatibleSurface    *Surface
	PowerPreference      PowerPreference
	ForceFallbackAdapter bool
	BackendType          BackendType
}

RequestAdapterOptions as described: https://gpuweb.github.io/gpuweb/#dictdef-gpurequestadapteroptions

type RequestAdapterStatus

type RequestAdapterStatus uint32
const (
	RequestAdapterStatusSuccess     RequestAdapterStatus = 0x00000000
	RequestAdapterStatusUnavailable RequestAdapterStatus = 0x00000001
	RequestAdapterStatusError       RequestAdapterStatus = 0x00000002
	RequestAdapterStatusUnknown     RequestAdapterStatus = 0x00000003
)

func (RequestAdapterStatus) String

func (v RequestAdapterStatus) String() string

type RequestDeviceStatus

type RequestDeviceStatus uint32
const (
	RequestDeviceStatusSuccess RequestDeviceStatus = 0x00000000
	RequestDeviceStatusError   RequestDeviceStatus = 0x00000001
	RequestDeviceStatusUnknown RequestDeviceStatus = 0x00000002
)

func (RequestDeviceStatus) String

func (v RequestDeviceStatus) String() string

type RequiredLimits

type RequiredLimits struct {
	Limits Limits
}

type Sampler

type Sampler struct {
	// contains filtered or unexported fields
}

func (*Sampler) Release

func (p *Sampler) Release()

type SamplerBindingLayout

type SamplerBindingLayout struct {
	Type SamplerBindingType
}

type SamplerBindingType

type SamplerBindingType uint32
const (
	SamplerBindingTypeUndefined    SamplerBindingType = 0x00000000
	SamplerBindingTypeFiltering    SamplerBindingType = 0x00000001
	SamplerBindingTypeNonFiltering SamplerBindingType = 0x00000002
	SamplerBindingTypeComparison   SamplerBindingType = 0x00000003
)

func (SamplerBindingType) String

func (v SamplerBindingType) String() string

type SamplerDescriptor

type SamplerDescriptor struct {
	Label         string
	AddressModeU  AddressMode
	AddressModeV  AddressMode
	AddressModeW  AddressMode
	MagFilter     FilterMode
	MinFilter     FilterMode
	MipmapFilter  MipmapFilterMode
	LodMinClamp   float32
	LodMaxClamp   float32
	Compare       CompareFunction
	MaxAnisotropy uint16
}

type ShaderModule

type ShaderModule struct {
	// contains filtered or unexported fields
}

func (*ShaderModule) Release

func (p *ShaderModule) Release()

type ShaderModuleDescriptor

type ShaderModuleDescriptor struct {
	Label           string
	SPIRVDescriptor *ShaderModuleSPIRVDescriptor
	WGSLDescriptor  *ShaderModuleWGSLDescriptor
	GLSLDescriptor  *ShaderModuleGLSLDescriptor
}

type ShaderModuleGLSLDescriptor

type ShaderModuleGLSLDescriptor struct {
	Code        string
	Defines     map[string]string
	ShaderStage ShaderStage
}

type ShaderModuleSPIRVDescriptor

type ShaderModuleSPIRVDescriptor struct {
	Code []byte
}

type ShaderModuleWGSLDescriptor

type ShaderModuleWGSLDescriptor struct {
	Code string
}

type ShaderStage

type ShaderStage uint32
const (
	ShaderStageNone     ShaderStage = 0x00000000
	ShaderStageVertex   ShaderStage = 0x00000001
	ShaderStageFragment ShaderStage = 0x00000002
	ShaderStageCompute  ShaderStage = 0x00000004
)

func (ShaderStage) String

func (v ShaderStage) String() string

type StencilFaceState

type StencilFaceState struct {
	Compare     CompareFunction
	FailOp      StencilOperation
	DepthFailOp StencilOperation
	PassOp      StencilOperation
}

type StencilOperation

type StencilOperation uint32
const (
	StencilOperationKeep           StencilOperation = 0x00000000
	StencilOperationZero           StencilOperation = 0x00000001
	StencilOperationReplace        StencilOperation = 0x00000002
	StencilOperationInvert         StencilOperation = 0x00000003
	StencilOperationIncrementClamp StencilOperation = 0x00000004
	StencilOperationDecrementClamp StencilOperation = 0x00000005
	StencilOperationIncrementWrap  StencilOperation = 0x00000006
	StencilOperationDecrementWrap  StencilOperation = 0x00000007
)

func (StencilOperation) String

func (v StencilOperation) String() string

type StorageTextureAccess

type StorageTextureAccess uint32
const (
	StorageTextureAccessUndefined StorageTextureAccess = 0x00000000
	StorageTextureAccessWriteOnly StorageTextureAccess = 0x00000001
	StorageTextureAccessReadOnly  StorageTextureAccess = 0x00000002
	StorageTextureAccessReadWrite StorageTextureAccess = 0x00000003
)

func (StorageTextureAccess) String

func (v StorageTextureAccess) String() string

type StorageTextureBindingLayout

type StorageTextureBindingLayout struct {
	Access        StorageTextureAccess
	Format        TextureFormat
	ViewDimension TextureViewDimension
}

type StoreOp

type StoreOp uint32
const (
	StoreOpUndefined StoreOp = 0x00000000
	StoreOpStore     StoreOp = 0x00000001
	StoreOpDiscard   StoreOp = 0x00000002
)

func (StoreOp) String

func (v StoreOp) String() string

type SubmissionIndex

type SubmissionIndex uint64

type SupportedLimits

type SupportedLimits struct {
	Limits Limits
}

type Surface

type Surface struct {
	// contains filtered or unexported fields
}

func (*Surface) Configure

func (p *Surface) Configure(adapter *Adapter, device *Device, config *SurfaceConfiguration)

func (*Surface) GetCapabilities

func (p *Surface) GetCapabilities(adapter *Adapter) (ret SurfaceCapabilities)

func (*Surface) GetCurrentTexture

func (p *Surface) GetCurrentTexture() (*Texture, error)

NOTE: you should typically not call Texture.Release on the returned texture. Instead, you should call TextureView.Release on any TextureView you create from it.

func (*Surface) Present

func (p *Surface) Present()

func (*Surface) Release

func (p *Surface) Release()

type SurfaceCapabilities

type SurfaceCapabilities struct {
	Formats      []TextureFormat
	PresentModes []PresentMode
	AlphaModes   []CompositeAlphaMode
}

type SurfaceConfiguration

type SurfaceConfiguration struct {
	Usage       TextureUsage
	Format      TextureFormat
	Width       uint32
	Height      uint32
	PresentMode PresentMode
	AlphaMode   CompositeAlphaMode
	ViewFormats []TextureFormat
}

SurfaceConfiguration, corresponding to GPUCanvasConfiguration: https://gpuweb.github.io/gpuweb/#dictdef-gpucanvasconfiguration

type SurfaceDescriptorFromAndroidNativeWindow

type SurfaceDescriptorFromAndroidNativeWindow struct {
	Window unsafe.Pointer
}

type SurfaceDescriptorFromMetalLayer

type SurfaceDescriptorFromMetalLayer struct {
	Layer unsafe.Pointer
}

type SurfaceDescriptorFromWaylandSurface

type SurfaceDescriptorFromWaylandSurface struct {
	Display unsafe.Pointer
	Surface unsafe.Pointer
}

type SurfaceDescriptorFromWindowsHWND

type SurfaceDescriptorFromWindowsHWND struct {
	Hinstance unsafe.Pointer
	Hwnd      unsafe.Pointer
}

type SurfaceDescriptorFromXcbWindow

type SurfaceDescriptorFromXcbWindow struct {
	Connection unsafe.Pointer
	Window     uint32
}

type SurfaceDescriptorFromXlibWindow

type SurfaceDescriptorFromXlibWindow struct {
	Display unsafe.Pointer
	Window  uint32
}

type SurfaceGetCurrentTextureStatus

type SurfaceGetCurrentTextureStatus uint32
const (
	SurfaceGetCurrentTextureStatusSuccess     SurfaceGetCurrentTextureStatus = 0x00000000
	SurfaceGetCurrentTextureStatusTimeout     SurfaceGetCurrentTextureStatus = 0x00000001
	SurfaceGetCurrentTextureStatusOutdated    SurfaceGetCurrentTextureStatus = 0x00000002
	SurfaceGetCurrentTextureStatusLost        SurfaceGetCurrentTextureStatus = 0x00000003
	SurfaceGetCurrentTextureStatusOutOfMemory SurfaceGetCurrentTextureStatus = 0x00000004
	SurfaceGetCurrentTextureStatusDeviceLost  SurfaceGetCurrentTextureStatus = 0x00000005
)

func (SurfaceGetCurrentTextureStatus) String

type Texture

type Texture struct {
	// contains filtered or unexported fields
}

func (*Texture) AsImageCopy

func (p *Texture) AsImageCopy() *ImageCopyTexture

func (*Texture) CreateView

func (p *Texture) CreateView(descriptor *TextureViewDescriptor) (*TextureView, error)

func (*Texture) Destroy

func (p *Texture) Destroy()

func (*Texture) GetDepthOrArrayLayers

func (p *Texture) GetDepthOrArrayLayers() uint32

func (*Texture) GetDimension

func (p *Texture) GetDimension() TextureDimension

func (*Texture) GetFormat

func (p *Texture) GetFormat() TextureFormat

func (*Texture) GetHeight

func (p *Texture) GetHeight() uint32

func (*Texture) GetMipLevelCount

func (p *Texture) GetMipLevelCount() uint32

func (*Texture) GetSampleCount

func (p *Texture) GetSampleCount() uint32

func (*Texture) GetUsage

func (p *Texture) GetUsage() TextureUsage

func (*Texture) GetWidth

func (p *Texture) GetWidth() uint32

func (*Texture) Release

func (p *Texture) Release()

type TextureAspect

type TextureAspect uint32
const (
	TextureAspectAll         TextureAspect = 0x00000000
	TextureAspectStencilOnly TextureAspect = 0x00000001
	TextureAspectDepthOnly   TextureAspect = 0x00000002
)

func (TextureAspect) String

func (v TextureAspect) String() string

type TextureBindingLayout

type TextureBindingLayout struct {
	SampleType    TextureSampleType
	ViewDimension TextureViewDimension
	Multisampled  bool
}

type TextureDataLayout

type TextureDataLayout struct {
	Offset       uint64
	BytesPerRow  uint32
	RowsPerImage uint32
}

type TextureDescriptor

type TextureDescriptor struct {
	Label         string
	Usage         TextureUsage
	Dimension     TextureDimension
	Size          Extent3D
	Format        TextureFormat
	MipLevelCount uint32
	SampleCount   uint32
}

TextureDescriptor as described: https://gpuweb.github.io/gpuweb/#gputexturedescriptor

type TextureDimension

type TextureDimension uint32
const (
	TextureDimension1D TextureDimension = 0x00000000
	TextureDimension2D TextureDimension = 0x00000001
	TextureDimension3D TextureDimension = 0x00000002
)

func (TextureDimension) String

func (v TextureDimension) String() string

type TextureFormat

type TextureFormat uint32
const (
	TextureFormatUndefined            TextureFormat = 0x00000000
	TextureFormatR8Unorm              TextureFormat = 0x00000001
	TextureFormatR8Snorm              TextureFormat = 0x00000002
	TextureFormatR8Uint               TextureFormat = 0x00000003
	TextureFormatR8Sint               TextureFormat = 0x00000004
	TextureFormatR16Uint              TextureFormat = 0x00000005
	TextureFormatR16Sint              TextureFormat = 0x00000006
	TextureFormatR16Float             TextureFormat = 0x00000007
	TextureFormatRG8Unorm             TextureFormat = 0x00000008
	TextureFormatRG8Snorm             TextureFormat = 0x00000009
	TextureFormatRG8Uint              TextureFormat = 0x0000000A
	TextureFormatRG8Sint              TextureFormat = 0x0000000B
	TextureFormatR32Float             TextureFormat = 0x0000000C
	TextureFormatR32Uint              TextureFormat = 0x0000000D
	TextureFormatR32Sint              TextureFormat = 0x0000000E
	TextureFormatRG16Uint             TextureFormat = 0x0000000F
	TextureFormatRG16Sint             TextureFormat = 0x00000010
	TextureFormatRG16Float            TextureFormat = 0x00000011
	TextureFormatRGBA8Unorm           TextureFormat = 0x00000012
	TextureFormatRGBA8UnormSrgb       TextureFormat = 0x00000013
	TextureFormatRGBA8Snorm           TextureFormat = 0x00000014
	TextureFormatRGBA8Uint            TextureFormat = 0x00000015
	TextureFormatRGBA8Sint            TextureFormat = 0x00000016
	TextureFormatBGRA8Unorm           TextureFormat = 0x00000017
	TextureFormatBGRA8UnormSrgb       TextureFormat = 0x00000018
	TextureFormatRGB10A2Uint          TextureFormat = 0x00000019
	TextureFormatRGB10A2Unorm         TextureFormat = 0x0000001A
	TextureFormatRG11B10Ufloat        TextureFormat = 0x0000001B
	TextureFormatRGB9E5Ufloat         TextureFormat = 0x0000001C
	TextureFormatRG32Float            TextureFormat = 0x0000001D
	TextureFormatRG32Uint             TextureFormat = 0x0000001E
	TextureFormatRG32Sint             TextureFormat = 0x0000001F
	TextureFormatRGBA16Uint           TextureFormat = 0x00000020
	TextureFormatRGBA16Sint           TextureFormat = 0x00000021
	TextureFormatRGBA16Float          TextureFormat = 0x00000022
	TextureFormatRGBA32Float          TextureFormat = 0x00000023
	TextureFormatRGBA32Uint           TextureFormat = 0x00000024
	TextureFormatRGBA32Sint           TextureFormat = 0x00000025
	TextureFormatStencil8             TextureFormat = 0x00000026
	TextureFormatDepth16Unorm         TextureFormat = 0x00000027
	TextureFormatDepth24Plus          TextureFormat = 0x00000028
	TextureFormatDepth24PlusStencil8  TextureFormat = 0x00000029
	TextureFormatDepth32Float         TextureFormat = 0x0000002A
	TextureFormatDepth32FloatStencil8 TextureFormat = 0x0000002B
	TextureFormatBC1RGBAUnorm         TextureFormat = 0x0000002C
	TextureFormatBC1RGBAUnormSrgb     TextureFormat = 0x0000002D
	TextureFormatBC2RGBAUnorm         TextureFormat = 0x0000002E
	TextureFormatBC2RGBAUnormSrgb     TextureFormat = 0x0000002F
	TextureFormatBC3RGBAUnorm         TextureFormat = 0x00000030
	TextureFormatBC3RGBAUnormSrgb     TextureFormat = 0x00000031
	TextureFormatBC4RUnorm            TextureFormat = 0x00000032
	TextureFormatBC4RSnorm            TextureFormat = 0x00000033
	TextureFormatBC5RGUnorm           TextureFormat = 0x00000034
	TextureFormatBC5RGSnorm           TextureFormat = 0x00000035
	TextureFormatBC6HRGBUfloat        TextureFormat = 0x00000036
	TextureFormatBC6HRGBFloat         TextureFormat = 0x00000037
	TextureFormatBC7RGBAUnorm         TextureFormat = 0x00000038
	TextureFormatBC7RGBAUnormSrgb     TextureFormat = 0x00000039
	TextureFormatETC2RGB8Unorm        TextureFormat = 0x0000003A
	TextureFormatETC2RGB8UnormSrgb    TextureFormat = 0x0000003B
	TextureFormatETC2RGB8A1Unorm      TextureFormat = 0x0000003C
	TextureFormatETC2RGB8A1UnormSrgb  TextureFormat = 0x0000003D
	TextureFormatETC2RGBA8Unorm       TextureFormat = 0x0000003E
	TextureFormatETC2RGBA8UnormSrgb   TextureFormat = 0x0000003F
	TextureFormatEACR11Unorm          TextureFormat = 0x00000040
	TextureFormatEACR11Snorm          TextureFormat = 0x00000041
	TextureFormatEACRG11Unorm         TextureFormat = 0x00000042
	TextureFormatEACRG11Snorm         TextureFormat = 0x00000043
	TextureFormatASTC4x4Unorm         TextureFormat = 0x00000044
	TextureFormatASTC4x4UnormSrgb     TextureFormat = 0x00000045
	TextureFormatASTC5x4Unorm         TextureFormat = 0x00000046
	TextureFormatASTC5x4UnormSrgb     TextureFormat = 0x00000047
	TextureFormatASTC5x5Unorm         TextureFormat = 0x00000048
	TextureFormatASTC5x5UnormSrgb     TextureFormat = 0x00000049
	TextureFormatASTC6x5Unorm         TextureFormat = 0x0000004A
	TextureFormatASTC6x5UnormSrgb     TextureFormat = 0x0000004B
	TextureFormatASTC6x6Unorm         TextureFormat = 0x0000004C
	TextureFormatASTC6x6UnormSrgb     TextureFormat = 0x0000004D
	TextureFormatASTC8x5Unorm         TextureFormat = 0x0000004E
	TextureFormatASTC8x5UnormSrgb     TextureFormat = 0x0000004F
	TextureFormatASTC8x6Unorm         TextureFormat = 0x00000050
	TextureFormatASTC8x6UnormSrgb     TextureFormat = 0x00000051
	TextureFormatASTC8x8Unorm         TextureFormat = 0x00000052
	TextureFormatASTC8x8UnormSrgb     TextureFormat = 0x00000053
	TextureFormatASTC10x5Unorm        TextureFormat = 0x00000054
	TextureFormatASTC10x5UnormSrgb    TextureFormat = 0x00000055
	TextureFormatASTC10x6Unorm        TextureFormat = 0x00000056
	TextureFormatASTC10x6UnormSrgb    TextureFormat = 0x00000057
	TextureFormatASTC10x8Unorm        TextureFormat = 0x00000058
	TextureFormatASTC10x8UnormSrgb    TextureFormat = 0x00000059
	TextureFormatASTC10x10Unorm       TextureFormat = 0x0000005A
	TextureFormatASTC10x10UnormSrgb   TextureFormat = 0x0000005B
	TextureFormatASTC12x10Unorm       TextureFormat = 0x0000005C
	TextureFormatASTC12x10UnormSrgb   TextureFormat = 0x0000005D
	TextureFormatASTC12x12Unorm       TextureFormat = 0x0000005E
	TextureFormatASTC12x12UnormSrgb   TextureFormat = 0x0000005F
)

func (TextureFormat) String

func (v TextureFormat) String() string

type TextureSampleType

type TextureSampleType uint32
const (
	TextureSampleTypeUndefined         TextureSampleType = 0x00000000
	TextureSampleTypeFloat             TextureSampleType = 0x00000001
	TextureSampleTypeUnfilterableFloat TextureSampleType = 0x00000002
	TextureSampleTypeDepth             TextureSampleType = 0x00000003
	TextureSampleTypeSint              TextureSampleType = 0x00000004
	TextureSampleTypeUint              TextureSampleType = 0x00000005
)

func (TextureSampleType) String

func (v TextureSampleType) String() string

type TextureUsage

type TextureUsage uint32
const (
	TextureUsageNone             TextureUsage = 0x00000000
	TextureUsageCopySrc          TextureUsage = 0x00000001
	TextureUsageCopyDst          TextureUsage = 0x00000002
	TextureUsageTextureBinding   TextureUsage = 0x00000004
	TextureUsageStorageBinding   TextureUsage = 0x00000008
	TextureUsageRenderAttachment TextureUsage = 0x00000010
)

func (TextureUsage) String

func (v TextureUsage) String() string

type TextureView

type TextureView struct {
	// contains filtered or unexported fields
}

func (*TextureView) Release

func (p *TextureView) Release()

type TextureViewDescriptor

type TextureViewDescriptor struct {
	Label           string
	Format          TextureFormat
	Dimension       TextureViewDimension
	BaseMipLevel    uint32
	MipLevelCount   uint32
	BaseArrayLayer  uint32
	ArrayLayerCount uint32
	Aspect          TextureAspect
}

type TextureViewDimension

type TextureViewDimension uint32
const (
	TextureViewDimensionUndefined TextureViewDimension = 0x00000000
	TextureViewDimension1D        TextureViewDimension = 0x00000001
	TextureViewDimension2D        TextureViewDimension = 0x00000002
	TextureViewDimension2DArray   TextureViewDimension = 0x00000003
	TextureViewDimensionCube      TextureViewDimension = 0x00000004
	TextureViewDimensionCubeArray TextureViewDimension = 0x00000005
	TextureViewDimension3D        TextureViewDimension = 0x00000006
)

func (TextureViewDimension) String

func (v TextureViewDimension) String() string

type Version

type Version uint32

func GetVersion

func GetVersion() Version

func (Version) String

func (v Version) String() string

type VertexAttribute

type VertexAttribute struct {
	Format         VertexFormat
	Offset         uint64
	ShaderLocation uint32
}

type VertexBufferLayout

type VertexBufferLayout struct {
	ArrayStride uint64
	StepMode    VertexStepMode
	Attributes  []VertexAttribute
}

type VertexFormat

type VertexFormat uint32
const (
	VertexFormatUndefined VertexFormat = 0x00000000
	VertexFormatUint8x2   VertexFormat = 0x00000001
	VertexFormatUint8x4   VertexFormat = 0x00000002
	VertexFormatSint8x2   VertexFormat = 0x00000003
	VertexFormatSint8x4   VertexFormat = 0x00000004
	VertexFormatUnorm8x2  VertexFormat = 0x00000005
	VertexFormatUnorm8x4  VertexFormat = 0x00000006
	VertexFormatSnorm8x2  VertexFormat = 0x00000007
	VertexFormatSnorm8x4  VertexFormat = 0x00000008
	VertexFormatUint16x2  VertexFormat = 0x00000009
	VertexFormatUint16x4  VertexFormat = 0x0000000A
	VertexFormatSint16x2  VertexFormat = 0x0000000B
	VertexFormatSint16x4  VertexFormat = 0x0000000C
	VertexFormatUnorm16x2 VertexFormat = 0x0000000D
	VertexFormatUnorm16x4 VertexFormat = 0x0000000E
	VertexFormatSnorm16x2 VertexFormat = 0x0000000F
	VertexFormatSnorm16x4 VertexFormat = 0x00000010
	VertexFormatFloat16x2 VertexFormat = 0x00000011
	VertexFormatFloat16x4 VertexFormat = 0x00000012
	VertexFormatFloat32   VertexFormat = 0x00000013
	VertexFormatFloat32x2 VertexFormat = 0x00000014
	VertexFormatFloat32x3 VertexFormat = 0x00000015
	VertexFormatFloat32x4 VertexFormat = 0x00000016
	VertexFormatUint32    VertexFormat = 0x00000017
	VertexFormatUint32x2  VertexFormat = 0x00000018
	VertexFormatUint32x3  VertexFormat = 0x00000019
	VertexFormatUint32x4  VertexFormat = 0x0000001A
	VertexFormatSint32    VertexFormat = 0x0000001B
	VertexFormatSint32x2  VertexFormat = 0x0000001C
	VertexFormatSint32x3  VertexFormat = 0x0000001D
	VertexFormatSint32x4  VertexFormat = 0x0000001E
)

func (VertexFormat) Size

func (v VertexFormat) Size() uint64

func (VertexFormat) String

func (v VertexFormat) String() string

type VertexState

type VertexState struct {
	Module     *ShaderModule
	EntryPoint string
	Buffers    []VertexBufferLayout
}

type VertexStepMode

type VertexStepMode uint32
const (
	VertexStepModeVertex              VertexStepMode = 0x00000000
	VertexStepModeInstance            VertexStepMode = 0x00000001
	VertexStepModeVertexBufferNotUsed VertexStepMode = 0x00000002
)

func (VertexStepMode) String

func (v VertexStepMode) String() string

type WGSLFeatureName

type WGSLFeatureName uint32
const (
	WGSLFeatureNameUndefined                           WGSLFeatureName = 0x00000000
	WGSLFeatureNameReadonlyAndReadwriteStorageTextures WGSLFeatureName = 0x00000001
	WGSLFeatureNamePacked4x8IntegerDotProduct          WGSLFeatureName = 0x00000002
	WGSLFeatureNameUnrestrictedPointerParameters       WGSLFeatureName = 0x00000003
	WGSLFeatureNamePointerCompositeAccess              WGSLFeatureName = 0x00000004
)

func (WGSLFeatureName) String

func (v WGSLFeatureName) String() string

type WrappedSubmissionIndex

type WrappedSubmissionIndex struct {
	Queue           *Queue
	SubmissionIndex SubmissionIndex
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL