Skip to content

Commit

Permalink
Fix GCC memcpy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
W4RH4WK committed Jan 8, 2021
1 parent 4c8330c commit 527a67a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raygun/render/acceleration_structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace {

// 3x4 row-major affine transformation matrix.
const auto transform = glm::transpose(entity.globalTransform().toMat4());
memcpy(&instance.transform, &transform, sizeof(instance.transform));
instance.transform.matrix = *reinterpret_cast<const vk::ArrayWrapper2D<float, 3, 4>*>(&transform);

const auto blasAddress = device.getAccelerationStructureAddressKHR({vk::AccelerationStructureKHR(*entity.model->bottomLevelAS)});
instance.setAccelerationStructureReference(blasAddress);
Expand Down

0 comments on commit 527a67a

Please sign in to comment.