diff options
| author | Subv <subv2112@gmail.com> | 2018-08-11 20:36:40 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2018-08-11 20:36:40 -0500 |
| commit | 2dad1204e857259e65e50880c7416606c8382b2d (patch) | |
| tree | 1dd40e5540b56198fc64437eacdbdc2981396f82 /src/video_core/engines | |
| parent | 403dfd68fc41cec2261915d1647305c016a93440 (diff) | |
RasterizerGL: Ignore invalid/unset vertex attributes.
This should make the es2gears example not crash anymore.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 0506ac8fe..d795323b0 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -93,6 +93,7 @@ public: struct VertexAttribute { enum class Size : u32 { + Invalid = 0x0, Size_32_32_32_32 = 0x01, Size_32_32_32 = 0x02, Size_16_16_16_16 = 0x03, @@ -257,6 +258,10 @@ public: bool IsNormalized() const { return (type == Type::SignedNorm) || (type == Type::UnsignedNorm); } + + bool IsValid() const { + return size != Size::Invalid; + } }; enum class PrimitiveTopology : u32 { |
