From 9031c05b967d014cebacb7641566ec22a7da0ce2 Mon Sep 17 00:00:00 2001 From: vanitynie Date: Fri, 30 Oct 2026 17:17:53 +0800 Subject: [PATCH] fix(gfx): update EmptyBuffer size on resize for unit tests --- cocos/gfx/empty/empty-buffer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cocos/gfx/empty/empty-buffer.ts b/cocos/gfx/empty/empty-buffer.ts index 798d3a77b1..c39d670454 100644 --- a/cocos/gfx/empty/empty-buffer.ts +++ b/cocos/gfx/empty/empty-buffer.ts @@ -47,6 +47,9 @@ export class EmptyBuffer extends Buffer { } } public destroy (): void {} - public resize (size: number): void {} + public resize (size: number): void { + this._size = size; + this._count = this._size / this._stride; + } public update (buffer: Readonly, size?: number): void {} }