diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-18 20:46:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-18 20:46:57 -0700 |
| commit | d1efc69a20d941116d1398e4471689658cd6b888 (patch) | |
| tree | 22d7e56c02cea2d125ba483089a85205bbf45c15 /source/slang/slang-ir-lower-bit-cast.cpp | |
| parent | 95fcf65c38d52ed458a3b11622ea8b55a3864c24 (diff) | |
Use target-dependent pointer size in natural layout. (#3210)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-lower-bit-cast.cpp')
| -rw-r--r-- | source/slang/slang-ir-lower-bit-cast.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-ir-lower-bit-cast.cpp b/source/slang/slang-ir-lower-bit-cast.cpp index a5ac05ead..79e95f7de 100644 --- a/source/slang/slang-ir-lower-bit-cast.cpp +++ b/source/slang/slang-ir-lower-bit-cast.cpp @@ -72,7 +72,7 @@ struct BitCastLoweringContext { IRIntegerValue fieldOffset = 0; SLANG_RELEASE_ASSERT( - getNaturalOffset(field, &fieldOffset) == SLANG_OK); + getNaturalOffset(targetReq, field, &fieldOffset) == SLANG_OK); auto fieldType = field->getFieldType(); auto fieldValue = readObject(builder, src, fieldType, (uint32_t)(fieldOffset + offset)); @@ -90,7 +90,7 @@ struct BitCastLoweringContext IRSizeAndAlignment elementLayout; SLANG_RELEASE_ASSERT( getNaturalSizeAndAlignment( - arrayType->getElementType(), &elementLayout) == SLANG_OK); + targetReq, arrayType->getElementType(), &elementLayout) == SLANG_OK); for (IRIntegerValue i = 0; i < arrayCount->value.intVal; i++) { elements.add(readObject( @@ -111,7 +111,7 @@ struct BitCastLoweringContext IRSizeAndAlignment elementLayout; SLANG_RELEASE_ASSERT( getNaturalSizeAndAlignment( - vectorType->getElementType(), &elementLayout) == SLANG_OK); + targetReq, vectorType->getElementType(), &elementLayout) == SLANG_OK); for (IRIntegerValue i = 0; i < elementCount->value.intVal; i++) { elements.add(readObject( @@ -136,7 +136,7 @@ struct BitCastLoweringContext matrixType->getElementType(), matrixType->getColumnCount()); IRSizeAndAlignment elementLayout; SLANG_RELEASE_ASSERT( - getNaturalSizeAndAlignment(elementType, &elementLayout) == SLANG_OK); + getNaturalSizeAndAlignment(targetReq, elementType, &elementLayout) == SLANG_OK); for (IRIntegerValue i = 0; i < elementCount->value.intVal; i++) { elements.add(readObject( |
