forked from gpuweb/cts
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add float32-blendable feature validation tests (gpuweb#4003)
* Add float32-blendable feature validation tests * apply suggestion * roll types --------- Co-authored-by: Kai Ninomiya <kainino@chromium.org>
- Loading branch information
Showing
4 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/webgpu/api/validation/render_pipeline/float32_blendable.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters