summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Valle <subv2112@gmail.com>2016-12-15 06:16:04 +0100
committerGitHub <noreply@github.com>2016-12-15 06:16:04 +0100
commitec9130de8dfaf22bfc5dc8a4988b68532955b43a (patch)
treeb69ec4ddca4e310029a95020bbbd76ee6ef2bc75
parentMerge pull request #2309 from yuriks/shader-jit-xbyak (diff)
parentVideoCore: Eliminate an unnecessary copy in the drawcall loop (diff)
downloadyuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar.gz
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar.bz2
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar.lz
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar.xz
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.tar.zst
yuzu-ec9130de8dfaf22bfc5dc8a4988b68532955b43a.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/command_processor.cpp4
-rw-r--r--src/video_core/shader/shader.cpp2
-rw-r--r--src/video_core/shader/shader.h2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index 0495a9fac..8a5d8533c 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -251,7 +251,6 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
ASSERT(vertex != -1);
bool vertex_cache_hit = false;
- Shader::OutputRegisters output_registers;
if (is_indexed) {
if (g_debug_context && Pica::g_debug_context->recorder) {
@@ -279,10 +278,9 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
g_debug_context->OnEvent(DebugContext::Event::VertexShaderInvocation,
(void*)&input);
g_state.vs.Run(shader_unit, input, loader.GetNumTotalAttributes());
- output_registers = shader_unit.output_registers;
// Retrieve vertex from register data
- output_vertex = output_registers.ToVertex(regs.vs);
+ output_vertex = shader_unit.output_registers.ToVertex(regs.vs);
if (is_indexed) {
vertex_cache[vertex_cache_pos] = output_vertex;
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cpp
index 3febe739c..c7f23dab9 100644
--- a/src/video_core/shader/shader.cpp
+++ b/src/video_core/shader/shader.cpp
@@ -25,7 +25,7 @@ namespace Pica {
namespace Shader {
-OutputVertex OutputRegisters::ToVertex(const Regs::ShaderConfig& config) {
+OutputVertex OutputRegisters::ToVertex(const Regs::ShaderConfig& config) const {
// Setup output data
OutputVertex ret;
// TODO(neobrain): Under some circumstances, up to 16 attributes may be output. We need to
diff --git a/src/video_core/shader/shader.h b/src/video_core/shader/shader.h
index 8858d67f8..0111d8c0f 100644
--- a/src/video_core/shader/shader.h
+++ b/src/video_core/shader/shader.h
@@ -85,7 +85,7 @@ struct OutputRegisters {
alignas(16) Math::Vec4<float24> value[16];
- OutputVertex ToVertex(const Regs::ShaderConfig& config);
+ OutputVertex ToVertex(const Regs::ShaderConfig& config) const;
};
static_assert(std::is_pod<OutputRegisters>::value, "Structure is not POD");