Skip to content

Commit

Permalink
chore: Upgrade typescript and other dependencies (#2269)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen authored Sep 21, 2024
1 parent 5f5a682 commit 89e8581
Show file tree
Hide file tree
Showing 9 changed files with 385 additions and 382 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api-reference/core/device-limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if (limits.maxTextureDimension2D > 2048) {
| `maxVertexBuffers` | <L f="maxVertexBuffers" /> | See [WebGPU issue][gpuweb4284] |
| `maxVertexAttributes` | <L f="maxVertexAttributes" /> | `GL.MAX_VERTEX_ATTRIBS` |
| `maxVertexBufferArrayStride` | <L f="maxVertexBufferArrayStride" /> | Cant be reliably determined on WebGL |
| `maxInterStageShaderComponents` | <L f="maxInterStageShaderComponents" /> | `GL.MAX_VARYING_COMPONENTS` |
| `maxInterStageShaderVariables` | <L f="maxInterStageShaderVariables" /> | `GL.MAX_VARYING_COMPONENTS` |
| `maxComputeWorkgroupStorageSize` | <L f="maxComputeWorkgroupStorageSize" /> | WebGL2 has no compute shaders |
| `maxComputeInvocationsPerWorkgroup` | <L f="maxComputeInvocationsPerWorkgroup" /> | WebGL2 has no compute shaders |
| `maxComputeWorkgroupSizeX` | <L f="maxComputeWorkgroupSizeX" /> | WebGL2 has no compute shaders |
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/adapter/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export abstract class DeviceLimits {
/** max number of VertexBufferArrayStride */
abstract maxVertexBufferArrayStride: number;
/** max number of InterStageShaderComponents */
abstract maxInterStageShaderComponents: number;
abstract maxInterStageShaderVariables: number;
/** max number of ComputeWorkgroupStorageSize */
abstract maxComputeWorkgroupStorageSize: number;
/** max number of ComputeInvocations per Workgroup */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DEVICE_LIMITS = {
maxVertexBuffers: true,
maxVertexAttributes: true,
maxVertexBufferArrayStride: true,
maxInterStageShaderComponents: true,
maxInterStageShaderVariables: true,
maxComputeWorkgroupStorageSize: true,
maxComputeInvocationsPerWorkgroup: true,
maxComputeWorkgroupSizeX: true,
Expand Down
2 changes: 1 addition & 1 deletion modules/test-utils/src/null-device/null-device-features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class NullDeviceLimits extends DeviceLimits {
maxVertexBuffers = 16;
maxVertexAttributes = 16;
maxVertexBufferArrayStride = 2048;
maxInterStageShaderComponents = 60;
maxInterStageShaderVariables = 60;
maxComputeWorkgroupStorageSize = 0;
maxComputeInvocationsPerWorkgroup = 0;
maxComputeWorkgroupSizeX = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class WebGLDeviceFeatures extends DeviceFeatures {
getWebGLExtension(gl, 'EXT_color_buffer_float', extensions);
}

*[Symbol.iterator](): IterableIterator<DeviceFeature> {
override *[Symbol.iterator](): IterableIterator<DeviceFeature> {
const features = this.getFeatures();
for (const feature of features) {
if (this.has(feature)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class WebGLDeviceLimits extends DeviceLimits {
get maxVertexBuffers() { return 16; } // WebGL 2 supports 16 buffers, see https://github.com/gpuweb/gpuweb/issues/4284
get maxVertexAttributes() { return this.getParameter(GL.MAX_VERTEX_ATTRIBS); }
get maxVertexBufferArrayStride() { return 2048; } // TBD, this is just the default value from WebGPU
get maxInterStageShaderComponents() { return this.getParameter(GL.MAX_VARYING_COMPONENTS); }
get maxInterStageShaderVariables() { return this.getParameter(GL.MAX_VARYING_COMPONENTS); }
get maxComputeWorkgroupStorageSize() { return 0; } // WebGL does not support compute shaders
get maxComputeInvocationsPerWorkgroup() { return 0; } // WebGL does not support compute shaders
get maxComputeWorkgroupSizeX() { return 0; } // WebGL does not support compute shaders
Expand Down
6 changes: 5 additions & 1 deletion modules/webgpu/src/adapter/webgpu-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export class WebGPUAdapter extends Adapter {
throw new Error('Failed to request WebGPU adapter');
}

const adapterInfo = await adapter.requestAdapterInfo();
// Note: adapter.requestAdapterInfo() has been replaced with adapter.info. Fall back in case adapter.info is not available
const adapterInfo =
adapter.info ||
// @ts-ignore
(await adapter.requestAdapterInfo?.());
log.probe(2, 'Adapter available', adapterInfo)();

const requiredFeatures: GPUFeatureName[] = [];
Expand Down
Loading

0 comments on commit 89e8581

Please sign in to comment.