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