Skip to content

Commit 7030357

Browse files
azhirnovTheMostDiligent
authored andcommitted
Fixed field packing on 32-bit Android when used C-interface
1 parent 6df034a commit 7030357

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Graphics/GraphicsEngine/interface/PipelineState.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,12 @@ struct PipelineStateCreateInfo
437437

438438
/// The number of elements in ppResourceSignatures array.
439439
Uint32 ResourceSignaturesCount DEFAULT_INITIALIZER(0);
440+
441+
// In 32-bit, there might be a problem that may cause mismatch between C++ and C interfaces:
442+
// PSODesc contains a Uint64 member, so the entire structure has 64-bit alignment. When
443+
// another struct is derived from PipelineStateCreateInfo, though, the compiler may place
444+
// another member in this space. To fix this, we add padding.
445+
Uint32 _Padding;
440446
};
441447
typedef struct PipelineStateCreateInfo PipelineStateCreateInfo;
442448

0 commit comments

Comments
 (0)