@webgpu/types
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -1,6 +0,6 @@ | ||
// https://github.com/gpuweb/gpuweb/blob/0a48816412b5d08a5fb8b89005e019165a1a2c63/spec/index.bs | ||
// except #280 which removed setSubData | ||
// https://github.com/gpuweb/gpuweb/blob/01b20b4ad93fabae1e8e0d7752515f69708d33e0/spec/index.bs | ||
// except #494 which reverted the addition of GPUAdapter.limits | ||
// except #591 which removed Uint32Array from GPUShaderModuleDescriptor | ||
// including #543 which adds GPUPipelineBase.getBindGroupLayout | ||
// except #708's removal of mapWriteAsync/mapReadAsync/createBufferMapped | ||
// except #691 et al which added pipeline statistics query (still in flux) | ||
@@ -195,11 +195,12 @@ export {}; | ||
export const GPUBufferUsage: { | ||
MAP_READ: 0x0001; | ||
MAP_WRITE: 0x0002; | ||
COPY_SRC: 0x0004; | ||
COPY_DST: 0x0008; | ||
INDEX: 0x0010; | ||
VERTEX: 0x0020; | ||
UNIFORM: 0x0040; | ||
STORAGE: 0x0080; | ||
INDIRECT: 0x0100; | ||
MAP_READ: 0x0001; | ||
MAP_WRITE: 0x0002; | ||
COPY_SRC: 0x0004; | ||
COPY_DST: 0x0008; | ||
INDEX: 0x0010; | ||
VERTEX: 0x0020; | ||
UNIFORM: 0x0040; | ||
STORAGE: 0x0080; | ||
INDIRECT: 0x0100; | ||
QUERY_RESOLVE: 0x0200; | ||
}; | ||
@@ -278,4 +279,3 @@ | ||
export interface GPUBufferCopyView { | ||
buffer: GPUBuffer; | ||
export interface GPUTextureDataLayout { | ||
offset?: number; | ||
@@ -286,6 +286,9 @@ bytesPerRow: number; | ||
export interface GPUBufferCopyView extends GPUTextureDataLayout { | ||
buffer: GPUBuffer; | ||
} | ||
export interface GPUTextureCopyView { | ||
texture: GPUTexture; | ||
mipLevel?: number; | ||
arrayLayer?: number; | ||
origin?: GPUOrigin3D; | ||
@@ -302,2 +305,3 @@ } | ||
usage: GPUBufferUsageFlags; | ||
mappedAtCreation?: boolean; | ||
} | ||
@@ -412,5 +416,7 @@ | ||
depthStoreOp: GPUStoreOp; | ||
depthReadOnly?: boolean; | ||
stencilLoadValue: GPULoadOp | number; | ||
stencilStoreOp: GPUStoreOp; | ||
stencilReadOnly?: boolean; | ||
} | ||
@@ -455,2 +461,4 @@ | ||
label?: string; | ||
sourceMap?: object; | ||
} | ||
@@ -514,15 +522,11 @@ | ||
//readonly mapping: ArrayBuffer | null; | ||
destroy(): void; | ||
unmap(): void; | ||
mapAsync(offset?: number, size?: number): Promise<void>; | ||
getMappedRange(offset?: number, size?: number): ArrayBuffer; | ||
// TODO: remove | ||
mapWriteAsync(): Promise<ArrayBuffer>; | ||
mapReadAsync(): Promise<ArrayBuffer>; | ||
// TODO: Remove setSubData (#280) | ||
setSubData( | ||
offset: number, | ||
src: ArrayBufferView, | ||
srcOffset?: number, | ||
byteLength?: number | ||
): void; | ||
} | ||
@@ -656,2 +660,4 @@ | ||
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; | ||
defaultQueue: GPUQueue; | ||
@@ -701,2 +707,13 @@ | ||
createFence(descriptor?: GPUFenceDescriptor): GPUFence; | ||
writeBuffer(buffer: GPUBuffer, | ||
bufferOffset: number, | ||
data: ArrayBuffer, | ||
dataOffset?: number, | ||
size?: number): void; | ||
writeTexture(destination: GPUTextureCopyView, | ||
data: ArrayBuffer, | ||
dataLayout: GPUTextureDataLayout, | ||
size: GPUExtent3D): void; | ||
copyImageBitmapToTexture( | ||
@@ -709,2 +726,17 @@ source: GPUImageBitmapCopyView, | ||
type GPUQueryType = | ||
| "occlusion"; | ||
export interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { | ||
type: GPUQueryType; | ||
count: number; | ||
} | ||
export class GPUQuerySet implements GPUObjectBase { | ||
private __brand: void; | ||
label: string | undefined; | ||
destroy(): void; | ||
} | ||
export interface GPURenderEncoderBase extends GPUProgrammablePassEncoder { | ||
@@ -718,12 +750,12 @@ setPipeline(pipeline: GPURenderPipeline): void; | ||
vertexCount: number, | ||
instanceCount: number, | ||
firstVertex: number, | ||
firstInstance: number | ||
instanceCount?: number, | ||
firstVertex?: number, | ||
firstInstance?: number | ||
): void; | ||
drawIndexed( | ||
indexCount: number, | ||
instanceCount: number, | ||
firstIndex: number, | ||
baseVertex: number, | ||
firstInstance: number | ||
instanceCount?: number, | ||
firstIndex?: number, | ||
baseVertex?: number, | ||
firstInstance?: number | ||
): void; | ||
@@ -790,2 +822,5 @@ | ||
beginOcclusionQuery(queryIndex: number): void; | ||
endOcclusionQuery(queryIndex: number): void; | ||
executeBundles(bundles: Iterable<GPURenderBundle>): void; | ||
@@ -863,5 +898,23 @@ endPass(): void; | ||
export type GPUCompilationMessageType = | ||
| "error" | ||
| "warning" | ||
| "info"; | ||
export interface GPUCompilationMessage { | ||
readonly message: string; | ||
readonly type: GPUCompilationMessageType; | ||
readonly lineNum: number; | ||
readonly linePos: number; | ||
} | ||
export interface GPUCompilationInfo { | ||
readonly messages: Iterable<GPUCompilationMessage>; | ||
} | ||
export class GPUShaderModule implements GPUObjectBase { | ||
private __brand: void; | ||
label: string | undefined; | ||
compilationInfo(): Promise<GPUCompilationInfo>; | ||
} | ||
@@ -868,0 +921,0 @@ |
{ | ||
"name": "@webgpu/types", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"main": "", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -1,2 +0,2 @@ | ||
// https://github.com/gpuweb/gpuweb/blob/0a48816412b5d08a5fb8b89005e019165a1a2c63/spec/index.bs | ||
// https://github.com/gpuweb/gpuweb/blob/01b20b4ad93fabae1e8e0d7752515f69708d33e0/spec/index.bs | ||
@@ -196,2 +196,10 @@ // tslint:disable:variable-name | ||
} | ||
export const enum CompilationMessageType { | ||
Error = 'error', | ||
Warning = 'warning', | ||
Info = 'info', | ||
} | ||
export const enum QueryType { | ||
Occlusion = 'occlusion', | ||
} | ||
@@ -209,2 +217,3 @@ // Bit fields | ||
Indirect = 0x0100, | ||
QueryResolve = 0x0200, | ||
} | ||
@@ -211,0 +220,0 @@ export const enum ColorWrite { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48440
1524
1