MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / makeDevice

Function makeDevice

src/splat/webgpu/psnrSplatSession.test.ts:55–71  ·  view source on GitHub ↗
(options: {
  maxTextureDimension2D?: number;
} = {})

Source from the content-addressed store, hash-verified

53}
54
55function makeDevice(options: {
56 maxTextureDimension2D?: number;
57} = {}) {
58 const textures: GPUTextureDescriptor[] = [];
59 return {
60 textures,
61 device: {
62 limits: {
63 maxTextureDimension2D: options.maxTextureDimension2D ?? 8192,
64 },
65 createTexture: vi.fn((descriptor: GPUTextureDescriptor) => {
66 textures.push(descriptor);
67 return makeTexture(String(descriptor.label ?? 'texture'));
68 }),
69 } as unknown as GPUDevice,
70 };
71}
72
73function makeSceneRef(release = vi.fn()): GpuGaussianSceneRef {
74 return {

Callers 2

createHarnessFunction · 0.70

Calls 1

makeTextureFunction · 0.70

Tested by

no test coverage detected