diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-24 07:01:03 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-27 03:16:52 +0200 |
commit | ed2134784e173e071a124c768eea5dd12be8425c (patch) | |
tree | 81321ef22c0e035872aa9f3e2aeb6a4b9753039c /src/video_core/engines | |
parent | gl_rasterizer_cache: MortonCopy Switch-style. (diff) | |
download | yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar.gz yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar.bz2 yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar.lz yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar.xz yuzu-ed2134784e173e071a124c768eea5dd12be8425c.tar.zst yuzu-ed2134784e173e071a124c768eea5dd12be8425c.zip |
Diffstat (limited to 'src/video_core/engines')
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 3c49cd27f..869ddde90 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -229,6 +229,41 @@ public: BitField<21, 6, VertexSize> size; BitField<27, 3, VertexType> type; BitField<31, 1, u32> bgra; + + u32 SizeInBytes() const { + switch (size) { + case VertexSize::Size_32_32_32_32: + return 16; + case VertexSize::Size_32_32_32: + return 12; + case VertexSize::Size_16_16_16_16: + return 8; + case VertexSize::Size_32_32: + return 8; + case VertexSize::Size_16_16_16: + return 6; + case VertexSize::Size_8_8_8_8: + return 4; + case VertexSize::Size_16_16: + return 4; + case VertexSize::Size_32: + return 4; + case VertexSize::Size_8_8_8: + return 3; + case VertexSize::Size_8_8: + return 2; + case VertexSize::Size_16: + return 2; + case VertexSize::Size_8: + return 1; + case VertexSize::Size_10_10_10_2: + return 4; + case VertexSize::Size_11_11_10: + return 4; + default: + UNREACHABLE(); + } + } } vertex_attrib_format[NumVertexAttributes]; INSERT_PADDING_WORDS(0xF); |