diff options
| author | bunnei <bunneidev@gmail.com> | 2020-01-01 20:33:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-01 20:33:33 -0500 |
| commit | 1bfdfe2abfb6d6b4a75241aedab3e791fbc79392 (patch) | |
| tree | ff6956b8036cc180cacaad150d2658da7035f77d /src | |
| parent | 0f250f4a1fdc237d2ac5fe48af45df9513c14c8f (diff) | |
| parent | e2392c01a7e5f3f9232745ae0ecc0a5ff63f003c (diff) | |
Merge pull request #3243 from ReinUsesLisp/topologies
maxwell_to_gl: Implement missing primitive topologies
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 9ed738171c..ea4f35663c 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -120,6 +120,8 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { return GL_POINTS; case Maxwell::PrimitiveTopology::Lines: return GL_LINES; + case Maxwell::PrimitiveTopology::LineLoop: + return GL_LINE_LOOP; case Maxwell::PrimitiveTopology::LineStrip: return GL_LINE_STRIP; case Maxwell::PrimitiveTopology::Triangles: @@ -130,11 +132,23 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { return GL_TRIANGLE_FAN; case Maxwell::PrimitiveTopology::Quads: return GL_QUADS; - default: - LOG_CRITICAL(Render_OpenGL, "Unimplemented topology={}", static_cast<u32>(topology)); - UNREACHABLE(); - return {}; + case Maxwell::PrimitiveTopology::QuadStrip: + return GL_QUAD_STRIP; + case Maxwell::PrimitiveTopology::Polygon: + return GL_POLYGON; + case Maxwell::PrimitiveTopology::LinesAdjacency: + return GL_LINES_ADJACENCY; + case Maxwell::PrimitiveTopology::LineStripAdjacency: + return GL_LINE_STRIP_ADJACENCY; + case Maxwell::PrimitiveTopology::TrianglesAdjacency: + return GL_TRIANGLES_ADJACENCY; + case Maxwell::PrimitiveTopology::TriangleStripAdjacency: + return GL_TRIANGLE_STRIP_ADJACENCY; + case Maxwell::PrimitiveTopology::Patches: + return GL_PATCHES; } + UNREACHABLE_MSG("Invalid topology={}", static_cast<int>(topology)); + return GL_POINTS; } inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode, |
