{"record":{"id":"f80abdf61a937981","repo":"stride3d/stride","slug":"no-compute-entry-point","errorCode":null,"errorMessage":"No compute entry point","messagePattern":"No compute entry point","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Tests/FrameRenderer.Vulkan.cs","lineNumber":825,"sourceCode":"                    imageSubresource = new VkImageSubresourceLayers(VkImageAspectFlags.Color, 0, 0, 1),\n                    imageExtent = new VkExtent3D(width, height, 1),\n                };\n                deviceApi.vkCmdCopyImageToBuffer(commandBuffer, colorImage, VkImageLayout.TransferSrcOptimal, readbackBuffer, 1, &copyRegion);\n            });\n        }\n\n        void* mapped;\n        Check(deviceApi.vkMapMemory(device, readbackMemory, 0, width * height * 4, 0, &mapped));\n        new ReadOnlySpan<byte>(mapped, (int)(width * height * 4)).CopyTo(result);\n        deviceApi.vkUnmapMemory(device, readbackMemory);\n    }\n\n    public override void Compute()\n    {\n        SetupDescriptors();\n\n        var computeEntryPoint = probe.FindEntryPoint(SpirvProbe.ExecutionModelGLCompute)\n            ?? throw new InvalidOperationException(\"No compute entry point\");\n\n        var computeEntryPointName = Encoding.UTF8.GetBytes(computeEntryPoint.Name + \"\\0\");\n        VkPipeline createdPipeline;\n        fixed (byte* computeEntryPointNamePtr = computeEntryPointName)\n        {\n            var pipelineCreateInfo = new VkComputePipelineCreateInfo\n            {\n                sType = VkStructureType.ComputePipelineCreateInfo,\n                stage = new VkPipelineShaderStageCreateInfo\n                {\n                    sType = VkStructureType.PipelineShaderStageCreateInfo,\n                    stage = VkShaderStageFlags.Compute,\n                    module = shaderModule,\n                    pName = computeEntryPointNamePtr,\n                },\n                layout = pipelineLayout,\n            };\n            Check(deviceApi.vkCreateComputePipelines(device, VkPipelineCache.Null, 1, &pipelineCreateInfo, null, &createdPipeline));","sourceCodeStart":807,"sourceCodeEnd":843,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Tests/FrameRenderer.Vulkan.cs#L807-L843","documentation":"Thrown in Compute() when the probe's SPIR-V module contains no GLCompute execution-model entry point. Compute pipeline creation requires an entry point with ExecutionModelGLCompute to reference in VkComputePipelineCreateInfo.","triggerScenarios":"Calling Compute() on a VulkanFrameRenderer whose probe bytecode is a graphics (vertex/fragment) shader rather than a compute shader, so FindEntryPoint(SpirvProbe.ExecutionModelGLCompute) returns null.","commonSituations":"Wiring the wrong shader module to a compute test; forgetting to compile the compute stage (e.g. the .hlsl lacked [numthreads] so it was never emitted as compute); mixing up probes when both graphics and compute bytecode exist in a test.","solutions":["Pass the compute-stage bytecode (containing an OpEntryPoint with ExecutionModel GLCompute) as the probe for the renderer used with Compute().","Ensure the compute shader source has [numthreads(x,y,z)] so it compiles to a GLCompute entry point.","Use RenderFrame() for graphics-stage shaders and reserve Compute() for actual compute modules."],"exampleFix":"// before\nvar renderer = new VulkanFrameRenderer(vertexProbe, vertexModule);\nrenderer.Compute();\n// after\nvar renderer = new VulkanFrameRenderer(computeProbe, computeModule);\nrenderer.Compute();","handlingStrategy":"validation","validationCode":"if (probe.FindEntryPoint(SpirvProbe.ExecutionModelGLCompute) == null)\n    throw new InvalidOperationException(\"Bytecode has no GLCompute entry point; cannot run Compute()\");","typeGuard":null,"tryCatchPattern":"try { renderer.Compute(); }\ncatch (InvalidOperationException ex) when (ex.Message == \"No compute entry point\")\n{\n    // recompile shader as compute or pass the correct module\n}","preventionTips":["Verify the compute shader has [numthreads] so it emits a GLCompute entry point.","Keep compute bytecode in a separate artifact and pass the right one to Compute().","Probe entry points in test initialization and skip compute tests when absent."],"tags":["vulkan","spirv","compute-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"}