Skip to content

Commit 3cbe1f7

Browse files
authored
Revert "Adjust fragment state blend factor and write mask validation (#3217)" (#3218)
This reverts commit 114229d.
1 parent 114229d commit 3cbe1f7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/webgpu/api/validation/render_pipeline/fragment_state.spec.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ g.test('pipeline_output_targets')
366366
g.test('pipeline_output_targets,blend')
367367
.desc(
368368
`On top of requirements from pipeline_output_targets, when blending is enabled and alpha channel is read indicated by any blend factor, an extra requirement is added:
369-
- fragment output must have an alpha channel (i.e. it must be vec4), otherwise writeMask must be 0.
369+
- fragment output must be vec4.
370370
`
371371
)
372372
.params(u =>
@@ -382,14 +382,6 @@ g.test('pipeline_output_targets,blend')
382382
...u.combine('alphaSrcFactor', kBlendFactors),
383383
...u.combine('alphaDstFactor', kBlendFactors),
384384
] as const)
385-
.expand('writeMask', function* (p) {
386-
yield 0;
387-
for (let i = 0; i < p.componentCount; i++) {
388-
yield 1 << i;
389-
}
390-
// default full mask
391-
yield 0xf;
392-
})
393385
)
394386
.beforeAllSubcases(t => {
395387
const { format } = t.params;
@@ -406,7 +398,6 @@ g.test('pipeline_output_targets,blend')
406398
colorDstFactor,
407399
alphaSrcFactor,
408400
alphaDstFactor,
409-
writeMask,
410401
} = t.params;
411402
const info = kTextureFormatInfo[format];
412403

@@ -418,7 +409,6 @@ g.test('pipeline_output_targets,blend')
418409
color: { srcFactor: colorSrcFactor, dstFactor: colorDstFactor },
419410
alpha: { srcFactor: alphaSrcFactor, dstFactor: alphaDstFactor },
420411
},
421-
writeMask,
422412
},
423413
],
424414
fragmentShaderCode: getFragmentShaderCodeWithOutput([
@@ -432,6 +422,6 @@ g.test('pipeline_output_targets,blend')
432422
const _success =
433423
info.color.type === sampleType &&
434424
componentCount >= kTexelRepresentationInfo[format].componentOrder.length &&
435-
(meetsExtraBlendingRequirement || writeMask === 0);
425+
meetsExtraBlendingRequirement;
436426
t.doCreateRenderPipelineTest(isAsync, _success, descriptor);
437427
});

0 commit comments

Comments
 (0)