(options: {
maxTextureDimension2D?: number;
} = {})
| 53 | } |
| 54 | |
| 55 | function 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 | |
| 73 | function makeSceneRef(release = vi.fn()): GpuGaussianSceneRef { |
| 74 | return { |
no test coverage detected