diff options
| author | 2020-03-11 01:08:28 -0300 | |
|---|---|---|
| committer | 2020-03-13 18:33:05 -0300 | |
| commit | afebdda2031ca0a39f2816cf56388c04c63ed336 (patch) | |
| tree | 85e4b10c35bed619d204dd7ccc77faf6c66cda11 /src/video_core | |
| parent | gl_shader_decompiler: Fix implicit conversion errors (diff) | |
| download | yuzu-afebdda2031ca0a39f2816cf56388c04c63ed336.tar.gz yuzu-afebdda2031ca0a39f2816cf56388c04c63ed336.tar.xz yuzu-afebdda2031ca0a39f2816cf56388c04c63ed336.zip | |
maxwell_3d: Add padding words to XFB entries
Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size
requirement.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index ba9c76593..8a9e9992e 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -628,12 +628,13 @@ public: | |||
| 628 | float depth_range_far; | 628 | float depth_range_far; |
| 629 | }; | 629 | }; |
| 630 | 630 | ||
| 631 | struct alignas(32) TransformFeedbackBinding { | 631 | struct TransformFeedbackBinding { |
| 632 | u32 buffer_enable; | 632 | u32 buffer_enable; |
| 633 | u32 address_high; | 633 | u32 address_high; |
| 634 | u32 address_low; | 634 | u32 address_low; |
| 635 | s32 buffer_size; | 635 | s32 buffer_size; |
| 636 | s32 buffer_offset; | 636 | s32 buffer_offset; |
| 637 | INSERT_UNION_PADDING_WORDS(3); | ||
| 637 | 638 | ||
| 638 | GPUVAddr Address() const { | 639 | GPUVAddr Address() const { |
| 639 | return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | | 640 | return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | |
| @@ -642,10 +643,11 @@ public: | |||
| 642 | }; | 643 | }; |
| 643 | static_assert(sizeof(TransformFeedbackBinding) == 32); | 644 | static_assert(sizeof(TransformFeedbackBinding) == 32); |
| 644 | 645 | ||
| 645 | struct alignas(16) TransformFeedbackLayout { | 646 | struct TransformFeedbackLayout { |
| 646 | u32 stream; | 647 | u32 stream; |
| 647 | u32 varying_count; | 648 | u32 varying_count; |
| 648 | u32 stride; | 649 | u32 stride; |
| 650 | INSERT_UNION_PADDING_WORDS(1); | ||
| 649 | }; | 651 | }; |
| 650 | static_assert(sizeof(TransformFeedbackLayout) == 16); | 652 | static_assert(sizeof(TransformFeedbackLayout) == 16); |
| 651 | 653 | ||