Skip to content

Compilation api for SPIR-V no longer works with recent Slang releases, generic error "assert failure: slang-session.cpp(56): blob" #12852

Description

@SaschaWillems

Issue Description

I've been using the Slang compilation API in several Vulkan projects. Among those is a Vulkan tutorial at https://www.howtovulkan.com. Users have informed me, that Slang shader compilation at runtime using the compilation api is failing with recent Slang versions (e.g. the one included in the recent Vulkan SDK).

I can reproduce this, but sadly the error I get via diagnostics is not helpful, it just states:

assert failure: slang-session.cpp(56): blob

Reproducer Code

slang::IBlob* diagnostics = nullptr;
Slang::ComPtr<slang::IModule> slangModule{ session->loadModuleFromSource(createInfo.name.c_str(), createInfo.shaders.filename.c_str(), nullptr, &diagnostics) };
if (diagnostics) {				
	std::cerr << static_cast<const char*>(diagnostics->getBufferPointer()) << std::endl;
}

Expected Behavior

loadModuleFromSource successfully loads the shader and creates a shader module or at least gives me a human readable and reasonable error message in the diagnostics blob.

Actual Behavior

The shader module isn't created, the error message in the diagnostics blob isn't helpful.

Environment

  • Slang Version (release version number or commit hash): 2026.16.1
  • OS: Windows 11
  • GPU/Driver version, if the bug is a runtime result error: Does not apply (not a GPU driver issue)
  • Any related environment variables.

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions