@@ -176,12 +176,12 @@ export class ViewLinesGpu extends ViewPart implements IViewLines {
176
176
this . _renderStrategy = this . _register ( this . _instantiationService . createInstance ( FullFileRenderStrategy , this . _context , this . _device , this . canvas , atlas ) ) ;
177
177
178
178
this . _glyphStorageBuffer [ 0 ] = this . _register ( GPULifecycle . createBuffer ( this . _device , {
179
- label : 'Monaco glyph storage buffer' ,
179
+ label : 'Monaco glyph storage buffer [0] ' ,
180
180
size : GlyphStorageBufferInfo . BytesPerEntry * TextureAtlasPage . maximumGlyphCount ,
181
181
usage : GPUBufferUsage . STORAGE | GPUBufferUsage . COPY_DST ,
182
182
} ) ) . object ;
183
183
this . _glyphStorageBuffer [ 1 ] = this . _register ( GPULifecycle . createBuffer ( this . _device , {
184
- label : 'Monaco glyph storage buffer' ,
184
+ label : 'Monaco glyph storage buffer [1] ' ,
185
185
size : GlyphStorageBufferInfo . BytesPerEntry * TextureAtlasPage . maximumGlyphCount ,
186
186
usage : GPUBufferUsage . STORAGE | GPUBufferUsage . COPY_DST ,
187
187
} ) ) . object ;
@@ -289,6 +289,12 @@ export class ViewLinesGpu extends ViewPart implements IViewLines {
289
289
290
290
private _updateAtlasStorageBufferAndTexture ( ) {
291
291
for ( const [ layerIndex , page ] of ViewGpuContext . atlas . pages . entries ( ) ) {
292
+ if ( layerIndex >= 2 ) {
293
+ // TODO: Support arbitrary number of layers
294
+ console . log ( `Attempt to upload atlas page [${ layerIndex } ], only 2 are supported currently` ) ;
295
+ continue ;
296
+ }
297
+
292
298
// Skip the update if it's already the latest version
293
299
if ( page . version === this . _atlasGpuTextureVersions [ layerIndex ] ) {
294
300
continue ;
0 commit comments