Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@webgpu/types

Package Overview
Dependencies
Maintainers
4
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webgpu/types - npm Package Compare versions

Comparing version 0.0.30 to 0.0.31

118

dist/index.d.ts

@@ -1,8 +0,5 @@

// https://github.com/gpuweb/gpuweb/blob/01b20b4ad93fabae1e8e0d7752515f69708d33e0/spec/index.bs
// https://github.com/gpuweb/gpuweb/blob/38236513beaf98e1579b212c0df6f33bd19691ab/spec/index.bs
// except #494 which reverted the addition of GPUAdapter.limits
// except #591 which removed Uint32Array from GPUShaderModuleDescriptor
// except #708's removal of mapWriteAsync/mapReadAsync/createBufferMapped
// except #691 et al which added pipeline statistics query (still in flux)
// including #678 which adds GPUBindGroupLayoutEntry.minBufferBindingSize
// including #605 which adds new mapping, but without removing the old mapping
// except removal of old setIndexBuffer signature in #943

@@ -51,3 +48,6 @@ export {};

export type GPUExtensionName =
| "texture-compression-bc";
| "texture-compression-bc"
| "timestamp-query"
| "pipeline-statistics-query"
| "depth-clamping";
export type GPUAddressMode = "clamp-to-edge" | "repeat" | "mirror-repeat";

@@ -331,2 +331,4 @@ export type GPUBindingType =

label?: string;
measureExecutionTime?: boolean;
}

@@ -389,15 +391,5 @@

maxUniformBuffersPerShaderStage?: number;
maxUniformBufferBindingSize?: number;
}
export interface GPULimitsOut extends GPULimits {
maxBindGroups: number;
maxDynamicUniformBuffersPerPipelineLayout: number;
maxDynamicStorageBuffersPerPipelineLayout: number;
maxSampledTexturesPerShaderStage: number;
maxSamplersPerShaderStage: number;
maxStorageBuffersPerShaderStage: number;
maxStorageTexturesPerShaderStage: number;
maxUniformBuffersPerShaderStage: number;
}
export interface GPUPipelineDescriptorBase {

@@ -420,2 +412,3 @@ label?: string;

cullMode?: GPUCullMode;
clampDepth?: boolean;
depthBias?: number;

@@ -468,12 +461,12 @@ depthBiasSlopeScale?: number;

export interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
compare?: GPUCompareFunction;
lodMaxClamp?: number;
lodMinClamp?: number;
addressModeU?: GPUAddressMode;
addressModeV?: GPUAddressMode;
addressModeW?: GPUAddressMode;
magFilter?: GPUFilterMode;
maxAnisotropy?: number;
minFilter?: GPUFilterMode;
mipmapFilter?: GPUFilterMode;
addressModeU?: GPUAddressMode;
addressModeV?: GPUAddressMode;
addressModeW?: GPUAddressMode;
lodMinClamp?: number;
lodMaxClamp?: number;
compare?: GPUCompareFunction;
maxAnisotropy?: number;
}

@@ -525,5 +518,5 @@

readonly extensions: GPUExtensionName[];
readonly limits: GPULimitsOut;
readonly limits: Required<GPULimits>;
requestDevice(descriptor?: GPUDeviceDescriptor): Promise<GPUDevice>;
requestDevice(descriptor?: GPUDeviceDescriptor): Promise<GPUDevice | null>;
}

@@ -550,6 +543,2 @@

getMappedRange(offset?: number, size?: number): ArrayBuffer;
// TODO: remove
mapWriteAsync(): Promise<ArrayBuffer>;
mapReadAsync(): Promise<ArrayBuffer>;
}

@@ -560,2 +549,4 @@

label: string | undefined;
readonly executionTime: Promise<number>;
}

@@ -597,2 +588,4 @@

writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;
popDebugGroup(): void;

@@ -605,3 +598,3 @@ pushDebugGroup(groupLabel: string): void;

export class GPUComputePassEncoder implements GPUProgrammablePassEncoder {
export class GPUComputePassEncoder implements GPUObjectBase, GPUProgrammablePassEncoder {
private __brand: void;

@@ -624,2 +617,6 @@ label: string | undefined;

writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;
beginPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;
endPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;
endPass(): void;

@@ -657,3 +654,3 @@ }

readonly extensions: GPUExtensionName[];
readonly limits: GPULimitsOut;
readonly limits: Required<GPULimits>;

@@ -665,14 +662,5 @@ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;

createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
createBufferMapped(
descriptor: GPUBufferDescriptor
): [GPUBuffer, ArrayBuffer];
createComputePipeline(
descriptor: GPUComputePipelineDescriptor
): GPUComputePipeline;
createPipelineLayout(
descriptor: GPUPipelineLayoutDescriptor
): GPUPipelineLayout;
createRenderPipeline(
descriptor: GPURenderPipelineDescriptor
): GPURenderPipeline;
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;

@@ -682,2 +670,15 @@ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;

createComputePipeline(
descriptor: GPUComputePipelineDescriptor
): GPUComputePipeline;
createRenderPipeline(
descriptor: GPURenderPipelineDescriptor
): GPURenderPipeline;
createReadyComputePipeline(
descriptor: GPUComputePipelineDescriptor
): Promise<GPUComputePipeline>;
createReadyRenderPipeline(
descriptor: GPURenderPipelineDescriptor
): Promise<GPURenderPipeline>;
createCommandEncoder(

@@ -717,3 +718,3 @@ descriptor?: GPUCommandEncoderDescriptor

export interface GPUProgrammablePassEncoder extends GPUObjectBase {
export interface GPUProgrammablePassEncoder {
setBindGroup(

@@ -740,7 +741,7 @@ index: number,

bufferOffset: number,
data: ArrayBuffer,
data: BufferSource | SharedArrayBuffer,
dataOffset?: number,
size?: number): void;
writeTexture(destination: GPUTextureCopyView,
data: ArrayBuffer,
data: BufferSource | SharedArrayBuffer,
dataLayout: GPUTextureDataLayout,

@@ -757,3 +758,11 @@ size: GPUExtent3D): void;

type GPUQueryType =
| "occlusion";
| "occlusion"
| "timestamp"
| "pipeline-statistics";
type GPUPipelineStatisticName =
| "vertex-shader-invocations"
| "clipper-invocations"
| "clipper-primitives-out"
| "fragment-shader-invocations"
| "compute-shader-invocations";

@@ -763,2 +772,3 @@ export interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {

count: number;
pipelineStatistics?: Iterable<GPUPipelineStatisticName>;
}

@@ -773,6 +783,7 @@

export interface GPURenderEncoderBase extends GPUProgrammablePassEncoder {
export interface GPURenderEncoderBase {
setPipeline(pipeline: GPURenderPipeline): void;
setIndexBuffer(buffer: GPUBuffer, offset?: number, size?: number): void;
setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: number, size?: number): void;
setVertexBuffer(slot: number, buffer: GPUBuffer, offset?: number, size?: number): void;

@@ -801,3 +812,3 @@

export class GPURenderPassEncoder implements GPURenderEncoderBase {
export class GPURenderPassEncoder implements GPUObjectBase, GPUProgrammablePassEncoder, GPURenderEncoderBase {
private __brand: void;

@@ -819,2 +830,3 @@ label: string | undefined;

setIndexBuffer(buffer: GPUBuffer, offset?: number): void;
setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: number, size?: number): void;
setVertexBuffer(slot: number, buffer: GPUBuffer, offset?: number): void;

@@ -855,4 +867,7 @@

writeTimestamp(querySet: GPUQuerySet, queryIndex: number): void;
beginOcclusionQuery(queryIndex: number): void;
endOcclusionQuery(queryIndex: number): void;
endOcclusionQuery(): void;
beginPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;
endPipelineStatisticsQuery(querySet: GPUQuerySet, queryIndex: number): void;

@@ -887,2 +902,3 @@ executeBundles(bundles: Iterable<GPURenderBundle>): void;

setIndexBuffer(buffer: GPUBuffer, offset?: number): void;
setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: number, size?: number): void;
setVertexBuffer(slot: number, buffer: GPUBuffer, offset?: number): void;

@@ -945,3 +961,3 @@

export interface GPUCompilationInfo {
readonly messages: Iterable<GPUCompilationMessage>;
readonly messages: readonly GPUCompilationMessage[];
}

@@ -983,3 +999,3 @@

private __brand: void;
requestAdapter(options?: GPURequestAdapterOptions): Promise<GPUAdapter>;
requestAdapter(options?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
}

@@ -991,3 +1007,3 @@

export type GPUErrorFilter = "none" | "out-of-memory" | "validation";
export type GPUErrorFilter = "out-of-memory" | "validation";

@@ -994,0 +1010,0 @@ export class GPUOutOfMemoryError {

{
"name": "@webgpu/types",
"version": "0.0.30",
"version": "0.0.31",
"main": "",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc