Skip to content

Commit

Permalink
fix missing sign-extension when using device memory for BVH data.
Browse files Browse the repository at this point in the history
  • Loading branch information
freibold committed Sep 18, 2024
1 parent af475bd commit 681d33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernels/rthwif/rttrace/rttrace_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ struct __attribute__ ((packed,aligned(32))) MemHitV1
};

struct { // FIXME: removing these anonymous structs triggers IGC bug
uint64_t primLeafPtr : 42; // pointer to BVH leaf node (multiple of 64 bytes)
int64_t primLeafPtr : 42; // pointer to BVH leaf node (multiple of 64 bytes)
uint64_t hitGroupRecPtr0 : 22; // LSB of hit group record of the hit triangle (multiple of 16 bytes)
};

struct {
uint64_t instLeafPtr : 42; // pointer to BVH instance leaf node (in multiple of 64 bytes)
int64_t instLeafPtr : 42; // pointer to BVH instance leaf node (in multiple of 64 bytes)
uint64_t hitGroupRecPtr1 : 22; // MSB of hit group record of the hit triangle (multiple of 16 bytes)
};

Expand Down
1 change: 1 addition & 0 deletions kernels/rthwif/rttrace/rttrace_validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

#include "rttrace_validation.h"
#include <cmath>

#define sizeof_QBVH6_InternalNode6 64
#define QBVH6_rootNodeOffset 128
Expand Down

0 comments on commit 681d33b

Please sign in to comment.