diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-09 02:40:19 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-09 02:40:19 -0300 |
| commit | 877a978a221d0418953338fe9644dc2b1d8b7b15 (patch) | |
| tree | d803100fe974bce85007e9d41a07f0944207bde0 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
| parent | 5933b3ea967341eb8e891b8141015c6ecd815830 (diff) | |
gl_rasterizer: Workaround Intel VAO DSA bug
There is a bug on Intel's blob driver where it fails to properly build a
vertex array object if it's not bound even after creating it with
glCreateVertexArrays. This workaround binds it after creating it to
bypass the issue.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 7ce8c2bcc..61ccfa104 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -153,6 +153,12 @@ GLuint RasterizerOpenGL::SetupVertexFormat() { vao_entry.Create(); const GLuint vao = vao_entry.handle; + // Eventhough we are using DSA to create this vertex array, there is a bug on Intel's blob + // that fails to properly create the vertex array if it's not bound even after creating it + // with glCreateVertexArrays + state.draw.vertex_array = vao; + state.ApplyVertexArrayState(); + glVertexArrayElementBuffer(vao, buffer_cache.GetHandle()); // Use the vertex array as-is, assumes that the data is formatted correctly for OpenGL. |
