summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp1
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h38
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 @@
38namespace OpenGL { 38namespace OpenGL {
39 39
40using Maxwell = Tegra::Engines::Maxwell3D::Regs; 40using Maxwell = Tegra::Engines::Maxwell3D::Regs;
41using GLvec4 = std::array<GLfloat, 4>;
41 42
42using Tegra::Engines::ShaderType; 43using Tegra::Engines::ShaderType;
43using VideoCore::Surface::PixelFormat; 44using 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
13namespace OpenGL { 10namespace OpenGL::MaxwellToGL {
14
15using GLvec2 = std::array<GLfloat, 2>;
16using GLvec3 = std::array<GLfloat, 3>;
17using GLvec4 = std::array<GLfloat, 4>;
18
19using GLuvec2 = std::array<GLuint, 2>;
20using GLuvec3 = std::array<GLuint, 3>;
21using GLuvec4 = std::array<GLuint, 4>;
22
23namespace MaxwellToGL {
24 11
25using Maxwell = Tegra::Engines::Maxwell3D::Regs; 12using 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
320inline 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
340inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { 307inline 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