summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-25 04:38:08 +0200
committerbunnei <bunneidev@gmail.com>2018-03-27 03:16:59 +0200
commit0a5832798a0ce33a84e74a6f9aedc90278cb05ac (patch)
tree63a52e43127835a6a4cc014711a9a8e14740879c /src/video_core
parentrenderer_opengl: Remove framebuffer RasterizerFlushVirtualRegion hack. (diff)
downloadyuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar.gz
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar.bz2
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar.lz
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar.xz
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.tar.zst
yuzu-0a5832798a0ce33a84e74a6f9aedc90278cb05ac.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp35
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_util.cpp20
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
-rw-r--r--src/video_core/video_core.cpp2
6 files changed, 34 insertions, 33 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 41e4ece1e..72481509b 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -20,6 +20,7 @@
#include "video_core/engines/maxwell_3d.h"
#include "video_core/renderer_opengl/gl_rasterizer.h"
#include "video_core/renderer_opengl/gl_shader_gen.h"
+#include "video_core/renderer_opengl/maxwell_to_gl.h"
#include "video_core/renderer_opengl/renderer_opengl.h"
using Maxwell = Tegra::Engines::Maxwell3D::Regs;
@@ -124,14 +125,14 @@ RasterizerOpenGL::RasterizerOpenGL() {
glBufferData(GL_UNIFORM_BUFFER, sizeof(VSUniformData), nullptr, GL_STREAM_COPY);
glBindBufferBase(GL_UNIFORM_BUFFER, 1, vs_uniform_buffer.handle);
} else {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
accelerate_draw = AccelDraw::Disabled;
glEnable(GL_BLEND);
- LOG_WARNING(HW_GPU, "Sync fixed function OpenGL state here when ready");
+ LOG_CRITICAL(Render_OpenGL, "Sync fixed function OpenGL state here!");
}
RasterizerOpenGL::~RasterizerOpenGL() {
@@ -200,12 +201,12 @@ void RasterizerOpenGL::SetupVertexShader(VSUniformData* ub_ptr, GLintptr buffer_
void RasterizerOpenGL::SetupFragmentShader(FSUniformData* ub_ptr, GLintptr buffer_offset) {
MICROPROFILE_SCOPE(OpenGL_FS);
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
bool RasterizerOpenGL::AccelerateDrawBatch(bool is_indexed) {
if (!has_ARB_separate_shader_objects) {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
return false;
}
@@ -438,17 +439,17 @@ void RasterizerOpenGL::FlushAndInvalidateRegion(VAddr addr, u64 size) {
bool RasterizerOpenGL::AccelerateDisplayTransfer(const void* config) {
MICROPROFILE_SCOPE(OpenGL_Blits);
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
return true;
}
bool RasterizerOpenGL::AccelerateTextureCopy(const void* config) {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
return true;
}
bool RasterizerOpenGL::AccelerateFill(const void* config) {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
return true;
}
@@ -529,14 +530,14 @@ void main() {
return;
}
- LOG_ERROR(HW_GPU, "Emulated shaders are not supported! Using a passthrough shader.");
+ LOG_CRITICAL(Render_OpenGL, "Emulated shaders are not supported! Using a passthrough shader.");
current_shader = &test_shader;
if (has_ARB_separate_shader_objects) {
test_shader.shader.Create(vertex_shader, nullptr, fragment_shader, {}, true);
glActiveShaderProgram(pipeline.handle, test_shader.shader.handle);
} else {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
state.draw.shader_program = test_shader.shader.handle;
@@ -549,33 +550,33 @@ void main() {
}
void RasterizerOpenGL::SyncClipEnabled() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncClipCoef() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncCullMode() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncDepthScale() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncDepthOffset() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncBlendEnabled() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncBlendFuncs() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
void RasterizerOpenGL::SyncBlendColor() {
- ASSERT_MSG(false, "Unimplemented");
+ UNREACHABLE();
}
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 0e0ef18cc..564ea8f9e 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -26,7 +26,7 @@ public:
sanitize_mul(sanitize_mul), emit_cb(emit_cb), setemit_cb(setemit_cb) {}
std::string Decompile() {
- UNIMPLEMENTED();
+ UNREACHABLE();
return {};
}
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index f242bce1d..8f3c98800 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -8,12 +8,12 @@
namespace GLShader {
std::string GenerateVertexShader(const MaxwellVSConfig& config) {
- UNIMPLEMENTED();
+ UNREACHABLE();
return {};
}
std::string GenerateFragmentShader(const MaxwellFSConfig& config) {
- UNIMPLEMENTED();
+ UNREACHABLE();
return {};
}
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp
index a3ba16761..a6c6204d5 100644
--- a/src/video_core/renderer_opengl/gl_shader_util.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_util.cpp
@@ -38,8 +38,8 @@ GLuint LoadProgram(const char* vertex_shader, const char* geometry_shader,
if (result == GL_TRUE) {
LOG_DEBUG(Render_OpenGL, "%s", &vertex_shader_error[0]);
} else {
- LOG_ERROR(Render_OpenGL, "Error compiling vertex shader:\n%s",
- &vertex_shader_error[0]);
+ LOG_CRITICAL(Render_OpenGL, "Error compiling vertex shader:\n%s",
+ &vertex_shader_error[0]);
}
}
}
@@ -62,8 +62,8 @@ GLuint LoadProgram(const char* vertex_shader, const char* geometry_shader,
if (result == GL_TRUE) {
LOG_DEBUG(Render_OpenGL, "%s", &geometry_shader_error[0]);
} else {
- LOG_ERROR(Render_OpenGL, "Error compiling geometry shader:\n%s",
- &geometry_shader_error[0]);
+ LOG_CRITICAL(Render_OpenGL, "Error compiling geometry shader:\n%s",
+ &geometry_shader_error[0]);
}
}
}
@@ -86,8 +86,8 @@ GLuint LoadProgram(const char* vertex_shader, const char* geometry_shader,
if (result == GL_TRUE) {
LOG_DEBUG(Render_OpenGL, "%s", &fragment_shader_error[0]);
} else {
- LOG_ERROR(Render_OpenGL, "Error compiling fragment shader:\n%s",
- &fragment_shader_error[0]);
+ LOG_CRITICAL(Render_OpenGL, "Error compiling fragment shader:\n%s",
+ &fragment_shader_error[0]);
}
}
}
@@ -128,20 +128,20 @@ GLuint LoadProgram(const char* vertex_shader, const char* geometry_shader,
if (result == GL_TRUE) {
LOG_DEBUG(Render_OpenGL, "%s", &program_error[0]);
} else {
- LOG_ERROR(Render_OpenGL, "Error linking shader:\n%s", &program_error[0]);
+ LOG_CRITICAL(Render_OpenGL, "Error linking shader:\n%s", &program_error[0]);
}
}
// If the program linking failed at least one of the shaders was probably bad
if (result == GL_FALSE) {
if (vertex_shader) {
- LOG_ERROR(Render_OpenGL, "Vertex shader:\n%s", vertex_shader);
+ LOG_CRITICAL(Render_OpenGL, "Vertex shader:\n%s", vertex_shader);
}
if (geometry_shader) {
- LOG_ERROR(Render_OpenGL, "Geometry shader:\n%s", geometry_shader);
+ LOG_CRITICAL(Render_OpenGL, "Geometry shader:\n%s", geometry_shader);
}
if (fragment_shader) {
- LOG_ERROR(Render_OpenGL, "Fragment shader:\n%s", fragment_shader);
+ LOG_CRITICAL(Render_OpenGL, "Fragment shader:\n%s", fragment_shader);
}
}
ASSERT_MSG(result == GL_TRUE, "Shader not linked");
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 221d0a222..82063df72 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -279,7 +279,7 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture,
gl_framebuffer_data.resize(texture.width * texture.height * 4);
break;
default:
- UNIMPLEMENTED();
+ UNREACHABLE();
}
state.texture_units[0].texture_2d = texture.resource.handle;
@@ -305,7 +305,7 @@ void RendererOpenGL::DrawSingleScreen(const ScreenInfo& screen_info, float x, fl
right = texcoords.left;
} else {
// Other transformations are unsupported
- LOG_CRITICAL(HW_GPU, "unsupported framebuffer_transform_flags=%d",
+ LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags=%d",
framebuffer_transform_flags);
UNIMPLEMENTED();
}
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index 864691baa..289140f31 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -26,7 +26,7 @@ bool Init(EmuWindow* emu_window) {
if (g_renderer->Init()) {
LOG_DEBUG(Render, "initialized OK");
} else {
- LOG_ERROR(Render, "initialization failed !");
+ LOG_CRITICAL(Render, "initialization failed !");
return false;
}
return true;