summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp15
-rw-r--r--src/video_core/debug_utils/debug_utils.h14
-rw-r--r--src/video_core/engines/maxwell_3d.cpp8
-rw-r--r--src/video_core/engines/shader_bytecode.h6
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp3
5 files changed, 15 insertions, 31 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 22d44aab2..5ffb492ea 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -2,23 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
-#include <algorithm>
-#include <condition_variable>
-#include <cstdint>
-#include <cstring>
-#include <fstream>
-#include <map>
#include <mutex>
-#include <string>
-#include "common/assert.h"
-#include "common/bit_field.h"
-#include "common/color.h"
-#include "common/common_types.h"
-#include "common/file_util.h"
-#include "common/logging/log.h"
-#include "common/math_util.h"
-#include "common/vector_math.h"
#include "video_core/debug_utils/debug_utils.h"
namespace Tegra {
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 9382a75e5..c235faf46 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -4,19 +4,11 @@
#pragma once
-#include <algorithm>
#include <array>
#include <condition_variable>
-#include <iterator>
#include <list>
-#include <map>
#include <memory>
#include <mutex>
-#include <string>
-#include <utility>
-#include <vector>
-#include "common/common_types.h"
-#include "common/vector_math.h"
namespace Tegra {
@@ -46,7 +38,7 @@ public:
class BreakPointObserver {
public:
/// Constructs the object such that it observes events of the given DebugContext.
- BreakPointObserver(std::shared_ptr<DebugContext> debug_context)
+ explicit BreakPointObserver(std::shared_ptr<DebugContext> debug_context)
: context_weak(debug_context) {
std::unique_lock<std::mutex> lock(debug_context->breakpoint_mutex);
debug_context->breakpoint_observers.push_back(this);
@@ -141,8 +133,8 @@ public:
}
// TODO: Evaluate if access to these members should be hidden behind a public interface.
- std::array<BreakPoint, (int)Event::NumEvents> breakpoints;
- Event active_breakpoint;
+ std::array<BreakPoint, static_cast<int>(Event::NumEvents)> breakpoints;
+ Event active_breakpoint{};
bool at_breakpoint = false;
private:
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 68f91cc75..f32a79d7b 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -218,10 +218,6 @@ void Maxwell3D::DrawArrays() {
debug_context->OnEvent(Tegra::DebugContext::Event::IncomingPrimitiveBatch, nullptr);
}
- if (debug_context) {
- debug_context->OnEvent(Tegra::DebugContext::Event::FinishedPrimitiveBatch, nullptr);
- }
-
// Both instance configuration registers can not be set at the same time.
ASSERT_MSG(!regs.draw.instance_next || !regs.draw.instance_cont,
"Illegal combination of instancing parameters");
@@ -237,6 +233,10 @@ void Maxwell3D::DrawArrays() {
const bool is_indexed{regs.index_array.count && !regs.vertex_buffer.count};
rasterizer.AccelerateDrawBatch(is_indexed);
+ if (debug_context) {
+ debug_context->OnEvent(Tegra::DebugContext::Event::FinishedPrimitiveBatch, nullptr);
+ }
+
// TODO(bunnei): Below, we reset vertex count so that we can use these registers to determine if
// the game is trying to draw indexed or direct mode. This needs to be verified on HW still -
// it's possible that it is incorrect and that there is some other register used to specify the
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index a36df65f9..7fd622159 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -636,6 +636,9 @@ public:
IADD_C,
IADD_R,
IADD_IMM,
+ IADD3_C,
+ IADD3_R,
+ IADD3_IMM,
IADD32I,
ISCADD_C, // Scale and Add
ISCADD_R,
@@ -854,6 +857,9 @@ private:
INST("0100110000010---", Id::IADD_C, Type::ArithmeticInteger, "IADD_C"),
INST("0101110000010---", Id::IADD_R, Type::ArithmeticInteger, "IADD_R"),
INST("0011100-00010---", Id::IADD_IMM, Type::ArithmeticInteger, "IADD_IMM"),
+ INST("010011001100----", Id::IADD3_C, Type::ArithmeticInteger, "IADD3_C"),
+ INST("010111001100----", Id::IADD3_R, Type::ArithmeticInteger, "IADD3_R"),
+ INST("0011100-1100----", Id::IADD3_IMM, Type::ArithmeticInteger, "IADD3_IMM"),
INST("0001110---------", Id::IADD32I, Type::ArithmeticIntegerImmediate, "IADD32I"),
INST("0100110000011---", Id::ISCADD_C, Type::ArithmeticInteger, "ISCADD_C"),
INST("0101110000011---", Id::ISCADD_R, Type::ArithmeticInteger, "ISCADD_R"),
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 8bfa75b84..96851ccb5 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -929,7 +929,8 @@ void RasterizerOpenGL::SyncLogicOpState() {
if (!state.logic_op.enabled)
return;
- ASSERT_MSG(regs.blend.enable == 0, "Blending and logic op can't be enabled at the same time.");
+ ASSERT_MSG(regs.blend.enable[0] == 0,
+ "Blending and logic op can't be enabled at the same time.");
state.logic_op.operation = MaxwellToGL::LogicOp(regs.logic_op.operation);
}