Skip to content

Commit 7601a01

Browse files
fhazubski-Inteligcbot
authored andcommitted
Fix HW GlobalData layout
Update members placement to correct offset.
1 parent 96309bf commit 7601a01

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

IGC/AdaptorCommon/RayTracing/API/RayDispatchGlobalData.h

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,18 +219,24 @@ struct RayDispatchGlobalData
219219
uint64_t callStackHandlerPtr; // this is the KSP of the continuation handler that is invoked by BTD when the read KSP is 0
220220
union {
221221
uint32_t stackSizePerRay; // maximal stack size of a ray
222-
uint32_t sizePerRay : 8;
223-
uint32_t MBZ1 : 24;
222+
struct {
223+
uint32_t sizePerRay : 8;
224+
uint32_t MBZ1 : 24;
225+
};
224226
} stack_size_info;
225227
union {
226228
uint32_t numDSSRTStacks; // number of stacks per DSS
227-
uint32_t numRTStacks : 12;
228-
uint32_t MBZ2 : 20;
229+
struct {
230+
uint32_t numRTStacks : 12;
231+
uint32_t MBZ2 : 20;
232+
};
229233
} num_stacks_info;
230234
union {
231235
uint32_t maxBVHLevels; // the maximal number of supported instancing levels
232-
uint32_t bvhLevels : 3;
233-
uint32_t MBZ3 : 29;
236+
struct {
237+
uint32_t bvhLevels : 3;
238+
uint32_t MBZ3 : 29;
239+
};
234240
} rt_data_info;
235241
// In addition to the dword of padding to align `common`, we also
236242
// add 8 dwords so Xe and Xe3 both have the same RTGlobals size.
@@ -271,16 +277,20 @@ struct RayDispatchGlobalData
271277
} stack_size_info;
272278
union {
273279
uint32_t numRTStacks; // number of stacks per DSS
274-
uint32_t numDSSRTStacks : 16; // number of asynch stacks per DSS
275-
uint32_t _pad1_mbz : 16;
280+
struct {
281+
uint32_t numDSSRTStacks : 16; // number of asynch stacks per DSS
282+
uint32_t _pad1_mbz : 16;
283+
};
276284

277285
} num_stacks_info;
278286
union {
279287
uint32_t packedData;
280-
uint32_t maxBVHLevels : 3; // the maximal number of supported instancing levels (0->8, 1->1, 2->2, ...)
281-
uint32_t hitGroupStride : 13; // stride of hit group shader records (16-bytes alignment)
282-
uint32_t missShaderStride : 13; // stride of miss shader records (8-bytes alignment)
283-
uint32_t _pad2_mbz : 3;
288+
struct {
289+
uint32_t maxBVHLevels : 3; // the maximal number of supported instancing levels (0->8, 1->1, 2->2, ...)
290+
uint32_t hitGroupStride : 13; // stride of hit group shader records (16-bytes alignment)
291+
uint32_t missShaderStride : 13; // stride of miss shader records (8-bytes alignment)
292+
uint32_t _pad2_mbz : 3;
293+
};
284294
} rt_data_info;
285295
uint32_t flags : 1; // per context control flags
286296
uint32_t pad_mbz : 31;

0 commit comments

Comments
 (0)