Skip to content

Commit 629f20b

Browse files
author
Aleksander Katan
committed
Review fixes
1 parent 5aaf000 commit 629f20b

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

packages/typegpu/src/core/root/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@ class TgpuRootImpl extends WithBindingImpl
444444
);
445445
}
446446
context.configure({
447-
device: this.device,
448-
format: navigator.gpu.getPreferredCanvasFormat(),
449447
...options,
448+
device: this.device,
449+
format: options.format ?? navigator.gpu.getPreferredCanvasFormat(),
450450
});
451451
return context;
452452
}

packages/typegpu/src/core/root/rootTypes.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -578,27 +578,7 @@ export type ConfigureContextOptions = {
578578
* Defaults to `navigator.gpu.getPreferredCanvasFormat()` if not provided.
579579
*/
580580
format?: GPUTextureFormat;
581-
/**
582-
* Passed to `context.configure()`.
583-
*/
584-
usage?: GPUTextureUsageFlags;
585-
/**
586-
* Passed to `context.configure()`.
587-
*/
588-
viewFormats?: Iterable<GPUTextureFormat>;
589-
/**
590-
* Passed to `context.configure()`.
591-
*/
592-
colorSpace?: PredefinedColorSpace;
593-
/**
594-
* Passed to `context.configure()`.
595-
*/
596-
toneMapping?: GPUCanvasToneMapping;
597-
/**
598-
* Passed to `context.configure()`.
599-
*/
600-
alphaMode?: GPUCanvasAlphaMode;
601-
};
581+
} & Omit<GPUCanvasConfiguration, 'device' | 'format'>;
602582

603583
export interface TgpuRoot extends Unwrapper {
604584
[$internal]: {

0 commit comments

Comments
 (0)