Bug 200056
| Summary: | [WHLSL] A null fragment stage in GPURenderPipelineDescriptor should not fail WHLSL compilation | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Justin Fan <justin_fan> |
| Component: | WebGPU | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Justin Fan
WebGPU specifies that it is possible to run a render pipeline without a fragment shader, but attempting to do so fails the WHLSL compiler in GPUDevice.createRenderPipeline.
Test file, run from LayoutTests/webgpu/whlsl:
<!DOCTYPE html>
<meta charset=utf-8>
<title>WebGPU/WHLSL Playground</title>
<body>
<script src="js/test-harness.js"></script>
<script src="../js/webgpu-functions.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
const whlslSource = `
vertex float4 vertexMain() : SV_Position
{
return float4(0, 0, 0, 0);
}
fragment float4 fragmentMain() : SV_Target 0
{
return float4(0, 0, 0, 0);
}
`;
let tests = {};
tests["GPURenderPipeline creation succeeds with no errors."] = async device => {
const goodModule = device.createShaderModule({ code: whlslSource, isWHLSL: true });
const goodRenderPipelineDescriptor = {
vertexStage: { module: goodModule, entryPoint: "vertexMain" },
// fragmentStage: { module: goodModule, entryPoint: "fragmentMain" },
primitiveTopology: "triangle-list",
colorStates: [{
format: "bgra8unorm",
alphaBlend: {},
colorBlend: {}
}],
vertexInput: { vertexBuffers: [] }
};
device.pushErrorScope("validation");
device.createRenderPipeline(goodRenderPipelineDescriptor);
return popNullError(device);
};
runTestsWithDevice(tests);
</script>
</body>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Justin Fan
Oh. This depends on https://bugs.webkit.org/show_bug.cgi?id=200046
Myles C. Maxfield
WHLSL is no longer relevant.