Bugfix: add per-lane offsets when accessing varying data through a pointer!
This commit is contained in:
6
expr.cpp
6
expr.cpp
@@ -3065,8 +3065,10 @@ IndexExpr::GetLValue(FunctionEmitContext *ctx) const {
|
|||||||
if (baseValue == NULL || indexValue == NULL)
|
if (baseValue == NULL || indexValue == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
ctx->SetDebugPos(pos);
|
ctx->SetDebugPos(pos);
|
||||||
return ctx->GetElementPtrInst(baseValue, indexValue,
|
llvm::Value *ptr = ctx->GetElementPtrInst(baseValue, indexValue,
|
||||||
baseExprType, "ptr_offset");
|
baseExprType, "ptr_offset");
|
||||||
|
ptr = lAddVaryingOffsetsIfNeeded(ctx, ptr, GetLValueType());
|
||||||
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise it's an array or vector
|
// Otherwise it's an array or vector
|
||||||
|
|||||||
Reference in New Issue
Block a user