Documentation ¶
Index ¶
- Constants
- Variables
- func FromBytes[E any](src []byte) []E
- func SetLogLevel(level LogLevel)
- func ToBytes[E any](src []E) []byte
- type Adapter
- type AdapterInfo
- type AdapterType
- type AddressMode
- type BackendType
- type BindGroup
- type BindGroupDescriptor
- type BindGroupEntry
- type BindGroupLayout
- type BindGroupLayoutDescriptor
- type BindGroupLayoutEntry
- type BlendComponent
- type BlendFactor
- type BlendOperation
- type BlendState
- type Buffer
- func (p *Buffer) Destroy()
- func (p *Buffer) GetMappedRange(offset, size uint) []byte
- func (p *Buffer) GetSize() uint64
- func (p *Buffer) GetUsage() BufferUsage
- func (p *Buffer) MapAsync(mode MapMode, offset uint64, size uint64, callback BufferMapCallback) (err error)
- func (p *Buffer) Release()
- func (p *Buffer) Unmap() (err error)
- type BufferBindingLayout
- type BufferBindingType
- type BufferDescriptor
- type BufferInitDescriptor
- type BufferMapAsyncStatus
- type BufferMapCallback
- type BufferMapState
- type BufferUsage
- type Color
- type ColorTargetState
- type ColorWriteMask
- type CommandBuffer
- type CommandBufferDescriptor
- type CommandEncoder
- func (p *CommandEncoder) BeginComputePass(descriptor *ComputePassDescriptor) *ComputePassEncoder
- func (p *CommandEncoder) BeginRenderPass(descriptor *RenderPassDescriptor) *RenderPassEncoder
- func (p *CommandEncoder) ClearBuffer(buffer *Buffer, offset uint64, size uint64) (err error)
- func (p *CommandEncoder) CopyBufferToBuffer(source *Buffer, sourceOffset uint64, destination *Buffer, ...) (err error)
- func (p *CommandEncoder) CopyBufferToTexture(source *ImageCopyBuffer, destination *ImageCopyTexture, copySize *Extent3D) (err error)
- func (p *CommandEncoder) CopyTextureToBuffer(source *ImageCopyTexture, destination *ImageCopyBuffer, copySize *Extent3D) (err error)
- func (p *CommandEncoder) CopyTextureToTexture(source *ImageCopyTexture, destination *ImageCopyTexture, copySize *Extent3D) (err error)
- func (p *CommandEncoder) Finish(descriptor *CommandBufferDescriptor) (*CommandBuffer, error)
- func (p *CommandEncoder) InsertDebugMarker(markerLabel string) (err error)
- func (p *CommandEncoder) PopDebugGroup() (err error)
- func (p *CommandEncoder) PushDebugGroup(groupLabel string) (err error)
- func (p *CommandEncoder) Release()
- func (p *CommandEncoder) ResolveQuerySet(querySet *QuerySet, firstQuery uint32, queryCount uint32, destination *Buffer, ...) (err error)
- func (p *CommandEncoder) WriteTimestamp(querySet *QuerySet, queryIndex uint32) (err error)
- type CommandEncoderDescriptor
- type CompareFunction
- type CompilationInfoRequestStatus
- type CompilationMessageType
- type CompositeAlphaMode
- type ComputePassDescriptor
- type ComputePassEncoder
- func (p *ComputePassEncoder) BeginPipelineStatisticsQuery(querySet *QuerySet, queryIndex uint32)
- func (p *ComputePassEncoder) DispatchWorkgroups(workgroupCountX, workgroupCountY, workgroupCountZ uint32)
- func (p *ComputePassEncoder) DispatchWorkgroupsIndirect(indirectBuffer *Buffer, indirectOffset uint64)
- func (p *ComputePassEncoder) End() (err error)
- func (p *ComputePassEncoder) EndPipelineStatisticsQuery()
- func (p *ComputePassEncoder) InsertDebugMarker(markerLabel string)
- func (p *ComputePassEncoder) PopDebugGroup()
- func (p *ComputePassEncoder) PushDebugGroup(groupLabel string)
- func (p *ComputePassEncoder) Release()
- func (p *ComputePassEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)
- func (p *ComputePassEncoder) SetPipeline(pipeline *ComputePipeline)
- type ComputePipeline
- type ComputePipelineDescriptor
- type ConstantEntry
- type CreatePipelineAsyncStatus
- type CullMode
- type DepthStencilState
- type Device
- func (p *Device) CreateBindGroup(descriptor *BindGroupDescriptor) (*BindGroup, error)
- func (p *Device) CreateBindGroupLayout(descriptor *BindGroupLayoutDescriptor) (*BindGroupLayout, error)
- func (p *Device) CreateBuffer(descriptor *BufferDescriptor) (*Buffer, error)
- func (p *Device) CreateBufferInit(descriptor *BufferInitDescriptor) (*Buffer, error)
- func (p *Device) CreateCommandEncoder(descriptor *CommandEncoderDescriptor) (*CommandEncoder, error)
- func (p *Device) CreateComputePipeline(descriptor *ComputePipelineDescriptor) (*ComputePipeline, error)
- func (p *Device) CreatePipelineLayout(descriptor *PipelineLayoutDescriptor) (*PipelineLayout, error)
- func (p *Device) CreateQuerySet(descriptor *QuerySetDescriptor) (*QuerySet, error)
- func (p *Device) CreateRenderBundleEncoder(descriptor *RenderBundleEncoderDescriptor) (*RenderBundleEncoder, error)
- func (p *Device) CreateRenderPipeline(descriptor *RenderPipelineDescriptor) (*RenderPipeline, error)
- func (p *Device) CreateSampler(descriptor *SamplerDescriptor) (*Sampler, error)
- func (p *Device) CreateShaderModule(descriptor *ShaderModuleDescriptor) (*ShaderModule, error)
- func (p *Device) CreateTexture(descriptor *TextureDescriptor) (*Texture, error)
- func (p *Device) EnumerateFeatures() []FeatureName
- func (p *Device) GetLimits() SupportedLimits
- func (p *Device) GetQueue() *Queue
- func (p *Device) HasFeature(feature FeatureName) bool
- func (p *Device) Poll(wait bool, wrappedSubmissionIndex *WrappedSubmissionIndex) (queueEmpty bool)
- func (p *Device) Release()
- type DeviceDescriptor
- type DeviceLostCallback
- type DeviceLostReason
- type Dx12Compiler
- type Error
- type ErrorFilter
- type ErrorType
- type Extent3D
- type FeatureName
- type FilterMode
- type FragmentState
- type FrontFace
- type Gles3MinorVersion
- type GlobalReport
- type HubReport
- type ImageCopyBuffer
- type ImageCopyTexture
- type IndexFormat
- type Instance
- func (p *Instance) CreateSurface(descriptor *SurfaceDescriptor) *Surface
- func (p *Instance) EnumerateAdapters(options *InstanceEnumerateAdapterOptons) []*Adapter
- func (p *Instance) GenerateReport() GlobalReport
- func (p *Instance) Release()
- func (p *Instance) RequestAdapter(options *RequestAdapterOptions) (*Adapter, error)
- type InstanceBackend
- type InstanceDescriptor
- type InstanceEnumerateAdapterOptons
- type InstanceFlag
- type Limits
- type LoadOp
- type LogLevel
- type MapMode
- type MipmapFilterMode
- type MultisampleState
- type NativeQueryType
- type NativeTextureFormat
- type Origin3D
- type PipelineLayout
- type PipelineLayoutDescriptor
- type PipelineStatisticName
- type PowerPreference
- type PresentMode
- type PrimitiveState
- type PrimitiveTopology
- type ProgrammableStageDescriptor
- type PushConstantRange
- type QuerySet
- type QuerySetDescriptor
- type QueryType
- type Queue
- func (p *Queue) OnSubmittedWorkDone(callback QueueWorkDoneCallback)
- func (p *Queue) Release()
- func (p *Queue) Submit(commands ...*CommandBuffer) (submissionIndex SubmissionIndex)
- func (p *Queue) WriteBuffer(buffer *Buffer, bufferOffset uint64, data []byte) (err error)
- func (p *Queue) WriteTexture(destination *ImageCopyTexture, data []byte, dataLayout *TextureDataLayout, ...) (err error)
- type QueueWorkDoneCallback
- type QueueWorkDoneStatus
- type RegistryReport
- type RenderBundle
- type RenderBundleDescriptor
- type RenderBundleEncoder
- func (p *RenderBundleEncoder) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)
- func (p *RenderBundleEncoder) DrawIndexed(indexCount, instanceCount, firstIndex, baseVertex, firstInstance uint32)
- func (p *RenderBundleEncoder) DrawIndexedIndirect(indirectBuffer *Buffer, indirectOffset uint64)
- func (p *RenderBundleEncoder) DrawIndirect(indirectBuffer *Buffer, indirectOffset uint64)
- func (p *RenderBundleEncoder) Finish(descriptor *RenderBundleDescriptor) *RenderBundle
- func (p *RenderBundleEncoder) InsertDebugMarker(markerLabel string)
- func (p *RenderBundleEncoder) PopDebugGroup()
- func (p *RenderBundleEncoder) PushDebugGroup(groupLabel string)
- func (p *RenderBundleEncoder) Release()
- func (p *RenderBundleEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)
- func (p *RenderBundleEncoder) SetIndexBuffer(buffer *Buffer, format IndexFormat, offset uint64, size uint64)
- func (p *RenderBundleEncoder) SetPipeline(pipeline *RenderPipeline)
- func (p *RenderBundleEncoder) SetVertexBuffer(slot uint32, buffer *Buffer, offset uint64, size uint64)
- type RenderBundleEncoderDescriptor
- type RenderPassColorAttachment
- type RenderPassDepthStencilAttachment
- type RenderPassDescriptor
- type RenderPassEncoder
- func (p *RenderPassEncoder) BeginOcclusionQuery(queryIndex uint32)
- func (p *RenderPassEncoder) BeginPipelineStatisticsQuery(querySet *QuerySet, queryIndex uint32)
- func (p *RenderPassEncoder) Draw(vertexCount, instanceCount, firstVertex, firstInstance uint32)
- func (p *RenderPassEncoder) DrawIndexed(indexCount uint32, instanceCount uint32, firstIndex uint32, baseVertex int32, ...)
- func (p *RenderPassEncoder) DrawIndexedIndirect(indirectBuffer *Buffer, indirectOffset uint64)
- func (p *RenderPassEncoder) DrawIndirect(indirectBuffer *Buffer, indirectOffset uint64)
- func (p *RenderPassEncoder) End() (err error)
- func (p *RenderPassEncoder) EndOcclusionQuery()
- func (p *RenderPassEncoder) EndPipelineStatisticsQuery()
- func (p *RenderPassEncoder) ExecuteBundles(bundles ...*RenderBundle)
- func (p *RenderPassEncoder) InsertDebugMarker(markerLabel string)
- func (p *RenderPassEncoder) MultiDrawIndexedIndirect(encoder *RenderPassEncoder, buffer Buffer, offset uint64, count uint32)
- func (p *RenderPassEncoder) MultiDrawIndexedIndirectCount(encoder *RenderPassEncoder, buffer Buffer, offset uint64, countBuffer Buffer, ...)
- func (p *RenderPassEncoder) MultiDrawIndirect(encoder *RenderPassEncoder, buffer Buffer, offset uint64, count uint32)
- func (p *RenderPassEncoder) MultiDrawIndirectCount(encoder *RenderPassEncoder, buffer Buffer, offset uint64, countBuffer Buffer, ...)
- func (p *RenderPassEncoder) PopDebugGroup()
- func (p *RenderPassEncoder) PushDebugGroup(groupLabel string)
- func (p *RenderPassEncoder) Release()
- func (p *RenderPassEncoder) SetBindGroup(groupIndex uint32, group *BindGroup, dynamicOffsets []uint32)
- func (p *RenderPassEncoder) SetBlendConstant(color *Color)
- func (p *RenderPassEncoder) SetIndexBuffer(buffer *Buffer, format IndexFormat, offset uint64, size uint64)
- func (p *RenderPassEncoder) SetPipeline(pipeline *RenderPipeline)
- func (p *RenderPassEncoder) SetPushConstants(stages ShaderStage, offset uint32, data []byte)
- func (p *RenderPassEncoder) SetScissorRect(x, y, width, height uint32)
- func (p *RenderPassEncoder) SetStencilReference(reference uint32)
- func (p *RenderPassEncoder) SetVertexBuffer(slot uint32, buffer *Buffer, offset uint64, size uint64)
- func (p *RenderPassEncoder) SetViewport(x, y, width, height, minDepth, maxDepth float32)
- type RenderPipeline
- type RenderPipelineDescriptor
- type RequestAdapterOptions
- type RequestAdapterStatus
- type RequestDeviceStatus
- type RequiredLimits
- type Sampler
- type SamplerBindingLayout
- type SamplerBindingType
- type SamplerDescriptor
- type ShaderModule
- type ShaderModuleDescriptor
- type ShaderModuleGLSLDescriptor
- type ShaderModuleSPIRVDescriptor
- type ShaderModuleWGSLDescriptor
- type ShaderStage
- type StencilFaceState
- type StencilOperation
- type StorageTextureAccess
- type StorageTextureBindingLayout
- type StoreOp
- type SubmissionIndex
- type SupportedLimits
- type Surface
- type SurfaceCapabilities
- type SurfaceConfiguration
- type SurfaceDescriptor
- type SurfaceDescriptorFromAndroidNativeWindow
- type SurfaceDescriptorFromMetalLayer
- type SurfaceDescriptorFromWaylandSurface
- type SurfaceDescriptorFromWindowsHWND
- type SurfaceDescriptorFromXcbWindow
- type SurfaceDescriptorFromXlibWindow
- type SurfaceGetCurrentTextureStatus
- type Texture
- func (p *Texture) AsImageCopy() *ImageCopyTexture
- func (p *Texture) CreateView(descriptor *TextureViewDescriptor) (*TextureView, error)
- func (p *Texture) Destroy()
- func (p *Texture) GetDepthOrArrayLayers() uint32
- func (p *Texture) GetDimension() TextureDimension
- func (p *Texture) GetFormat() TextureFormat
- func (p *Texture) GetHeight() uint32
- func (p *Texture) GetMipLevelCount() uint32
- func (p *Texture) GetSampleCount() uint32
- func (p *Texture) GetUsage() TextureUsage
- func (p *Texture) GetWidth() uint32
- func (p *Texture) Release()
- type TextureAspect
- type TextureBindingLayout
- type TextureDataLayout
- type TextureDescriptor
- type TextureDimension
- type TextureFormat
- type TextureSampleType
- type TextureUsage
- type TextureView
- type TextureViewDescriptor
- type TextureViewDimension
- type Version
- type VertexAttribute
- type VertexBufferLayout
- type VertexFormat
- type VertexState
- type VertexStepMode
- type WGSLFeatureName
- type WrappedSubmissionIndex
Constants ¶
const ( ArrayLayerCountUndefined = 0xffffffff CopyStrideUndefined = 0xffffffff LimitU32Undefined uint32 = 0xffffffff LimitU64Undefined uint64 = 0xffffffffffffffff MipLevelCountUndefined = 0xffffffff WholeMapSize = ^uint(0) WholeSize = 0xffffffffffffffff )
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 ¶
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 SetLogLevel ¶
func SetLogLevel(level LogLevel)
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) 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 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) GetMappedRange ¶
func (*Buffer) GetUsage ¶
func (p *Buffer) GetUsage() BufferUsage
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 (*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 (*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 ¶
func (v CompilationInfoRequestStatus) String() 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 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 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) HasFeature ¶
func (p *Device) HasFeature(feature FeatureName) bool
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 ErrorFilter ¶
type ErrorFilter uint32
const ( ErrorFilterValidation ErrorFilter = 0x00000000 ErrorFilterOutOfMemory ErrorFilter = 0x00000001 ErrorFilterInternal ErrorFilter = 0x00000002 )
func (ErrorFilter) String ¶
func (v ErrorFilter) String() string
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 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 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) 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 MipmapFilterMode ¶
type MipmapFilterMode uint32
const ( MipmapFilterModeNearest MipmapFilterMode = 0x00000000 MipmapFilterModeLinear MipmapFilterMode = 0x00000001 )
func (MipmapFilterMode) String ¶
func (v MipmapFilterMode) String() string
type MultisampleState ¶
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 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 QuerySetDescriptor ¶
type QuerySetDescriptor struct { Label string Type QueryType Count uint32 PipelineStatistics []PipelineStatisticName }
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) OnSubmittedWorkDone ¶
func (p *Queue) OnSubmittedWorkDone(callback QueueWorkDoneCallback)
func (*Queue) Submit ¶
func (p *Queue) Submit(commands ...*CommandBuffer) (submissionIndex SubmissionIndex)
func (*Queue) WriteBuffer ¶
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 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 (p *RenderBundleEncoder) Finish(descriptor *RenderBundleDescriptor) *RenderBundle
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 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 (*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 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 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 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 ¶
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.
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 SurfaceDescriptor ¶
type SurfaceDescriptor struct { Label string WindowsHWND *SurfaceDescriptorFromWindowsHWND XcbWindow *SurfaceDescriptorFromXcbWindow XlibWindow *SurfaceDescriptorFromXlibWindow MetalLayer *SurfaceDescriptorFromMetalLayer WaylandSurface *SurfaceDescriptorFromWaylandSurface AndroidNativeWindow *SurfaceDescriptorFromAndroidNativeWindow }
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 ¶
func (v SurfaceGetCurrentTextureStatus) String() 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) GetDepthOrArrayLayers ¶
func (*Texture) GetDimension ¶
func (p *Texture) GetDimension() TextureDimension
func (*Texture) GetFormat ¶
func (p *Texture) GetFormat() TextureFormat
func (*Texture) GetMipLevelCount ¶
func (*Texture) GetSampleCount ¶
func (*Texture) GetUsage ¶
func (p *Texture) GetUsage() TextureUsage
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 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 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 }
Source Files ¶
- adapter.go
- buffer.go
- buffer_ext.go
- command_encoder.go
- common.go
- compute_pass_encoder.go
- compute_pipeline.go
- defaults.go
- device.go
- device_ext.go
- enums.go
- error.go
- instance.go
- queue.go
- render_bundle_encoder.go
- render_pass_encoder.go
- render_pipeline.go
- surface.go
- texture.go
- texture_ext.go
- vendor.go
- wgpu.go
- wgpu_c_cb.go
- wgpu_ext.go