Skip to content

Commit 1af458a

Browse files
committed
Fixed struct alignment of GpuPrintBufferElement for C++ & Slang to match for correct GPUPrint output
1 parent 682bf4f commit 1af458a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/dxvk/shaders/rtx/utility/gpu_printing.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323

2424
static const int16_t kInvalidThreadIndex = 32767; // ~ int16_t max
2525

26+
// Note: ensure alignment for C++ and Slang to match
2627
struct GpuPrintBufferElement
27-
{
28+
{
29+
float4 writtenData;
30+
2831
u16vec2 threadIndex; // Thread index of the written data
2932
uint frameIndex; // Frame index when the data was written
30-
31-
float4 writtenData;
33+
uint2 pad;
3234

3335
#ifndef __cplusplus
3436
[mutating]

0 commit comments

Comments
 (0)