From 3a825e6bd845abfcccd6202308ad87c0365c7bea Mon Sep 17 00:00:00 2001 From: Vaclav Vancura Date: Sun, 17 May 2026 12:37:14 +0200 Subject: [PATCH] docs(api): document maxTextureDimension2D limit on HardwareSettings dimension fields Add a note to the JSDoc for displaySize, canvasDisplaySize, and maxCanvasDisplaySize in HardwareSettings that in WebGPU mode each axis must not exceed the active adapter's maxTextureDimension2D limit (typically 8192 or 16384 depending on the GPU). Readers are directed to compare both the existing hard numeric caps and GPUAdapter.limits.maxTextureDimension2D when choosing dimensions. Signed-off-by: Vaclav Vancura Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Vaclav Vancura --- src/core/IBlitTechDemo.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/core/IBlitTechDemo.ts b/src/core/IBlitTechDemo.ts index 7aa2d1d..0ac4889 100644 --- a/src/core/IBlitTechDemo.ts +++ b/src/core/IBlitTechDemo.ts @@ -30,7 +30,11 @@ export interface HardwareSettings { * Logical render resolution in pixels (e.g. `320x240`). * * Must use positive whole-number dimensions no larger than `8192x8192` - * and no more than `16,777,216` total pixels. + * and no more than `16,777,216` total pixels. When running in WebGPU mode + * the width and height must also not exceed the active adapter's + * `maxTextureDimension2D` limit (typically `8192` or `16384` depending on + * the GPU); compare both the numeric caps above and + * `GPUAdapter.limits.maxTextureDimension2D` when choosing dimensions. */ displaySize: Vector2i; @@ -46,7 +50,11 @@ export interface HardwareSettings { * logical pixel grid. * * Must use positive whole-number dimensions no larger than `8192x8192` - * and no more than `16,777,216` total pixels. + * and no more than `16,777,216` total pixels. When running in WebGPU mode + * the width and height must also not exceed the active adapter's + * `maxTextureDimension2D` limit (typically `8192` or `16384` depending on + * the GPU); compare both the numeric caps above and + * `GPUAdapter.limits.maxTextureDimension2D` when choosing dimensions. */ canvasDisplaySize?: Vector2i; @@ -56,7 +64,11 @@ export interface HardwareSettings { * size. Defaults to `960x720` in {@link defaultConfig}. * * Must use positive whole-number dimensions no larger than `8192x8192` - * and no more than `16,777,216` total pixels. + * and no more than `16,777,216` total pixels. When running in WebGPU mode + * the width and height must also not exceed the active adapter's + * `maxTextureDimension2D` limit (typically `8192` or `16384` depending on + * the GPU); compare both the numeric caps above and + * `GPUAdapter.limits.maxTextureDimension2D` when choosing dimensions. */ maxCanvasDisplaySize?: Vector2i; -- 2.51.2