diff options
| author | 2018-08-11 22:18:40 -0400 | |
|---|---|---|
| committer | 2018-08-11 22:18:40 -0400 | |
| commit | d37da52cb331b56ddab6990e379489fd517531d9 (patch) | |
| tree | 2ade680ffb8fcafb64c88dfd7c1ad4158d7dfc1d /src/video_core/renderer_opengl | |
| parent | Implement R8_UINT RenderTargetFormat & PixelFormat (#1014) (diff) | |
| parent | RasterizerGL: Ignore invalid/unset vertex attributes. (diff) | |
| download | yuzu-d37da52cb331b56ddab6990e379489fd517531d9.tar.gz yuzu-d37da52cb331b56ddab6990e379489fd517531d9.tar.xz yuzu-d37da52cb331b56ddab6990e379489fd517531d9.zip | |
Merge pull request #1023 from Subv/invalid_attribs
RasterizerGL: Ignore invalid/unset vertex attributes.
Diffstat (limited to 'src/video_core/renderer_opengl')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 8360feb5d..3646a1b1b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -161,11 +161,16 @@ std::pair<u8*, GLintptr> RasterizerOpenGL::SetupVertexArrays(u8* array_ptr, | |||
| 161 | // assume every shader uses them all. | 161 | // assume every shader uses them all. |
| 162 | for (unsigned index = 0; index < 16; ++index) { | 162 | for (unsigned index = 0; index < 16; ++index) { |
| 163 | auto& attrib = regs.vertex_attrib_format[index]; | 163 | auto& attrib = regs.vertex_attrib_format[index]; |
| 164 | |||
| 165 | // Ignore invalid attributes. | ||
| 166 | if (!attrib.IsValid()) | ||
| 167 | continue; | ||
| 168 | |||
| 169 | auto& buffer = regs.vertex_array[attrib.buffer]; | ||
| 164 | LOG_TRACE(HW_GPU, "vertex attrib {}, count={}, size={}, type={}, offset={}, normalize={}", | 170 | LOG_TRACE(HW_GPU, "vertex attrib {}, count={}, size={}, type={}, offset={}, normalize={}", |
| 165 | index, attrib.ComponentCount(), attrib.SizeString(), attrib.TypeString(), | 171 | index, attrib.ComponentCount(), attrib.SizeString(), attrib.TypeString(), |
| 166 | attrib.offset.Value(), attrib.IsNormalized()); | 172 | attrib.offset.Value(), attrib.IsNormalized()); |
| 167 | 173 | ||
| 168 | auto& buffer = regs.vertex_array[attrib.buffer]; | ||
| 169 | ASSERT(buffer.IsEnabled()); | 174 | ASSERT(buffer.IsEnabled()); |
| 170 | 175 | ||
| 171 | glEnableVertexAttribArray(index); | 176 | glEnableVertexAttribArray(index); |