diff --git a/package-lock.json b/package-lock.json index bbf76cf1c524..cc4e97a2ce64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "@types/w3c-image-capture": "^1.0.10", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", - "@webgpu/types": "^0.1.48", + "@webgpu/types": "^0.1.49", "ansi-colors": "4.1.3", "babel-plugin-add-header-comment": "^1.0.3", "babel-plugin-const-enum": "^1.2.0", @@ -1539,11 +1539,10 @@ "dev": true }, "node_modules/@webgpu/types": { - "version": "0.1.48", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.48.tgz", - "integrity": "sha512-e3zmDEPih4Rle+JrP5cT8nCCtDizoUpEaN72OuD1clbhXGERtn0wwuMdxOrBymu3kMLWKDd8hd+ERhSheLuLTg==", - "dev": true, - "license": "BSD-3-Clause" + "version": "0.1.49", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.49.tgz", + "integrity": "sha512-NMmS8/DofhH/IFeW+876XrHVWel+J/vdcFCHLDqeJgkH9x0DeiwjVd8LcBdaxdG/T7Rf8VUAYsA8X1efMzLjRQ==", + "dev": true }, "node_modules/abbrev": { "version": "1.1.1", @@ -10077,9 +10076,9 @@ "dev": true }, "@webgpu/types": { - "version": "0.1.48", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.48.tgz", - "integrity": "sha512-e3zmDEPih4Rle+JrP5cT8nCCtDizoUpEaN72OuD1clbhXGERtn0wwuMdxOrBymu3kMLWKDd8hd+ERhSheLuLTg==", + "version": "0.1.49", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.49.tgz", + "integrity": "sha512-NMmS8/DofhH/IFeW+876XrHVWel+J/vdcFCHLDqeJgkH9x0DeiwjVd8LcBdaxdG/T7Rf8VUAYsA8X1efMzLjRQ==", "dev": true }, "abbrev": { diff --git a/package.json b/package.json index a734cc0600fc..3ef62315db25 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@types/w3c-image-capture": "^1.0.10", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", - "@webgpu/types": "^0.1.48", + "@webgpu/types": "^0.1.49", "ansi-colors": "4.1.3", "babel-plugin-add-header-comment": "^1.0.3", "babel-plugin-const-enum": "^1.2.0", diff --git a/src/webgpu/api/validation/render_pipeline/float32_blendable.spec.ts b/src/webgpu/api/validation/render_pipeline/float32_blendable.spec.ts new file mode 100644 index 000000000000..ed387b5a8769 --- /dev/null +++ b/src/webgpu/api/validation/render_pipeline/float32_blendable.spec.ts @@ -0,0 +1,47 @@ +export const description = ` +Tests for capabilities added by float32-blendable flag. +`; + +import { makeTestGroup } from '../../../../common/framework/test_group.js'; +import { ColorTextureFormat } from '../../../format_info.js'; + +import { CreateRenderPipelineValidationTest } from './common.js'; + +export const g = makeTestGroup(CreateRenderPipelineValidationTest); + +const kFloat32Formats: ColorTextureFormat[] = ['r32float', 'rg32float', 'rgba32float']; + +g.test('create_render_pipeline') + .desc( + ` +Tests that the float32-blendable feature is required to create a render +pipeline that uses blending with any float32-format attachment. +` + ) + .params(u => + u + .combine('isAsync', [false, true]) + .combine('enabled', [true, false] as const) + .beginSubcases() + .combine('hasBlend', [true, false] as const) + .combine('format', kFloat32Formats) + ) + .beforeAllSubcases(t => { + if (t.params.enabled) { + t.selectDeviceOrSkipTestCase('float32-blendable'); + } + }) + .fn(t => { + const { isAsync, enabled, hasBlend, format } = t.params; + + const descriptor = t.getDescriptor({ + targets: [ + { + format, + blend: hasBlend ? { color: {}, alpha: {} } : undefined, + }, + ], + }); + + t.doCreateRenderPipelineTest(isAsync, enabled || !hasBlend, descriptor); + }); diff --git a/src/webgpu/capability_info.ts b/src/webgpu/capability_info.ts index 62ac621dc66e..5af80c45fa4c 100644 --- a/src/webgpu/capability_info.ts +++ b/src/webgpu/capability_info.ts @@ -830,6 +830,7 @@ export const kFeatureNameInfo: { 'shader-f16': {}, 'rg11b10ufloat-renderable': {}, 'float32-filterable': {}, + 'float32-blendable': {}, 'clip-distances': {}, 'dual-source-blending': {}, };