diff options
| author | 2020-03-14 09:48:15 -0400 | |
|---|---|---|
| committer | 2020-03-14 09:48:15 -0400 | |
| commit | 35145bd529c3517e2c366efc764a762092d96edf (patch) | |
| tree | 58c80a2133092b990ca11f3a357d70fab2c5fd0b /src/video_core/engines | |
| parent | Merge pull request #3473 from ReinUsesLisp/shader-purge (diff) | |
| parent | vk/gl_shader_decompiler: Silence assertion on compute (diff) | |
| download | yuzu-35145bd529c3517e2c366efc764a762092d96edf.tar.gz yuzu-35145bd529c3517e2c366efc764a762092d96edf.tar.xz yuzu-35145bd529c3517e2c366efc764a762092d96edf.zip | |
Merge pull request #3490 from ReinUsesLisp/transform-feedbacks
video_core: Initial implementation of transform feedbacks
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 8752a1cfb..8a9e9992e 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h | |||
| @@ -628,19 +628,26 @@ 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); | ||
| 638 | |||
| 639 | GPUVAddr Address() const { | ||
| 640 | return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | | ||
| 641 | address_low); | ||
| 642 | } | ||
| 637 | }; | 643 | }; |
| 638 | static_assert(sizeof(TransformFeedbackBinding) == 32); | 644 | static_assert(sizeof(TransformFeedbackBinding) == 32); |
| 639 | 645 | ||
| 640 | struct alignas(16) TransformFeedbackLayout { | 646 | struct TransformFeedbackLayout { |
| 641 | u32 stream; | 647 | u32 stream; |
| 642 | u32 varying_count; | 648 | u32 varying_count; |
| 643 | u32 stride; | 649 | u32 stride; |
| 650 | INSERT_UNION_PADDING_WORDS(1); | ||
| 644 | }; | 651 | }; |
| 645 | static_assert(sizeof(TransformFeedbackLayout) == 16); | 652 | static_assert(sizeof(TransformFeedbackLayout) == 16); |
| 646 | 653 | ||
| @@ -652,6 +659,10 @@ public: | |||
| 652 | return shader_config[index].enable != 0; | 659 | return shader_config[index].enable != 0; |
| 653 | } | 660 | } |
| 654 | 661 | ||
| 662 | bool IsShaderConfigEnabled(Regs::ShaderProgram type) const { | ||
| 663 | return IsShaderConfigEnabled(static_cast<std::size_t>(type)); | ||
| 664 | } | ||
| 665 | |||
| 655 | union { | 666 | union { |
| 656 | struct { | 667 | struct { |
| 657 | INSERT_UNION_PADDING_WORDS(0x45); | 668 | INSERT_UNION_PADDING_WORDS(0x45); |