@maptalks/gpu 0.118.1 → 0.120.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,8 +1,8 @@
1
1
  /// <reference types="@webgpu/types" />
2
2
  /*!
3
- * @maptalks/gpu v0.118.1
3
+ * @maptalks/gpu v0.120.0
4
4
  * LICENSE : UNLICENSED
5
- * (c) 2016-2025 maptalks.com
5
+ * (c) 2016-2026 maptalks.com
6
6
  */
7
7
  import * as REGL from '@maptalks/regl';
8
8
  import REGL__default, { Texture, Texture2DOptions, TextureImageData, Regl, Texture2D as Texture2D$1, Uniforms } from '@maptalks/regl';
@@ -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 {
@@ -91,14 +92,22 @@ declare class GraphicsFramebuffer {
91
92
  options: any;
92
93
  width: number;
93
94
  height: number;
95
+ _destroyed: boolean;
94
96
  constructor(device: any, options: any);
95
97
  get color(): GraphicsTexture[];
96
98
  resize(width: any, height: any): void;
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,30 @@ 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
+ getMipLevelCount(): any;
157
+ fillData(texture: any, width: any, height: any): void;
158
+ fillImageData(texture: any, data: any, width: any, height: any, origin: any): void;
159
+ fillArrayData(texture: any, data: any, width: any, height: any, origin: any): void;
160
+ _fillMipmap(texture: any, mipLevel: any, data: any, width: any, height: any, origin: any): void;
161
+ formatTextureArray(data: any, arrayBuffer: any, width: any, height: any): any;
162
+ isArrayData(data: any): boolean;
144
163
  getView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
145
- addBindGroup(bindGroup: any): void;
146
164
  destroy(): void;
147
165
  }
148
166
 
@@ -562,7 +580,6 @@ declare class DynamicBuffer {
562
580
 
563
581
  type BindGroupResult = {
564
582
  bindGroup: GPUBindGroup;
565
- outdated: boolean;
566
583
  uniformTextures?: any;
567
584
  };
568
585
  declare class BindGroupFormat {
@@ -1081,7 +1098,7 @@ declare class GPUShader extends GLShader {
1081
1098
  frag: any;
1082
1099
  };
1083
1100
  run(deviceOrRegl: any, command: CommandStruct, props: any): any;
1084
- _checkBindGroupTextures(bindGroup: BindGroupResult, props: any): boolean;
1101
+ _checkBindGroupOutdated(bindGroup: BindGroupResult, props: any): boolean;
1085
1102
  _getCurrentRenderPassEncoder(device: GraphicsDevice): GPURenderPassEncoder;
1086
1103
  setFramebuffer(framebuffer: any): this;
1087
1104
  dispose(): void;
@@ -1141,7 +1158,6 @@ declare class BoxBlurShader extends QuadShader {
1141
1158
 
1142
1159
  declare class ImageShader extends MeshShader {
1143
1160
  constructor(config: any);
1144
- getMeshCommand(regl: any, mesh: any): any;
1145
1161
  }
1146
1162
  //# sourceMappingURL=ImageShader.d.ts.map
1147
1163