[Webkit-unassigned] [Bug 200056] New: [WHLSL] A null fragment stage in GPURenderPipelineDescriptor should not fail WHLSL compilation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 23 16:17:47 PDT 2019


            Bug ID: 200056
           Summary: [WHLSL] A null fragment stage in
                    GPURenderPipelineDescriptor should not fail WHLSL
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGPU
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: justin_fan at apple.com

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>
<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>
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: [] }

    return popNullError(device);


You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190723/69ed422e/attachment.html>

More information about the webkit-unassigned mailing list