(canvas, context)
| 263 | }); |
| 264 | |
| 265 | function testGetFeatures(canvas, context) { |
| 266 | const gpu = new GPU({ canvas, context }); |
| 267 | const { Kernel } = gpu; |
| 268 | Kernel.setupFeatureChecks(); |
| 269 | const features = Kernel.getFeatures(); |
| 270 | assert.ok(typeof features.isFloatRead === 'boolean'); |
| 271 | assert.ok(typeof features.isIntegerDivisionAccurate === 'boolean'); |
| 272 | assert.ok(typeof features.isSpeedTacticSupported === 'boolean'); |
| 273 | assert.ok(typeof features.isTextureFloat === 'boolean'); |
| 274 | assert.ok(typeof features.isDrawBuffers === 'boolean'); |
| 275 | assert.ok(typeof features.kernelMap === 'boolean'); |
| 276 | assert.ok(typeof features.channelCount === 'number'); |
| 277 | assert.ok(typeof features.maxTextureSize === 'number'); |
| 278 | |
| 279 | assert.ok(typeof features.lowIntPrecision.rangeMax === 'number'); |
| 280 | assert.ok(typeof features.mediumIntPrecision.rangeMax === 'number'); |
| 281 | assert.ok(typeof features.highIntPrecision.rangeMax === 'number'); |
| 282 | |
| 283 | assert.ok(typeof features.lowFloatPrecision.rangeMax === 'number'); |
| 284 | assert.ok(typeof features.mediumFloatPrecision.rangeMax === 'number'); |
| 285 | assert.ok(typeof features.highFloatPrecision.rangeMax === 'number'); |
| 286 | |
| 287 | gpu.destroy(); |
| 288 | } |
| 289 | |
| 290 | (GPU.isWebGLSupported ? test : skip)('getFeatures() webgl', () => { |
| 291 | const canvas = document.createElement('canvas'); |
no test coverage detected
searching dependent graphs…