{"record":{"id":"acebcda98b3058c9","repo":"stride3d/stride","slug":"no-fragment-entry-point","errorCode":null,"errorMessage":"No fragment entry point","messagePattern":"No fragment entry point","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Tests/FrameRenderer.Vulkan.cs","lineNumber":605,"sourceCode":"            -1f,-1f, 0f,  0.0f, 0.0f,\n            -1f, 1f, 1f,  0.0f, 1.0f,\n        ];\n        ReadOnlySpan<uint> indices = [0, 1, 3, 1, 2, 3];\n        var (vertexBuffer, _) = CreateHostBuffer((ulong)(vertices.Length * sizeof(float)), VkBufferUsageFlags.VertexBuffer, MemoryMarshal.AsBytes(vertices));\n        var (indexBuffer, _) = CreateHostBuffer((ulong)(indices.Length * sizeof(uint)), VkBufferUsageFlags.IndexBuffer, MemoryMarshal.AsBytes(indices));\n\n        // Vertex shader: from the test's bytecode when present, else the quad passthrough\n        var vertexProbe = probe;\n        var vertexModule = shaderModule;\n        var vertexEntryPoint = probe.FindEntryPoint(SpirvProbe.ExecutionModelVertex);\n        if (vertexEntryPoint == null)\n        {\n            vertexProbe = fallbackVertexProbe ?? throw new InvalidOperationException(\"No vertex entry point and no fallback vertex shader\");\n            vertexModule = fallbackVertexModule;\n            vertexEntryPoint = vertexProbe.FindEntryPoint(SpirvProbe.ExecutionModelVertex);\n        }\n        var fragmentEntryPoint = probe.FindEntryPoint(SpirvProbe.ExecutionModelFragment)\n            ?? throw new InvalidOperationException(\"No fragment entry point\");\n\n        // Vertex attributes: POSITION/TEXCOORD from the quad buffer, other semantics from\n        // per-instance single-element buffers built from \"stream.SEMANTIC\" test parameters\n        var bindingDescriptions = new List<VkVertexInputBindingDescription>\n        {\n            new() { binding = 0, stride = 5 * sizeof(float), inputRate = VkVertexInputRate.Vertex },\n        };\n        var attributeDescriptions = new List<VkVertexInputAttributeDescription>();\n        var vertexBufferHandles = new List<VkBuffer> { vertexBuffer };\n        foreach (var (location, semantic) in vertexProbe.GetStageInputs(vertexEntryPoint))\n        {\n            if (semantic.StartsWith(\"POSITION\", StringComparison.OrdinalIgnoreCase))\n            {\n                attributeDescriptions.Add(new VkVertexInputAttributeDescription { location = location, binding = 0, format = VkFormat.R32G32B32Sfloat, offset = 0 });\n            }\n            else if (semantic.StartsWith(\"TEXCOORD\", StringComparison.OrdinalIgnoreCase))\n            {\n                attributeDescriptions.Add(new VkVertexInputAttributeDescription { location = location, binding = 0, format = VkFormat.R32G32Sfloat, offset = 3 * sizeof(float) });","sourceCodeStart":587,"sourceCodeEnd":623,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Tests/FrameRenderer.Vulkan.cs#L587-L623","documentation":"Thrown when the probe's SPIR-V module exposes no fragment-stage entry point while building the graphics pipeline in RenderFrame. Unlike the vertex stage there is no fallback fragment shader, so a fragment entry point is mandatory.","triggerScenarios":"RenderFrame is called with bytecode whose OpEntryPoint instructions contain no ExecutionModel Fragment entry, causing FindEntryPoint(SpirvProbe.ExecutionModelFragment) to return null and the ?? throw to fire.","commonSituations":"Running a vertex-only or compute shader through the rasterization test path; a corrupted or stripped SPIR-V module; shader compiled for a stage mismatch (e.g. pixel shader saved as vertex) so no fragment entry exists.","solutions":["Compile/export the test shader with a fragment entry point and ensure it was passed as the probe's bytecode.","Verify with SpirvProbe (check EntryPoints / VariableStorageClasses) that the module actually contains a Fragment OpEntryPoint.","Use the compute path (Compute()) for compute shaders instead of RenderFrame()."],"exampleFix":"// before\nvar probe = new SpirvProbe(computeBytecode);\nrenderer.RenderFrame(output);\n// after\nvar probe = new SpirvProbe(fragmentBytecode); // module must contain a fragment entry point\nrenderer.RenderFrame(output);","handlingStrategy":"validation","validationCode":"if (probe.FindEntryPoint(SpirvProbe.ExecutionModelFragment) == null)\n    throw new InvalidOperationException(\"Test bytecode has no fragment entry point; cannot run RenderFrame\");","typeGuard":null,"tryCatchPattern":"try { renderer.RenderFrame(output); }\ncatch (InvalidOperationException ex) when (ex.Message == \"No fragment entry point\")\n{\n    // route to the correct stage path or recompile the shader\n}","preventionTips":["Compile a pixel/fragment stage whenever a test uses RenderFrame.","Check the pipeline type from shader reflection before selecting RenderFrame vs Compute.","Assert on entry points with SpirvProbe in test setup."],"tags":["vulkan","spirv","fragment-shader"],"backgroundTag":"resource-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}