lavapipe: Cannot select: intrinsic %llvm.coro.size
Running Ogre 3.0 samples Test_Voxelizer
and Sample_ImageVoxelizer
result on Mesa 22.0.5 in the following:
Regression
It's not a regression
Log files as attachment
Shader 0AabbCalcultor_cs compiled successfully.
Shader 1AabbWorldSpace_cs compiled successfully.
Shader 2ClearUav_cs compiled successfully.
Shader 3ClearUav_cs compiled successfully.
Shader 4ClearUav_cs compiled successfully.
Shader 5Voxelizer_cs compiled successfully.
LLVM ERROR: Cannot select: intrinsic %llvm.coro.size
Callstack:
1 __GI_raise raise.c 50 0x7ffff641100b
2 __GI_abort abort.c 79 0x7ffff63f0859
3 llvm::report_fatal_error(llvm::Twine const&, bool) 0x7fffebc84a48
4 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode *) 0x7fffec562631
5 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode *, unsigned const char *, unsigned int) 0x7fffec561ad8
6 ?? 0x7fffee4ea65a
7 llvm::SelectionDAGISel::DoInstructionSelection() 0x7fffec55a72f
8 llvm::SelectionDAGISel::CodeGenAndEmitDAG() 0x7fffec559df4
9 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) 0x7fffec559228
10 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) 0x7fffec556db7
11 ?? 0x7fffee4e144d
12 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) 0x7fffec0cbb4e
13 llvm::FPPassManager::runOnFunction(llvm::Function&) 0x7fffebe83a30
14 llvm::FPPassManager::runOnModule(llvm::Module&) 0x7fffebe8b023
15 llvm::legacy::PassManagerImpl::run(llvm::Module&) 0x7fffebe845d6
16 llvm::MCJIT::emitObject(llvm::Module *) 0x7fffed6bc593
17 llvm::MCJIT::generateCodeForModule(llvm::Module *) 0x7fffed6bc735
18 llvm::MCJIT::finalizeObject() 0x7fffed6bd24e
19 LLVMGetPointerToGlobal 0x7fffed665130
20 ?? 0x7fffa0402339
21 ?? 0x7fffa0402c00
22 ?? 0x7fffa0219835
23 ?? 0x7fffa021ba73
24 ?? 0x7fffa020c5ac
25 ?? 0x7fffa023a519
26 ?? 0x7fffa023a1ab
27 start_thread pthread_create.c 477 0x7ffff7d1b609
28 clone clone.S 95 0x7ffff64ed133
How to repro
- Download our build script and run it
- Go to ogre-next/build/Debug/bin and execute
Sample_ImageVoxelizer
- Select
Vulkan Rendering System
- In
Device
selectllvmpipe
- Hit Accept
- It crashes
I can provide binaries if requested.
What's special about this compute shader (5Voxelizer_cs) is that it makes the following:
// We are emulating anyInvocationARB because for it to work
// correctly we need the following guarantees:
// 1. gl_SubGroupSizeARB is known beforehand and all lanes [0; gl_SubGroupSizeARB) are always active
// 2. VK_EXT_subgroup_size_control to enforce 1
// 3. REQUIRE_FULL_SUBGROUPS_BIT_EXT to ensure all lanes are occupied the way we need
// (perfect lockstep)
//
// See https://github.com/KhronosGroup/GLSL/issues/19#issuecomment-881931582
// See https://forums.ogre3d.org/viewtopic.php?p=551000#p551000
shared bool g_emulatedGroupVote[64];
bool emulatedAnyInvocationARB( bool value )
{
g_emulatedGroupVote[gl_LocalInvocationIndex] = value;
for( uint i=0u; i<6u; ++i )
{
__sharedOnlyBarrier;
uint nextIdx = gl_LocalInvocationIndex + (1u << i);
uint mask = (1u << (i+1u)) - 1u;
if( ( gl_LocalInvocationIndex & mask ) == 0u )
{
g_emulatedGroupVote[gl_LocalInvocationIndex] =
g_emulatedGroupVote[gl_LocalInvocationIndex] || g_emulatedGroupVote[nextIdx];
}
}
__sharedOnlyBarrier;
return g_emulatedGroupVote[0];
}
#define anyInvocationARB( value ) emulatedAnyInvocationARB( value )
I am attaching the generated shaders: Shaders.7z
Edited by Matias N. Goldberg