@maptalks/gpu 0.119.0 → 0.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@webgpu/types" />
2
2
  /*!
3
- * @maptalks/gpu v0.119.0
3
+ * @maptalks/gpu v0.121.0
4
4
  * LICENSE : UNLICENSED
5
5
  * (c) 2016-2026 maptalks.com
6
6
  */
@@ -84,6 +84,7 @@ declare class TerrainLayer extends TerrainLayer_base {
84
84
  error: any;
85
85
  children: any[];
86
86
  };
87
+ _getErrorScale(): number;
87
88
  }
88
89
 
89
90
  declare class GraphicsFramebuffer {
@@ -94,11 +95,19 @@ declare class GraphicsFramebuffer {
94
95
  constructor(device: any, options: any);
95
96
  get color(): GraphicsTexture[];
96
97
  resize(width: any, height: any): void;
98
+ getCommandKey(): string;
97
99
  _update(): void;
98
100
  getRenderPassDescriptor(): GPURenderPassDescriptor;
99
101
  setClearOptions(options: any): void;
100
- _resetClearOptions(): void;
102
+ resetClearOptions(): void;
101
103
  destroy(): void;
104
+ isDestroyed(): boolean;
105
+ }
106
+
107
+ declare class GraphicsCubeTexture extends GraphicsTexture {
108
+ get arrayLayers(): number;
109
+ getMipLevelCount(): any;
110
+ fillData(texture: any, width: any, height: any): void;
102
111
  }
103
112
 
104
113
  declare class GraphicsDevice {
@@ -114,11 +123,13 @@ declare class GraphicsDevice {
114
123
  getRenderPassEncoder(fbo: GraphicsFramebuffer): GPURenderPassEncoder;
115
124
  addCommandBuffer(commandBuffer: GPUCommandBuffer, front: boolean): void;
116
125
  submit(): void;
126
+ addToDestroyList(texture: GPUTexture): void;
117
127
  preserveDrawingBuffer(canvas: any): void;
118
128
  buffer(options: any): any;
119
129
  elements(options: any): any;
120
130
  framebuffer(width: any, height: any): GraphicsFramebuffer;
121
131
  texture(width: any, height?: any): GraphicsTexture;
132
+ cube(options: REGL__default.TextureCubeOptions): GraphicsCubeTexture;
122
133
  clear(options: any): void;
123
134
  read(options: any): any;
124
135
  destroy(): void;
@@ -126,23 +137,35 @@ declare class GraphicsDevice {
126
137
  resetDrawCalls(): void;
127
138
  getDrawCalls(): 0;
128
139
  _renderToClear(fbo: any): void;
129
- _getEmptyPipeline(fbo: any): any;
140
+ _getClearPipeline(fbo: any): GPURenderPipeline;
130
141
  }
131
142
 
132
143
  declare class GraphicsTexture {
133
144
  texture: GPUTexture;
134
145
  device: GraphicsDevice;
135
146
  config: any;
147
+ version: number;
136
148
  constructor(device: GraphicsDevice, config: any);
137
149
  get width(): any;
138
150
  get height(): any;
151
+ get arrayLayers(): number;
139
152
  updateFilter(): void;
140
- _clearBindGroups(): void;
141
153
  resize(width: any, height: any): void;
142
154
  update(config: any): void;
143
155
  _updateTexture(): void;
156
+ _isDirty(newConfig: any): boolean;
157
+ _getSize(config: any): {
158
+ width: any;
159
+ height: any;
160
+ };
161
+ getMipLevelCount(data?: any): any;
162
+ fillData(texture: any, width: any, height: any): void;
163
+ fillImageData(texture: any, data: any, width: any, height: any, origin: any): void;
164
+ fillArrayData(texture: any, data: any, width: any, height: any, origin: any): void;
165
+ _fillMipmap(texture: any, mipLevel: any, data: any, width: any, height: any, origin: any): void;
166
+ formatTextureArray(data: any, arrayBuffer: any, width: any, height: any): any;
167
+ isArrayData(data: any): boolean;
144
168
  getView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
145
- addBindGroup(bindGroup: any): void;
146
169
  destroy(): void;
147
170
  }
148
171
 
@@ -337,7 +360,7 @@ declare class BoundingBox {
337
360
  declare class Geometry {
338
361
  static createElementBuffer(device: any, elements: any): any;
339
362
  static createBuffer(device: any, data: any, name?: string): any;
340
- static padGPUBufferAlignment(array: TypedArray, vertexCount: number): TypedArray;
363
+ static padGPUBufferAlignment(array: TypedArray, vertexCount: number, transient?: boolean): TypedArray;
341
364
  data: Record<string, AttributeData>;
342
365
  elements: any;
343
366
  desc: GeometryDesc;
@@ -562,7 +585,6 @@ declare class DynamicBuffer {
562
585
 
563
586
  type BindGroupResult = {
564
587
  bindGroup: GPUBindGroup;
565
- outdated: boolean;
566
588
  uniformTextures?: any;
567
589
  };
568
590
  declare class BindGroupFormat {
@@ -1074,14 +1096,14 @@ declare class GLShader {
1074
1096
  _compileSource(): void;
1075
1097
  }
1076
1098
  declare class GPUShader extends GLShader {
1077
- getShaderCommandKey(device: any, mesh: any, renderProps: any): any;
1099
+ getShaderCommandKey(device: any, mesh: any, renderProps: any): string;
1078
1100
  createMeshCommand(device: any, mesh: Mesh$1, commandProps: any, renderProps: any): any;
1079
1101
  _compileWGSLSource(defines: any): {
1080
1102
  vert: any;
1081
1103
  frag: any;
1082
1104
  };
1083
1105
  run(deviceOrRegl: any, command: CommandStruct, props: any): any;
1084
- _checkBindGroupTextures(bindGroup: BindGroupResult, props: any): boolean;
1106
+ _checkBindGroupOutdated(bindGroup: BindGroupResult, props: any): boolean;
1085
1107
  _getCurrentRenderPassEncoder(device: GraphicsDevice): GPURenderPassEncoder;
1086
1108
  setFramebuffer(framebuffer: any): this;
1087
1109
  dispose(): void;
@@ -1118,7 +1140,6 @@ declare class PointLineShader extends MeshShader {
1118
1140
  declare class QuadShader extends MeshShader {
1119
1141
  constructor(config: any);
1120
1142
  draw(regl: any): number;
1121
- getMeshCommand(regl: any): any;
1122
1143
  _createQuadMesh(regl: any): void;
1123
1144
  _quadMesh: Mesh$1[];
1124
1145
  }
@@ -1126,7 +1147,6 @@ declare class QuadShader extends MeshShader {
1126
1147
 
1127
1148
  declare class FxaaShader extends QuadShader {
1128
1149
  constructor();
1129
- getMeshCommand(regl: any, mesh: any): any;
1130
1150
  }
1131
1151
  //# sourceMappingURL=FxaaShader.d.ts.map
1132
1152
 
@@ -1141,7 +1161,6 @@ declare class BoxBlurShader extends QuadShader {
1141
1161
 
1142
1162
  declare class ImageShader extends MeshShader {
1143
1163
  constructor(config: any);
1144
- getMeshCommand(regl: any, mesh: any): any;
1145
1164
  }
1146
1165
  //# sourceMappingURL=ImageShader.d.ts.map
1147
1166