diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 38 |
2 files changed, 3 insertions, 36 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 8aa63d329..4142b0cb5 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | namespace OpenGL { | 38 | namespace OpenGL { |
| 39 | 39 | ||
| 40 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; | 40 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; |
| 41 | using GLvec4 = std::array<GLfloat, 4>; | ||
| 41 | 42 | ||
| 42 | using Tegra::Engines::ShaderType; | 43 | using Tegra::Engines::ShaderType; |
| 43 | using VideoCore::Surface::PixelFormat; | 44 | using VideoCore::Surface::PixelFormat; |
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index cbccfdeb4..f7ad8f370 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -4,23 +4,10 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 8 | #include <glad/glad.h> | 7 | #include <glad/glad.h> |
| 9 | #include "common/common_types.h" | ||
| 10 | #include "common/logging/log.h" | ||
| 11 | #include "video_core/engines/maxwell_3d.h" | 8 | #include "video_core/engines/maxwell_3d.h" |
| 12 | 9 | ||
| 13 | namespace OpenGL { | 10 | namespace OpenGL::MaxwellToGL { |
| 14 | |||
| 15 | using GLvec2 = std::array<GLfloat, 2>; | ||
| 16 | using GLvec3 = std::array<GLfloat, 3>; | ||
| 17 | using GLvec4 = std::array<GLfloat, 4>; | ||
| 18 | |||
| 19 | using GLuvec2 = std::array<GLuint, 2>; | ||
| 20 | using GLuvec3 = std::array<GLuint, 3>; | ||
| 21 | using GLuvec4 = std::array<GLuint, 4>; | ||
| 22 | |||
| 23 | namespace MaxwellToGL { | ||
| 24 | 11 | ||
| 25 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; | 12 | using Maxwell = Tegra::Engines::Maxwell3D::Regs; |
| 26 | 13 | ||
| @@ -317,26 +304,6 @@ inline GLenum BlendFunc(Maxwell::Blend::Factor factor) { | |||
| 317 | return GL_ZERO; | 304 | return GL_ZERO; |
| 318 | } | 305 | } |
| 319 | 306 | ||
| 320 | inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) { | ||
| 321 | switch (source) { | ||
| 322 | case Tegra::Texture::SwizzleSource::Zero: | ||
| 323 | return GL_ZERO; | ||
| 324 | case Tegra::Texture::SwizzleSource::R: | ||
| 325 | return GL_RED; | ||
| 326 | case Tegra::Texture::SwizzleSource::G: | ||
| 327 | return GL_GREEN; | ||
| 328 | case Tegra::Texture::SwizzleSource::B: | ||
| 329 | return GL_BLUE; | ||
| 330 | case Tegra::Texture::SwizzleSource::A: | ||
| 331 | return GL_ALPHA; | ||
| 332 | case Tegra::Texture::SwizzleSource::OneInt: | ||
| 333 | case Tegra::Texture::SwizzleSource::OneFloat: | ||
| 334 | return GL_ONE; | ||
| 335 | } | ||
| 336 | UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", source); | ||
| 337 | return GL_ZERO; | ||
| 338 | } | ||
| 339 | |||
| 340 | inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { | 307 | inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { |
| 341 | switch (comparison) { | 308 | switch (comparison) { |
| 342 | case Maxwell::ComparisonOp::Never: | 309 | case Maxwell::ComparisonOp::Never: |
| @@ -493,5 +460,4 @@ inline GLenum ViewportSwizzle(Maxwell::ViewportSwizzle swizzle) { | |||
| 493 | return GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV + static_cast<GLenum>(swizzle); | 460 | return GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV + static_cast<GLenum>(swizzle); |
| 494 | } | 461 | } |
| 495 | 462 | ||
| 496 | } // namespace MaxwellToGL | 463 | } // namespace OpenGL::MaxwellToGL |
| 497 | } // namespace OpenGL | ||