stride3d/stride · error · InvalidOperationException

No compute entry point

Error message

No compute entry point

What it means

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.

Solutions

  1. Pass the compute-stage bytecode (containing an OpEntryPoint with ExecutionModel GLCompute) as the probe for the renderer used with Compute().
  2. Ensure the compute shader source has [numthreads(x,y,z)] so it compiles to a GLCompute entry point.
  3. Use RenderFrame() for graphics-stage shaders and reserve Compute() for actual compute modules.

Example fix

// before
var renderer = new VulkanFrameRenderer(vertexProbe, vertexModule);
renderer.Compute();
// after
var renderer = new VulkanFrameRenderer(computeProbe, computeModule);
renderer.Compute();
Defensive patterns

Strategy: validation

Validate before calling

if (probe.FindEntryPoint(SpirvProbe.ExecutionModelGLCompute) == null)
    throw new InvalidOperationException("Bytecode has no GLCompute entry point; cannot run Compute()");

Try / catch

try { renderer.Compute(); }
catch (InvalidOperationException ex) when (ex.Message == "No compute entry point")
{
    // recompile shader as compute or pass the correct module
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14). Data as JSON: /api/errors/f80abdf61a937981. Report an issue: GitHub.

Appendix: source

Thrown at sources/shaders/Stride.Shaders.Tests/FrameRenderer.Vulkan.cs:825

                    imageSubresource = new VkImageSubresourceLayers(VkImageAspectFlags.Color, 0, 0, 1),
                    imageExtent = new VkExtent3D(width, height, 1),
                };
                deviceApi.vkCmdCopyImageToBuffer(commandBuffer, colorImage, VkImageLayout.TransferSrcOptimal, readbackBuffer, 1, &copyRegion);
            });
        }

        void* mapped;
        Check(deviceApi.vkMapMemory(device, readbackMemory, 0, width * height * 4, 0, &mapped));
        new ReadOnlySpan<byte>(mapped, (int)(width * height * 4)).CopyTo(result);
        deviceApi.vkUnmapMemory(device, readbackMemory);
    }

    public override void Compute()
    {
        SetupDescriptors();

        var computeEntryPoint = probe.FindEntryPoint(SpirvProbe.ExecutionModelGLCompute)
            ?? throw new InvalidOperationException("No compute entry point");

        var computeEntryPointName = Encoding.UTF8.GetBytes(computeEntryPoint.Name + "\0");
        VkPipeline createdPipeline;
        fixed (byte* computeEntryPointNamePtr = computeEntryPointName)
        {
            var pipelineCreateInfo = new VkComputePipelineCreateInfo
            {
                sType = VkStructureType.ComputePipelineCreateInfo,
                stage = new VkPipelineShaderStageCreateInfo
                {
                    sType = VkStructureType.PipelineShaderStageCreateInfo,
                    stage = VkShaderStageFlags.Compute,
                    module = shaderModule,
                    pName = computeEntryPointNamePtr,
                },
                layout = pipelineLayout,
            };
            Check(deviceApi.vkCreateComputePipelines(device, VkPipelineCache.Null, 1, &pipelineCreateInfo, null, &createdPipeline));

View on GitHub (pinned to 96fad776d2)