Documentation ¶
Index ¶
- Constants
- Variables
- func FromBytes[E any](src []byte) []E
- func NewBridge() (wgpu.IBridge, error)
- func SetLogLevel(level wgpu.LogLevel)
- func ToBytes[E any](src []E) []byte
- type Adapter
- func (p *Adapter) EnumerateFeatures() []wgpu.FeatureName
- func (p *Adapter) GetLimits() wgpu.SupportedLimits
- func (p *Adapter) GetProperties() wgpu.AdapterProperties
- func (p *Adapter) HasFeature(feature wgpu.FeatureName) bool
- func (p *Adapter) Release()
- func (p *Adapter) RequestDevice(descriptor *wgpu.DeviceDescriptor) (wgpu.IDevice, error)
- type AddressMode
- type BindGroup
- type BindGroupEntry
- type BindGroupLayout
- type BlendComponent
- type BlendFactor
- type BlendOperation
- type BlendState
- type Bridge
- func (b *Bridge) CreateCanvas(descriptor *wgpu.CanvasDescriptor) (wgpu.ICanvas, error)
- func (b *Bridge) GetGPU() wgpu.IGPU
- func (b *Bridge) GetPreferredCanvasFormat() wgpu.TextureFormat
- func (b *Bridge) RequestAdapter(descriptor *wgpu.AdapterDescriptor) (wgpu.IAdapter, error)
- func (b *Bridge) RequestAnimationFrame(fn func())
- type Buffer
- func (p *Buffer) Destroy()
- func (p *Buffer) GetMappedRange(offset, size uint) []byte
- func (p *Buffer) GetSize() uint64
- func (p *Buffer) GetUsage() wgpu.BufferUsage
- func (p *Buffer) MapAsync(mode wgpu.MapMode, offset uint64, size uint64, callback wgpu.BufferMapCallback) (err error)
- func (p *Buffer) Ref() any
- func (p *Buffer) Release()
- func (p *Buffer) Unmap() (err error)
- type BufferInitDescriptor
- type BufferMapAsyncStatus
- type BufferMapState
- type Canvas
- 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) Ref() any
- 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 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 ComputePassTimestampLocation
- type ComputePipeline
- type ComputePipelineDescriptor
- type ConstantEntry
- type CreateCommandEncoderErrorType
- type CreatePipelineAsyncStatus
- type CullMode
- type DepthStencilState
- type Device
- func (p *Device) CreateBindGroup(descriptor *wgpu.BindGroupDescriptor) (wgpu.IGPUBindGroup, error)
- func (p *Device) CreateBindGroupLayout(descriptor *wgpu.BindGroupLayoutDescriptor) (wgpu.IGPUBindGroupLayout, error)
- func (p *Device) CreateBuffer(descriptor *wgpu.BufferDescriptor) (wgpu.IBuffer, error)
- func (p *Device) CreateBufferInit(descriptor *BufferInitDescriptor) (*Buffer, error)
- func (p *Device) CreateCommandEncoder(descriptor *wgpu.CommandEncoderDescriptor) (wgpu.ICommandEncoder, error)
- func (p *Device) CreateComputePipeline(descriptor *ComputePipelineDescriptor) (*ComputePipeline, error)
- func (p *Device) CreatePipelineLayout(descriptor *PipelineLayoutDescriptor) (*PipelineLayout, error)
- func (p *Device) CreateQuerySet(descriptor *wgpu.QuerySetDescriptor) (wgpu.IQuerySet, 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) CreateSwapChain(surface *Surface, descriptor *SwapChainDescriptor) (*SwapChain, error)
- func (p *Device) CreateTexture(descriptor *TextureDescriptor) (*Texture, error)
- func (p *Device) EnumerateFeatures() []wgpu.FeatureName
- func (p *Device) GetLimits() wgpu.SupportedLimits
- func (p *Device) GetQueue() wgpu.IQueue
- func (p *Device) HasFeature(feature FeatureName) bool
- func (p *Device) Poll(wait bool, wrappedSubmissionIndex *WrappedSubmissionIndex) (queueEmpty bool)
- func (p *Device) Ref() any
- func (p *Device) Release()
- type DeviceLostCallback
- type DeviceLostReason
- type Dx12Compiler
- type Error
- type ErrorFilter
- type Extent3D
- type FeatureName
- type FilterMode
- type FragmentState
- type FrontFace
- 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 Limits
- type LoadOp
- type LogLevel
- type MipmapFilterMode
- type MultisampleState
- type Origin3D
- type PipelineLayout
- type PipelineLayoutDescriptor
- type PresentMode
- type PrimitiveState
- type PrimitiveTopology
- type ProgrammableStageDescriptor
- type PushConstantRange
- type QuerySet
- type QueryType
- type Queue
- func (p *Queue) OnSubmittedWorkDone(callback wgpu.QueueWorkDoneCallback)
- func (p *Queue) Ref() any
- func (p *Queue) Release()
- func (p *Queue) Submit(commands ...wgpu.ICommandBuffer) (submissionIndex wgpu.SubmissionIndex)
- func (p *Queue) WriteBuffer(buffer wgpu.IBuffer, bufferOffset uint64, data []byte) (err error)
- func (p *Queue) WriteTexture(destination *wgpu.ImageCopyTexture, data []byte, ...) (err error)
- type QueueWorkDoneStatus
- 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 wgpu.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 RenderPassTimestampLocation
- type RenderPipeline
- type RenderPipelineDescriptor
- type RequestAdapterOptions
- type RequestAdapterStatus
- type RequestDeviceStatus
- type Sampler
- type SamplerDescriptor
- type ShaderModule
- type ShaderModuleDescriptor
- type ShaderModuleGLSLDescriptor
- type ShaderModuleSPIRVDescriptor
- type ShaderModuleWGSLDescriptor
- type StencilFaceState
- type StencilOperation
- type StorageReport
- type StoreOp
- type Surface
- type SurfaceCapabilities
- type SurfaceDescriptor
- type SurfaceDescriptorFromAndroidNativeWindow
- type SurfaceDescriptorFromMetalLayer
- type SurfaceDescriptorFromWaylandSurface
- type SurfaceDescriptorFromWindowsHWND
- type SurfaceDescriptorFromXcbWindow
- type SurfaceDescriptorFromXlibWindow
- type SwapChain
- type SwapChainDescriptor
- type Texture
- func (p *Texture) AsImageCopy() *ImageCopyTexture
- func (p *Texture) CreateView(descriptor *wgpu.TextureViewDescriptor) (*wgpu.ITextureView, error)
- func (p *Texture) Destroy()
- func (p *Texture) GetDepthOrArrayLayers() uint32
- func (p *Texture) GetDimension() wgpu.TextureDimension
- func (p *Texture) GetFormat() wgpu.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 TextureDataLayout
- type TextureDescriptor
- type TextureDimension
- type TextureUsage
- type TextureView
- type TextureViewDescriptor
- type Version
- type VertexAttribute
- type VertexBufferLayout
- type VertexFormat
- type VertexState
- type VertexStepMode
- type WrappedSubmissionIndex
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 ( Color_Transparent = Color{0, 0, 0, 0} Color_Black = Color{0, 0, 0, 1} Color_White = Color{1, 1, 1, 1} Color_Red = Color{1, 0, 0, 1} Color_Green = Color{0, 1, 0, 1} Color_Blue = Color{0, 0, 1, 1} BlendComponent_Replace = BlendComponent{ SrcFactor: BlendFactor_One, DstFactor: BlendFactor_Zero, Operation: BlendOperation_Add, } BlendComponent_Over = BlendComponent{ SrcFactor: BlendFactor_One, DstFactor: BlendFactor_OneMinusSrcAlpha, Operation: BlendOperation_Add, } BlendState_Replace = BlendState{ Color: BlendComponent_Replace, Alpha: BlendComponent_Replace, } BlendState_AlphaBlending = BlendState{ Color: BlendComponent{ SrcFactor: BlendFactor_SrcAlpha, DstFactor: BlendFactor_OneMinusSrcAlpha, Operation: BlendOperation_Add, }, Alpha: BlendComponent_Over, } BlendState_PremultipliedAlphaBlending = BlendState{ Color: BlendComponent_Over, Alpha: BlendComponent_Over, } )
Functions ¶
func SetLogLevel ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) EnumerateFeatures ¶
func (p *Adapter) EnumerateFeatures() []wgpu.FeatureName
func (*Adapter) GetLimits ¶
func (p *Adapter) GetLimits() wgpu.SupportedLimits
func (*Adapter) GetProperties ¶
func (p *Adapter) GetProperties() wgpu.AdapterProperties
func (*Adapter) HasFeature ¶
func (p *Adapter) HasFeature(feature wgpu.FeatureName) bool
func (*Adapter) RequestDevice ¶
type AddressMode ¶
type AddressMode uint32
const ( AddressMode_Repeat AddressMode = 0x00000000 AddressMode_MirrorRepeat AddressMode = 0x00000001 AddressMode_ClampToEdge AddressMode = 0x00000002 )
func (AddressMode) String ¶
func (v AddressMode) String() string
type BindGroupEntry ¶
type BindGroupLayout ¶
type BindGroupLayout struct {
// contains filtered or unexported fields
}
func (*BindGroupLayout) Ref ¶
func (p *BindGroupLayout) Ref() any
func (*BindGroupLayout) Release ¶
func (p *BindGroupLayout) Release()
type BlendComponent ¶
type BlendComponent struct { Operation BlendOperation SrcFactor BlendFactor DstFactor BlendFactor }
type BlendFactor ¶
type BlendFactor uint32
const ( BlendFactor_Zero BlendFactor = 0x00000000 BlendFactor_One BlendFactor = 0x00000001 BlendFactor_Src BlendFactor = 0x00000002 BlendFactor_OneMinusSrc BlendFactor = 0x00000003 BlendFactor_SrcAlpha BlendFactor = 0x00000004 BlendFactor_OneMinusSrcAlpha BlendFactor = 0x00000005 BlendFactor_Dst BlendFactor = 0x00000006 BlendFactor_OneMinusDst BlendFactor = 0x00000007 BlendFactor_DstAlpha BlendFactor = 0x00000008 BlendFactor_OneMinusDstAlpha BlendFactor = 0x00000009 BlendFactor_SrcAlphaSaturated BlendFactor = 0x0000000A BlendFactor_Constant BlendFactor = 0x0000000B BlendFactor_OneMinusConstant BlendFactor = 0x0000000C )
func (BlendFactor) String ¶
func (v BlendFactor) String() string
type BlendOperation ¶
type BlendOperation uint32
const ( BlendOperation_Add BlendOperation = 0x00000000 BlendOperation_Subtract BlendOperation = 0x00000001 BlendOperation_ReverseSubtract BlendOperation = 0x00000002 BlendOperation_Min BlendOperation = 0x00000003 BlendOperation_Max BlendOperation = 0x00000004 )
func (BlendOperation) String ¶
func (v BlendOperation) String() string
type BlendState ¶
type BlendState struct { Color BlendComponent Alpha BlendComponent }
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) CreateCanvas ¶
func (*Bridge) GetPreferredCanvasFormat ¶
func (b *Bridge) GetPreferredCanvasFormat() wgpu.TextureFormat
func (*Bridge) RequestAdapter ¶
func (*Bridge) RequestAnimationFrame ¶
func (b *Bridge) RequestAnimationFrame(fn func())
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) GetMappedRange ¶
func (*Buffer) GetUsage ¶
func (p *Buffer) GetUsage() wgpu.BufferUsage
type BufferInitDescriptor ¶
type BufferInitDescriptor struct { Label string Contents []byte Usage wgpu.BufferUsage }
type BufferMapAsyncStatus ¶
type BufferMapAsyncStatus uint32
const ( BufferMapAsyncStatus_Success BufferMapAsyncStatus = 0x00000000 BufferMapAsyncStatus_ValidationError BufferMapAsyncStatus = 0x00000001 BufferMapAsyncStatus_Unknown BufferMapAsyncStatus = 0x00000002 BufferMapAsyncStatus_DeviceLost BufferMapAsyncStatus = 0x00000003 BufferMapAsyncStatus_DestroyedBeforeCallback BufferMapAsyncStatus = 0x00000004 BufferMapAsyncStatus_UnmappedBeforeCallback BufferMapAsyncStatus = 0x00000005 BufferMapAsyncStatus_MappingAlreadyPending BufferMapAsyncStatus = 0x00000006 BufferMapAsyncStatus_OffsetOutOfRange BufferMapAsyncStatus = 0x00000007 BufferMapAsyncStatus_SizeOutOfRange BufferMapAsyncStatus = 0x00000008 )
func (BufferMapAsyncStatus) String ¶
func (v BufferMapAsyncStatus) String() string
type BufferMapState ¶
type BufferMapState uint32
const ( BufferMapState_Unmapped BufferMapState = 0x00000000 BufferMapState_Pending BufferMapState = 0x00000001 BufferMapState_Mapped BufferMapState = 0x00000002 )
func (BufferMapState) String ¶
func (v BufferMapState) String() string
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
func NewCanvas ¶
func NewCanvas(instance *Instance, descriptor *wgpu.CanvasDescriptor) (*Canvas, error)
func (*Canvas) GetCurrentTexture ¶
func (*Canvas) UnConfigure ¶
func (c *Canvas) UnConfigure()
type ColorTargetState ¶
type ColorTargetState struct { Format wgpu.TextureFormat Blend *BlendState WriteMask ColorWriteMask }
type ColorWriteMask ¶
type ColorWriteMask uint32
const ( ColorWriteMask_None ColorWriteMask = 0x00000000 ColorWriteMask_Red ColorWriteMask = 0x00000001 ColorWriteMask_Green ColorWriteMask = 0x00000002 ColorWriteMask_Blue ColorWriteMask = 0x00000004 ColorWriteMask_Alpha ColorWriteMask = 0x00000008 ColorWriteMask_All ColorWriteMask = 0x0000000F )
func (ColorWriteMask) String ¶
func (v ColorWriteMask) String() string
type CommandBuffer ¶
type CommandBuffer struct {
// contains filtered or unexported fields
}
func (*CommandBuffer) Ref ¶
func (p *CommandBuffer) Ref() any
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) Ref ¶
func (p *CommandEncoder) Ref() any
func (*CommandEncoder) Release ¶
func (p *CommandEncoder) Release()
func (*CommandEncoder) ResolveQuerySet ¶
func (*CommandEncoder) WriteTimestamp ¶
func (p *CommandEncoder) WriteTimestamp(querySet *QuerySet, queryIndex uint32) (err error)
type CompareFunction ¶
type CompareFunction uint32
const ( CompareFunction_Undefined CompareFunction = 0x00000000 CompareFunction_Never CompareFunction = 0x00000001 CompareFunction_Less CompareFunction = 0x00000002 CompareFunction_LessEqual CompareFunction = 0x00000003 CompareFunction_Greater CompareFunction = 0x00000004 CompareFunction_GreaterEqual CompareFunction = 0x00000005 CompareFunction_Equal CompareFunction = 0x00000006 CompareFunction_NotEqual CompareFunction = 0x00000007 CompareFunction_Always CompareFunction = 0x00000008 )
func (CompareFunction) String ¶
func (v CompareFunction) String() string
type CompilationInfoRequestStatus ¶
type CompilationInfoRequestStatus uint32
const ( CompilationInfoRequestStatus_Success CompilationInfoRequestStatus = 0x00000000 CompilationInfoRequestStatus_Error CompilationInfoRequestStatus = 0x00000001 CompilationInfoRequestStatus_DeviceLost CompilationInfoRequestStatus = 0x00000002 CompilationInfoRequestStatus_Unknown CompilationInfoRequestStatus = 0x00000003 )
func (CompilationInfoRequestStatus) String ¶
func (v CompilationInfoRequestStatus) String() string
type CompilationMessageType ¶
type CompilationMessageType uint32
const ( CompilationMessageType_Error CompilationMessageType = 0x00000000 CompilationMessageType_Warning CompilationMessageType = 0x00000001 CompilationMessageType_Info CompilationMessageType = 0x00000002 )
func (CompilationMessageType) String ¶
func (v CompilationMessageType) String() string
type CompositeAlphaMode ¶
type CompositeAlphaMode uint32
const ( CompositeAlphaMode_Auto CompositeAlphaMode = 0x00000000 CompositeAlphaMode_Opaque CompositeAlphaMode = 0x00000001 CompositeAlphaMode_PreMultiplied CompositeAlphaMode = 0x00000002 CompositeAlphaMode_PostMultiplied CompositeAlphaMode = 0x00000003 CompositeAlphaMode_Inherit 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 ComputePassTimestampLocation ¶
type ComputePassTimestampLocation uint32
const ( ComputePassTimestampLocation_Beginning ComputePassTimestampLocation = 0x00000000 ComputePassTimestampLocation_End ComputePassTimestampLocation = 0x00000001 )
func (ComputePassTimestampLocation) String ¶
func (v ComputePassTimestampLocation) String() string
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 CreateCommandEncoderErrorType ¶
type CreateCommandEncoderErrorType uint32
type CreatePipelineAsyncStatus ¶
type CreatePipelineAsyncStatus uint32
const ( CreatePipelineAsyncStatus_Success CreatePipelineAsyncStatus = 0x00000000 CreatePipelineAsyncStatus_ValidationError CreatePipelineAsyncStatus = 0x00000001 CreatePipelineAsyncStatus_InternalError CreatePipelineAsyncStatus = 0x00000002 CreatePipelineAsyncStatus_DeviceLost CreatePipelineAsyncStatus = 0x00000003 CreatePipelineAsyncStatus_DeviceDestroyed CreatePipelineAsyncStatus = 0x00000004 CreatePipelineAsyncStatus_Unknown CreatePipelineAsyncStatus = 0x00000005 )
func (CreatePipelineAsyncStatus) String ¶
func (v CreatePipelineAsyncStatus) String() string
type DepthStencilState ¶
type DepthStencilState struct { Format wgpu.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 *wgpu.BindGroupDescriptor) (wgpu.IGPUBindGroup, error)
func (*Device) CreateBindGroupLayout ¶
func (p *Device) CreateBindGroupLayout(descriptor *wgpu.BindGroupLayoutDescriptor) (wgpu.IGPUBindGroupLayout, error)
func (*Device) CreateBuffer ¶
func (*Device) CreateBufferInit ¶
func (p *Device) CreateBufferInit(descriptor *BufferInitDescriptor) (*Buffer, error)
func (*Device) CreateCommandEncoder ¶
func (p *Device) CreateCommandEncoder(descriptor *wgpu.CommandEncoderDescriptor) (wgpu.ICommandEncoder, 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 (*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) CreateSwapChain ¶
func (p *Device) CreateSwapChain(surface *Surface, descriptor *SwapChainDescriptor) (*SwapChain, error)
func (*Device) CreateTexture ¶
func (p *Device) CreateTexture(descriptor *TextureDescriptor) (*Texture, error)
func (*Device) EnumerateFeatures ¶
func (p *Device) EnumerateFeatures() []wgpu.FeatureName
func (*Device) GetLimits ¶
func (p *Device) GetLimits() wgpu.SupportedLimits
func (*Device) HasFeature ¶
func (p *Device) HasFeature(feature FeatureName) bool
type DeviceLostCallback ¶
type DeviceLostCallback func(reason DeviceLostReason, message string)
type DeviceLostReason ¶
type DeviceLostReason uint32
const ( DeviceLostReason_Undefined DeviceLostReason = 0x00000000 DeviceLostReason_Destroyed DeviceLostReason = 0x00000001 )
func (DeviceLostReason) String ¶
func (v DeviceLostReason) String() string
type Dx12Compiler ¶
type Dx12Compiler uint32
const ( Dx12Compiler_Undefined Dx12Compiler = 0x00000000 Dx12Compiler_Fxc Dx12Compiler = 0x00000001 Dx12Compiler_Dxc Dx12Compiler = 0x00000002 )
func (Dx12Compiler) String ¶
func (v Dx12Compiler) String() string
type ErrorFilter ¶
type ErrorFilter uint32
const ( ErrorFilter_Validation ErrorFilter = 0x00000000 ErrorFilter_OutOfMemory ErrorFilter = 0x00000001 ErrorFilter_Internal ErrorFilter = 0x00000002 )
func (ErrorFilter) String ¶
func (v ErrorFilter) String() string
type FeatureName ¶
type FeatureName uint32
const ( FeatureName_Undefined FeatureName = 0x00000000 FeatureName_DepthClipControl FeatureName = 0x00000001 FeatureName_Depth32FloatStencil8 FeatureName = 0x00000002 FeatureName_TimestampQuery FeatureName = 0x00000003 FeatureName_PipelineStatisticsQuery FeatureName = 0x00000004 FeatureName_TextureCompressionBC FeatureName = 0x00000005 FeatureName_TextureCompressionETC2 FeatureName = 0x00000006 FeatureName_TextureCompressionASTC FeatureName = 0x00000007 FeatureName_IndirectFirstInstance FeatureName = 0x00000008 FeatureName_ShaderF16 FeatureName = 0x00000009 FeatureName_RG11B10UfloatRenderable FeatureName = 0x0000000A FeatureName_BGRA8UnormStorage FeatureName = 0x0000000B FeatureName_Float32Filterable FeatureName = 0x0000000C NativeFeature_PushConstants FeatureName = 0x60000001 NativeFeature_TextureAdapterSpecificFormatFeatures FeatureName = 0x60000002 NativeFeature_MultiDrawIndirect FeatureName = 0x60000003 NativeFeature_MultiDrawIndirectCount FeatureName = 0x60000004 NativeFeature_VertexWritableStorage FeatureName = 0x60000005 )
func (FeatureName) String ¶
func (v FeatureName) String() string
type FilterMode ¶
type FilterMode uint32
const ( FilterMode_Nearest FilterMode = 0x00000000 FilterMode_Linear FilterMode = 0x00000001 )
func (FilterMode) String ¶
func (v FilterMode) String() string
type FragmentState ¶
type FragmentState struct { Module *ShaderModule EntryPoint string Targets []ColorTargetState }
type GlobalReport ¶
type HubReport ¶
type HubReport struct { Adapters StorageReport Devices StorageReport PipelineLayouts StorageReport ShaderModules StorageReport BindGroupLayouts StorageReport BindGroups StorageReport CommandBuffers StorageReport RenderBundles StorageReport RenderPipelines StorageReport ComputePipelines StorageReport QuerySets StorageReport Buffers StorageReport Textures StorageReport TextureViews StorageReport Samplers StorageReport }
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 ( IndexFormat_Undefined IndexFormat = 0x00000000 IndexFormat_Uint16 IndexFormat = 0x00000001 IndexFormat_Uint32 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 ( InstanceBackend_None InstanceBackend = 0x00000000 InstanceBackend_Vulkan InstanceBackend = 0x00000002 InstanceBackend_Metal InstanceBackend = 0x00000004 InstanceBackend_DX12 InstanceBackend = 0x00000008 InstanceBackend_DX11 InstanceBackend = 0x00000010 InstanceBackend_GL InstanceBackend = 0x00000020 InstanceBackend_Secondary InstanceBackend = 0x00000030 InstanceBackend_BrowserWebGPU InstanceBackend = 0x00000040 InstanceBackend_Primary InstanceBackend = 0x0000004E )
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 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 ( MipmapFilterMode_Nearest MipmapFilterMode = 0x00000000 MipmapFilterMode_Linear MipmapFilterMode = 0x00000001 )
func (MipmapFilterMode) String ¶
func (v MipmapFilterMode) String() string
type MultisampleState ¶
type PipelineLayout ¶
type PipelineLayout struct {
// contains filtered or unexported fields
}
func (*PipelineLayout) Ref ¶
func (p *PipelineLayout) Ref() any
func (*PipelineLayout) Release ¶
func (p *PipelineLayout) Release()
type PipelineLayoutDescriptor ¶
type PipelineLayoutDescriptor struct { Label string BindGroupLayouts []*BindGroupLayout PushConstantRanges []PushConstantRange }
type PresentMode ¶
type PresentMode uint32
const ( PresentMode_Immediate PresentMode = 0x00000000 PresentMode_Mailbox PresentMode = 0x00000001 PresentMode_Fifo PresentMode = 0x00000002 )
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 ( PrimitiveTopology_PointList PrimitiveTopology = 0x00000000 PrimitiveTopology_LineList PrimitiveTopology = 0x00000001 PrimitiveTopology_LineStrip PrimitiveTopology = 0x00000002 PrimitiveTopology_TriangleList PrimitiveTopology = 0x00000003 PrimitiveTopology_TriangleStrip PrimitiveTopology = 0x00000004 )
func (PrimitiveTopology) String ¶
func (v PrimitiveTopology) String() string
type ProgrammableStageDescriptor ¶
type ProgrammableStageDescriptor struct { Module *ShaderModule EntryPoint string }
type PushConstantRange ¶
type PushConstantRange struct { Stages wgpu.ShaderStage Start uint32 End uint32 }
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) OnSubmittedWorkDone ¶
func (p *Queue) OnSubmittedWorkDone(callback wgpu.QueueWorkDoneCallback)
func (*Queue) Submit ¶
func (p *Queue) Submit(commands ...wgpu.ICommandBuffer) (submissionIndex wgpu.SubmissionIndex)
func (*Queue) WriteBuffer ¶
func (*Queue) WriteTexture ¶
func (p *Queue) WriteTexture(destination *wgpu.ImageCopyTexture, data []byte, dataLayout *wgpu.TextureDataLayout, writeSize *wgpu.Extent3D) (err error)
type QueueWorkDoneStatus ¶
type QueueWorkDoneStatus uint32
const ( QueueWorkDoneStatus_Success QueueWorkDoneStatus = 0x00000000 QueueWorkDoneStatus_Error QueueWorkDoneStatus = 0x00000001 QueueWorkDoneStatus_Unknown QueueWorkDoneStatus = 0x00000002 QueueWorkDoneStatus_DeviceLost QueueWorkDoneStatus = 0x00000003 )
func (QueueWorkDoneStatus) String ¶
func (v QueueWorkDoneStatus) String() string
type RenderBundle ¶
type RenderBundle struct {
// contains filtered or unexported fields
}
func (*RenderBundle) Ref ¶
func (p *RenderBundle) Ref() any
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 []wgpu.TextureFormat DepthStencilFormat wgpu.TextureFormat SampleCount uint32 DepthReadOnly bool StencilReadOnly bool }
type RenderPassColorAttachment ¶
type RenderPassColorAttachment struct { View *TextureView ResolveTarget *TextureView LoadOp LoadOp StoreOp StoreOp ClearValue Color }
type RenderPassDescriptor ¶
type RenderPassDescriptor struct { Label string ColorAttachments []RenderPassColorAttachment DepthStencilAttachment *RenderPassDepthStencilAttachment }
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 wgpu.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 RenderPassTimestampLocation ¶
type RenderPassTimestampLocation uint32
const ( RenderPassTimestampLocation_Beginning RenderPassTimestampLocation = 0x00000000 RenderPassTimestampLocation_End RenderPassTimestampLocation = 0x00000001 )
func (RenderPassTimestampLocation) String ¶
func (v RenderPassTimestampLocation) String() string
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 }
type RequestAdapterOptions ¶
type RequestAdapterOptions struct { CompatibleSurface *Surface PowerPreference wgpu.PowerPreference ForceFallbackAdapter bool BackendType wgpu.BackendType }
type RequestAdapterStatus ¶
type RequestAdapterStatus uint32
const ( RequestAdapterStatus_Success RequestAdapterStatus = 0x00000000 RequestAdapterStatus_Error RequestAdapterStatus = 0x00000002 RequestAdapterStatus_Unknown RequestAdapterStatus = 0x00000003 )
func (RequestAdapterStatus) String ¶
func (v RequestAdapterStatus) String() string
type RequestDeviceStatus ¶
type RequestDeviceStatus uint32
const ( RequestDeviceStatus_Success RequestDeviceStatus = 0x00000000 RequestDeviceStatus_Error RequestDeviceStatus = 0x00000001 RequestDeviceStatus_Unknown RequestDeviceStatus = 0x00000002 )
func (RequestDeviceStatus) String ¶
func (v RequestDeviceStatus) 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 MaxAnisotrophy uint16 }
type ShaderModule ¶
type ShaderModule struct {
// contains filtered or unexported fields
}
func (*ShaderModule) Ref ¶
func (p *ShaderModule) Ref() any
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 wgpu.ShaderStage }
type ShaderModuleSPIRVDescriptor ¶
type ShaderModuleSPIRVDescriptor struct {
Code []byte
}
type ShaderModuleWGSLDescriptor ¶
type ShaderModuleWGSLDescriptor struct {
Code string
}
type StencilFaceState ¶
type StencilFaceState struct { Compare CompareFunction FailOp StencilOperation DepthFailOp StencilOperation PassOp StencilOperation }
type StencilOperation ¶
type StencilOperation uint32
const ( StencilOperation_Keep StencilOperation = 0x00000000 StencilOperation_Zero StencilOperation = 0x00000001 StencilOperation_Replace StencilOperation = 0x00000002 StencilOperation_Invert StencilOperation = 0x00000003 StencilOperation_IncrementClamp StencilOperation = 0x00000004 StencilOperation_DecrementClamp StencilOperation = 0x00000005 StencilOperation_IncrementWrap StencilOperation = 0x00000006 StencilOperation_DecrementWrap StencilOperation = 0x00000007 )
func (StencilOperation) String ¶
func (v StencilOperation) String() string
type StorageReport ¶
type Surface ¶
type Surface struct {
// contains filtered or unexported fields
}
func (*Surface) GetCapabilities ¶
func (p *Surface) GetCapabilities(adapter *Adapter) (ret SurfaceCapabilities)
func (*Surface) GetPreferredFormat ¶
func (p *Surface) GetPreferredFormat(adapter *Adapter) wgpu.TextureFormat
type SurfaceCapabilities ¶
type SurfaceCapabilities struct { Formats []wgpu.TextureFormat PresentModes []wgpu.PresentMode AlphaModes []wgpu.CompositeAlphaMode }
type SurfaceDescriptor ¶
type SurfaceDescriptor struct { Label string WindowsHWND *SurfaceDescriptorFromWindowsHWND XcbWindow *SurfaceDescriptorFromXcbWindow XlibWindow *SurfaceDescriptorFromXlibWindow MetalLayer *SurfaceDescriptorFromMetalLayer WaylandSurface *SurfaceDescriptorFromWaylandSurface AndroidNativeWindow *SurfaceDescriptorFromAndroidNativeWindow }
func GetSurfaceDescriptor ¶
func GetSurfaceDescriptor(w *glfw.Window) *SurfaceDescriptor
type SwapChain ¶
type SwapChain struct {
// contains filtered or unexported fields
}
func (*SwapChain) GetCurrentTextureView ¶
func (p *SwapChain) GetCurrentTextureView() (*TextureView, error)
type SwapChainDescriptor ¶
type SwapChainDescriptor struct { Usage wgpu.TextureUsage Format wgpu.TextureFormat Width uint32 Height uint32 PresentMode wgpu.PresentMode AlphaMode wgpu.CompositeAlphaMode ViewFormats []wgpu.TextureFormat }
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 *wgpu.TextureViewDescriptor) (*wgpu.ITextureView, error)
func (*Texture) GetDepthOrArrayLayers ¶
func (*Texture) GetDimension ¶
func (p *Texture) GetDimension() wgpu.TextureDimension
func (*Texture) GetFormat ¶
func (p *Texture) GetFormat() wgpu.TextureFormat
func (*Texture) GetMipLevelCount ¶
func (*Texture) GetSampleCount ¶
func (*Texture) GetUsage ¶
func (p *Texture) GetUsage() TextureUsage
type TextureAspect ¶
type TextureAspect uint32
const ( TextureAspect_All TextureAspect = 0x00000000 TextureAspect_StencilOnly TextureAspect = 0x00000001 TextureAspect_DepthOnly TextureAspect = 0x00000002 )
func (TextureAspect) String ¶
func (v TextureAspect) String() string
type TextureDataLayout ¶
type TextureDescriptor ¶
type TextureDescriptor struct { Label string Usage wgpu.TextureUsage Dimension wgpu.TextureDimension Size wgpu.Extent3D Format wgpu.TextureFormat MipLevelCount uint32 SampleCount uint32 }
type TextureDimension ¶
type TextureDimension uint32
const ( TextureDimension_1D TextureDimension = 0x00000000 TextureDimension_2D TextureDimension = 0x00000001 TextureDimension_3D TextureDimension = 0x00000002 )
func (TextureDimension) String ¶
func (v TextureDimension) String() string
type TextureUsage ¶
type TextureUsage uint32
const ( TextureUsage_None TextureUsage = 0x00000000 TextureUsage_CopySrc TextureUsage = 0x00000001 TextureUsage_CopyDst TextureUsage = 0x00000002 TextureUsage_TextureBinding TextureUsage = 0x00000004 TextureUsage_StorageBinding TextureUsage = 0x00000008 TextureUsage_RenderAttachment TextureUsage = 0x00000010 )
func (TextureUsage) String ¶
func (v TextureUsage) String() string
type TextureView ¶
type TextureView struct {
// contains filtered or unexported fields
}
func (*TextureView) Ref ¶
func (p *TextureView) Ref() any
func (*TextureView) Release ¶
func (p *TextureView) Release()
type TextureViewDescriptor ¶
type TextureViewDescriptor struct { Label string Format wgpu.TextureFormat Dimension wgpu.TextureViewDimension BaseMipLevel uint32 MipLevelCount uint32 BaseArrayLayer uint32 ArrayLayerCount uint32 Aspect wgpu.TextureAspect }
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 ( VertexFormat_Undefined VertexFormat = 0x00000000 VertexFormat_Uint8x2 VertexFormat = 0x00000001 VertexFormat_Uint8x4 VertexFormat = 0x00000002 VertexFormat_Sint8x2 VertexFormat = 0x00000003 VertexFormat_Sint8x4 VertexFormat = 0x00000004 VertexFormat_Unorm8x2 VertexFormat = 0x00000005 VertexFormat_Unorm8x4 VertexFormat = 0x00000006 VertexFormat_Snorm8x2 VertexFormat = 0x00000007 VertexFormat_Snorm8x4 VertexFormat = 0x00000008 VertexFormat_Uint16x2 VertexFormat = 0x00000009 VertexFormat_Uint16x4 VertexFormat = 0x0000000A VertexFormat_Sint16x2 VertexFormat = 0x0000000B VertexFormat_Sint16x4 VertexFormat = 0x0000000C VertexFormat_Unorm16x2 VertexFormat = 0x0000000D VertexFormat_Unorm16x4 VertexFormat = 0x0000000E VertexFormat_Snorm16x2 VertexFormat = 0x0000000F VertexFormat_Snorm16x4 VertexFormat = 0x00000010 VertexFormat_Float16x2 VertexFormat = 0x00000011 VertexFormat_Float16x4 VertexFormat = 0x00000012 VertexFormat_Float32 VertexFormat = 0x00000013 VertexFormat_Float32x2 VertexFormat = 0x00000014 VertexFormat_Float32x3 VertexFormat = 0x00000015 VertexFormat_Float32x4 VertexFormat = 0x00000016 VertexFormat_Uint32 VertexFormat = 0x00000017 VertexFormat_Uint32x2 VertexFormat = 0x00000018 VertexFormat_Uint32x3 VertexFormat = 0x00000019 VertexFormat_Uint32x4 VertexFormat = 0x0000001A VertexFormat_Sint32 VertexFormat = 0x0000001B VertexFormat_Sint32x2 VertexFormat = 0x0000001C VertexFormat_Sint32x3 VertexFormat = 0x0000001D VertexFormat_Sint32x4 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 ( VertexStepMode_Vertex VertexStepMode = 0x00000000 VertexStepMode_Instance VertexStepMode = 0x00000001 VertexStepMode_VertexBufferNotUsed VertexStepMode = 0x00000002 )
func (VertexStepMode) String ¶
func (v VertexStepMode) String() string
type WrappedSubmissionIndex ¶
type WrappedSubmissionIndex struct { Queue *Queue SubmissionIndex wgpu.SubmissionIndex }
Source Files ¶
- adapter.go
- bridge.go
- buffer.go
- buffer_ext.go
- canvas.go
- command_encoder.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
- surface_x11_linux.go
- swap_chain.go
- texture.go
- texture_ext.go
- vendor.go
- wgpu.go
- wgpu_c_cb.go
- wgpu_ext.go
Click to show internal directories.
Click to hide internal directories.