Skip to content

Instantly share code, notes, and snippets.

View Subv's full-sized avatar

Sebastian Valle Subv

  • Barranquilla, Colombia
View GitHub Profile
@@ -409,8 +411,66 @@ static void ProcessShaderCode(VertexShaderState& state) {
}
float24* dest = (instr.mad.dest.Value() < 0x10) ? &state.output_registers[instr.mad.dest.Value().GetIndex()][0]
- : (instr.mad.dest.Value() < 0x20) ? &state.temporary_registers[instr.mad.dest.Value().GetIndex()][0]
- : dummy_vec4_float24;
+ : (instr.mad.dest.Value() < 0x20) ? &state.temporary_registers[instr.mad.dest.Value().GetIndex()][0]
+ : dummy_vec4_float24;
+
+ for (int i = 0; i < 4; ++i) {
((Pica::float24*)(&shader_uniforms.f[93].x))[1]
{value=1.00000000 }
value: 1.00000000
((Pica::float24*)(&shader_uniforms.f[93].x))[2]
{value=2.00000000 }
value: 2.00000000
((Pica::float24*)(&shader_uniforms.f[93].x))[3]
{value=3.00000000 }
value: 3.00000000
swizzle.GetSelectorSrc1(0)
w (0x00000003)
swizzle.GetSelectorSrc1(1)
w (0x00000003)
swizzle.GetSelectorSrc1(2)
w (0x00000003)
swizzle.GetSelectorSrc1(3)
w (0x00000003)
swizzle.GetSelectorSrc2(0)
x (0x00000000)
swizzle.src2_selector_0
{storage=0x80001fe8 }
storage: 0x80001fe8
swizzle.src2_selector_0.Value()
x (0x00000000)
swizzle.src2_selector_1.Value()
x (0x00000000)
swizzle.src2_selector_2.Value()
x (0x00000000)
swizzle.src2_selector_3.Value()
@@ -301,6 +310,10 @@ static void ProcessShaderCode(VertexShaderState& state) {
state.address_registers[i] = static_cast<s32>(src1[i].ToFloat32());
}
+ if (binary_offset * 4 == 0x10C) {
+ if (state.address_registers[1] != 0)
+ LOG_CRITICAL(HW_GPU, "Move from r0.z, %f -> %u", src1[1].ToFloat32(), state.address_registers[1]);
+ }
break;
}
@@ -595,6 +608,10 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) {
state.conditional_code[0] = false;
state.conditional_code[1] = false;
+ if (state.input_register_table[0]->ToFloat32() == 15) {
+ LOG_CRITICAL(HW_GPU, "v0.x = 15, c(6 + 15) = %f, %f, %f, %f", shader_uniforms.f[0x15].x.ToFloat32(), shader_uniforms.f[0x15].y.ToFloat32(), shader_uniforms.f[0x15].z.ToFloat32(), shader_uniforms.f[0x15].w.ToFloat32());
+ }
+
ProcessShaderCode(state);
DebugUtils::DumpShader(shader_memory.data(), state.debug.max_offset, swizzle_data.data(),
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp
index c4cdf67..757b6ad 100644
--- a/src/video_core/command_processor.cpp
+++ b/src/video_core/command_processor.cpp
@@ -74,11 +74,11 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) {
// Information about internal vertex attributes
u32 vertex_attribute_sources[16];
boost::fill(vertex_attribute_sources, 0xdeadbeef);
- u32 vertex_attribute_strides[16];
- Regs::VertexAttributeFormat vertex_attribute_formats[16];
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index d85fdb3..b1ba741 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -474,6 +474,10 @@ void Reschedule() {
if (next && prev) {
LOG_TRACE(Kernel, "context switch %u -> %u", prev->GetObjectId(), next->GetObjectId());
} else if (prev) {
+ // Do not reschedule if the current thread can keep running (ie. is not waiting)
+ if (prev->status == THREADSTATUS_RUNNING)
[ 9.987929] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00009430
[ 9.987929] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00019430
[ 9.987929] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00008400
[ 9.987929] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00018400
[ 9.987929] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00008540
[ 9.988912] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (STUBBED) called with address 0x00018540
[ 9.988912] Service.DSP <Warning> core\hle\service\dsp_dsp.cpp:DSP_DSP::ConvertProcessAddressFromDspDram:47: (
diff --git a/src/core/hle/service/csnd_snd.cpp b/src/core/hle/service/csnd_snd.cpp
index 6a1d961..97c18be 100644
--- a/src/core/hle/service/csnd_snd.cpp
+++ b/src/core/hle/service/csnd_snd.cpp
@@ -3,6 +3,8 @@
// Refer to the license.txt file included.
#include "core/hle/hle.h"
+#include "core/hle/kernel/mutex.h"
+#include "core/hle/kernel/shared_memory.h"