Comments (2)
Reproduced. there are 3 issues.
- decoration Offset and ArrayStride are missed in your shader source. please add following code in your source code.
OpMemberDecorate %struct_0 0 Offset 0
OpMemberDecorate %struct_1 0 Offset 0
OpMemberDecorate %struct_1 1 Offset 4
OpDecorate %u32_array_runtime_array ArrayStride 128
OpDecorate %u32_array ArrayStride 4 - calcShaderBlockSize doesn't handle Structs with no members, please try to add following code in calcShaderBlockSize
if (BT->isTypeStruct()) {
- if (BT->getStructMemberCount() == 0)
-
BlockSize = 0;
- else {
-
the order of lower pass in incorrect. please move pass SpirvLowerAccessChain after pass PassDeadFuncRemove in llpcSpirvLower.cpp
// Function inlining
passMgr.add(createFunctionInliningPass(InlineThreshold));
passMgr.add(PassDeadFuncRemove::Create());
- // Lower SPIR-V access chain
- passMgr.add(SpirvLowerAccessChain::Create());
- after apply these three changes, this shader is passed in my local machine.
PS: I will send out the pull request next week.
from llpc.
backtrace from a RelWithDebInfo:
Program received signal SIGSEGV, Segmentation fault.
0x000055555587f337 in SPIRV::SPIRVTypeStruct::getMemberType (I=0, this=0x555558b0f1c0)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/libSPIRV/SPIRVType.h:640
640 return static_cast<SPIRVType *>(getEntry(MemberTypeIdVec[I]));
(gdb) where
#0 0x000055555587f337 in SPIRV::SPIRVTypeStruct::getMemberType (I=0, this=0x555558b0f1c0)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/libSPIRV/SPIRVType.h:640
#1 SPIRV::SPIRVType::getStructMemberType (this=0x555558b0f1c0, Index=0)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/libSPIRV/SPIRVType.cpp:106
#2 0x00005555557b22fd in SPIRV::SPIRVToLLVM::calcShaderBlockSize (this=this@entry=0x7fffffffa850,
BT=BT@entry=0x555558b0f1c0, BlockSize=BlockSize@entry=0, MatrixStride=MatrixStride@entry=4294967295,
IsRowMajor=IsRowMajor@entry=false) at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:4512
#3 0x00005555557c0f6c in SPIRV::SPIRVToLLVM::transShaderDecoration (this=this@entry=0x7fffffffa850,
BV=BV@entry=0x55555ac27f00, V=V@entry=0x555557a3c868)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:4358
#4 0x00005555557c11ff in SPIRV::SPIRVToLLVM::transDecoration (this=0x7fffffffa850, BV=0x55555ac27f00, V=0x555557a3c868)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:3883
#5 0x00005555557c71b5 in SPIRV::SPIRVToLLVM::transValue (this=this@entry=0x7fffffffa850, BV=0x55555ac27f00,
F=F@entry=0x0, BB=BB@entry=0x0, CreatePlaceHolder=CreatePlaceHolder@entry=true)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:1096
#6 0x00005555557d07fe in SPIRV::SPIRVToLLVM::translate (this=this@entry=0x7fffffffa850,
EntryExecModel=EntryExecModel@entry=spv::ExecutionModelGLCompute,
EntryName=EntryName@entry=0x555557673aa8 <EntryTarget+168> "main")
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:3818
#7 0x00005555557d0e7f in llvm::readSpirv (C=..., IS=...,
EntryExecModel=EntryExecModel@entry=spv::ExecutionModelGLCompute,
EntryName=EntryName@entry=0x555557673aa8 <EntryTarget+168> "main", SpecConstMap=std::map with 0 elements,
M=@0x7fffffffaf98: 0x555557763540, ErrMsg="", forceLoopUnrollCount=0)
at /home/cmr/proj/vulkandriver/drivers/llpc/translator/SPIRVReader.cpp:5484
#8 0x0000555555731fa4 in Llpc::Compiler::TranslateSpirvToLlvm (this=this@entry=0x555557719890,
pSpirvBin=<optimized out>, pSpirvBin@entry=0x55555acbef48, shaderStage=shaderStage@entry=Llpc::ShaderStageCompute,
pEntryTarget=0x555557673aa8 <EntryTarget+168> "main", pSpecializationInfo=0x0,
pContext=pContext@entry=0x55555771d5f0, forceLoopUnrollCount=0, ppModule=0x7fffffffaf98)
at /home/cmr/proj/vulkandriver/drivers/llpc/context/llpcCompiler.cpp:1631
#9 0x00005555557372b2 in Llpc::Compiler::BuildComputePipelineInternal (this=this@entry=0x555557719890,
pComputeContext=pComputeContext@entry=0x7fffffffb1a0, pPipelineInfo=pPipelineInfo@entry=0x7fffffffde00,
forceLoopUnrollCount=forceLoopUnrollCount@entry=0, pPipelineElf=pPipelineElf@entry=0x7fffffffc100,
pDynamicLoopUnroll=pDynamicLoopUnroll@entry=0x7fffffffb110)
at /home/cmr/proj/vulkandriver/drivers/llpc/context/llpcCompiler.cpp:1127
#10 0x0000555555738657 in Llpc::Compiler::BuildComputePipeline (this=0x555557719890, pPipelineInfo=0x7fffffffde00,
pPipelineOut=0x7fffffffde78) at /home/cmr/proj/vulkandriver/drivers/llpc/context/llpcCompiler.cpp:1410
#11 0x00005555556d832d in BuildPipeline (pCompileInfo=0x7fffffffda30, pCompiler=0x555557719890)
at /home/cmr/proj/vulkandriver/drivers/llpc/tool/amdllpc.cpp:828
#12 main (argc=<optimized out>, argv=<optimized out>) at /home/cmr/proj/vulkandriver/drivers/llpc/tool/amdllpc.cpp:1194
from llpc.
Related Issues (20)
- IR verification failures HOT 3
- Build options required for check-amdllpc appear to be undocumented HOT 5
- Code traceability strategies HOT 5
- Cleanup the pass pipeline HOT 2
- Make XFB query counter increment even if XFB output are not written to HOT 12
- Discussion about mesh shaders and GFX11 HOT 23
- Substitution of %gfxip in update_llpc_test_checks.py missing
- Redesign the processing of task payload HOT 1
- Warnings in debug support
- Refactor export built-ins via generic outputs
- Add LLVM assumptions for descriptor table size and alignment HOT 14
- Deprecate pre-GFX10 support in LLPC HOT 3
- PatchReadFirstLane breaks ballot code HOT 2
- [Tests] Re-enable test disabled in ffc49b2
- [Tests] Re-enable test disabled in f0436bb.
- [Tests] Re-enable tests disabled in 854b7b8ab1
- [Tests] Re-enable tests disabled 5db5dabbef
- [Tests] Re-enable tests disabled in 4d8954d9ec HOT 1
- [Tests] Re-enable test disabled in 82ef9665ff
- [Tests] Re-enable tests disabled in 0b156027cc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llpc.