Add light, blend and sampler functions

This commit is contained in:
Magnus Norddahl 2016-09-28 05:18:16 +02:00
commit 576fed5afc
4 changed files with 173 additions and 7 deletions

View file

@ -60,6 +60,16 @@ SSAInt SSAVec4i::operator[](SSAInt index)
return SSAInt::from_llvm(SSAScope::builder().CreateExtractElement(v, index.v, SSAScope::hint()));
}
SSAVec4i SSAVec4i::insert(SSAInt index, SSAInt value)
{
return SSAVec4i::from_llvm(SSAScope::builder().CreateInsertElement(v, value.v, index.v, SSAScope::hint()));
}
SSAVec4i SSAVec4i::insert(int index, SSAInt value)
{
return SSAVec4i::from_llvm(SSAScope::builder().CreateInsertElement(v, value.v, index, SSAScope::hint()));
}
llvm::Type *SSAVec4i::llvm_type()
{
return llvm::VectorType::get(llvm::Type::getInt32Ty(SSAScope::context()), 4);