Skip to content

Crash when a geometry shader uses the same struct for input and output #1761

Description

Repro:

struct GSInOut { float value : TEXCOORD0; };

[maxvertexcount(1)]
void main(point GSInOut input[1], inout PointStream<GSInOut> output)
{
    output.Append(input[0]);
}

Call stack:

>	dxcompiler.dll!llvm_assert(const char * _Message, const char * _File, unsigned int _Line, const char * _Function) Line 23	C++
 	dxcompiler.dll!llvm::StoreInst::AssertOK() Line 993	C++
 	dxcompiler.dll!llvm::StoreInst::StoreInst(llvm::Value * val, llvm::Value * addr, bool isVolatile, unsigned int Align, llvm::AtomicOrdering Order, llvm::SynchronizationScope SynchScope, llvm::Instruction * InsertBefore) Line 1037	C++
 	dxcompiler.dll!llvm::StoreInst::StoreInst(llvm::Value * val, llvm::Value * addr, bool isVolatile, unsigned int Align, llvm::Instruction * InsertBefore) Line 1017	C++
 	dxcompiler.dll!llvm::StoreInst::StoreInst(llvm::Value * val, llvm::Value * addr, bool isVolatile, llvm::Instruction * InsertBefore) Line 1008	C++
 	dxcompiler.dll!llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> >::CreateStore(llvm::Value * Val, llvm::Value * Ptr, bool isVolatile) Line 986	C++
 	dxcompiler.dll!SimplePtrCopy(llvm::Value * DestPtr, llvm::Value * SrcPtr, llvm::SmallVector<llvm::Value *,16> & idxList, llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> > & Builder) Line 2200	C++
 	dxcompiler.dll!SimpleCopy(llvm::Value * Dest, llvm::Value * Src, llvm::SmallVector<llvm::Value *,16> & idxList, llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> > & Builder) Line 2225	C++
 	dxcompiler.dll!SplitCpy(llvm::Type * Ty, llvm::Value * Dest, llvm::Value * Src, llvm::SmallVector<llvm::Value *,16> & idxList, llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> > & Builder, const llvm::DataLayout & DL, hlsl::DxilTypeSystem & typeSys, hlsl::DxilFieldAnnotation * fieldAnnotation, const bool bEltMemCpy) Line 2366	C++
 	dxcompiler.dll!SplitCpy(llvm::Type * Ty, llvm::Value * Dest, llvm::Value * Src, llvm::SmallVector<llvm::Value *,16> & idxList, llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> > & Builder, const llvm::DataLayout & DL, hlsl::DxilTypeSystem & typeSys, hlsl::DxilFieldAnnotation * fieldAnnotation, const bool bEltMemCpy) Line 2284	C++
 	dxcompiler.dll!`anonymous namespace'::SROA_Parameter_HLSL::flattenArgument(llvm::Function * F, llvm::Value * Arg, bool bForParam, hlsl::DxilParameterAnnotation & paramAnnotation, std::vector<llvm::Value *,std::allocator<llvm::Value *> > & FlatParamList, std::vector<hlsl::DxilParameterAnnotation,std::allocator<hlsl::DxilParameterAnnotation> > & FlatAnnotationList, llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> > & Builder, llvm::DbgDeclareInst * DDI) Line 5606	C++
 	dxcompiler.dll!`anonymous namespace'::SROA_Parameter_HLSL::createFlattenedFunction(llvm::Function * F) Line 6072	C++
 	dxcompiler.dll!`anonymous namespace'::SROA_Parameter_HLSL::runOnModule(llvm::Module & M) Line 4284	C++

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions