diff --git a/Core/MIPS/MIPSAsm.cpp b/Core/MIPS/MIPSAsm.cpp index 19d6c938e..1defcb947 100644 --- a/Core/MIPS/MIPSAsm.cpp +++ b/Core/MIPS/MIPSAsm.cpp @@ -89,8 +89,10 @@ bool MipsAssembleOpcode(const char* line, DebugInterface* cpu, u32 address) args.silent = true; args.memoryFile = &file; args.errorsResult = &errors; - - g_symbolMap->GetLabels(args.labels); + + if (g_symbolMap) { + g_symbolMap->GetLabels(args.labels); + } errorText = L""; if (!runArmips(args)) diff --git a/ext/native/thin3d/thin3d_vulkan.cpp b/ext/native/thin3d/thin3d_vulkan.cpp index 237184a8f..1a596fb27 100644 --- a/ext/native/thin3d/thin3d_vulkan.cpp +++ b/ext/native/thin3d/thin3d_vulkan.cpp @@ -376,7 +376,7 @@ public: curIBufferOffset_ = offset; } - void UpdateDynamicUniformBuffer(const void *ub, size_t size); + void UpdateDynamicUniformBuffer(const void *ub, size_t size) override; // TODO: Add more sophisticated draws. void Draw(int vertexCount, int offset) override; @@ -1320,4 +1320,4 @@ void VKContext::HandleEvent(Event ev, int width, int height, void *param1, void // Noop } -} // namespace Draw \ No newline at end of file +} // namespace Draw diff --git a/headless/StubHost.h b/headless/StubHost.h index 78e9b1a15..0a4be899c 100644 --- a/headless/StubHost.h +++ b/headless/StubHost.h @@ -29,7 +29,7 @@ public: void UpdateMemView() override {} void UpdateDisassembly() override {} - void SetDebugMode(bool mode) { } + void SetDebugMode(bool mode) override { } void SetGraphicsCore(GPUCore core) { gpuCore_ = core; } bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override {return false;} @@ -73,4 +73,4 @@ public: protected: std::string debugOutputBuffer_; GPUCore gpuCore_; -}; \ No newline at end of file +}; diff --git a/unittest/JitHarness.cpp b/unittest/JitHarness.cpp index 3f0c2493d..29ab315e4 100644 --- a/unittest/JitHarness.cpp +++ b/unittest/JitHarness.cpp @@ -91,8 +91,8 @@ static void DestroyJitHarness() { // Clear our custom module out to be safe. HLEShutdown(); CoreTiming::Shutdown(); - Memory::Shutdown(); mipsr4k.Shutdown(); + Memory::Shutdown(); coreState = CORE_POWERDOWN; currentMIPS = nullptr; } diff --git a/unittest/TestVertexJit.cpp b/unittest/TestVertexJit.cpp index 79012974f..40dd640c8 100644 --- a/unittest/TestVertexJit.cpp +++ b/unittest/TestVertexJit.cpp @@ -36,6 +36,10 @@ public: cache_ = new VertexDecoderJitCache(); g_Config.bVertexDecoderJit = true; + // Required for jit to be enabled. + g_Config.iCpuCore = (int)CPUCore::JIT; + gstate_c.uv.uScale = 1.0f; + gstate_c.uv.vScale = 1.0f; } ~VertexDecoderTestHarness() { delete src_; @@ -297,8 +301,7 @@ static bool TestVertex8() { for (int jit = 0; jit <= 1; ++jit) { dec.Execute(vtype, 0, jit == 1); - dec.Assert8("TestVertex8-TC", 127, 128); - dec.Skip(2); + dec.AssertFloat("TestVertex8-TC", 127.0f / 128.0f, 1.0f); dec.Assert8("TestVertex8-Nrm", 127, 0, 128); dec.Skip(1); dec.AssertFloat("TestVertex8-Pos", 127.0f / 128.0f, 0.0f, -1.0f); @@ -317,7 +320,7 @@ static bool TestVertex16() { for (int jit = 0; jit <= 1; ++jit) { dec.Execute(vtype, 0, jit == 1); - dec.Assert16("TestVertex16-TC", 32767, 32768); + dec.AssertFloat("TestVertex16-TC", 32767.0f / 32768.0f, 1.0f); dec.Assert16("TestVertex16-Nrm", 32767, 0, 32768); dec.Skip(2); dec.AssertFloat("TestVertex16-Pos", 32767.0f / 32768.0f, 0.0f, -1.0f); @@ -354,8 +357,8 @@ static bool TestVertex8Through() { for (int jit = 0; jit <= 1; ++jit) { dec.Execute(vtype, 0, jit == 1); - dec.Assert8("TestVertex8Through-TC", 127, 128); - dec.Skip(2); + // Note: this is correct, even in through. + dec.AssertFloat("TestVertex8Through-TC", 127.0f / 128.0f, 1.0f); dec.Assert8("TestVertex8Through-Nrm", 127, 0, 128); // Ignoring Pos since s8 through isn't really an option. } @@ -373,7 +376,7 @@ static bool TestVertex16Through() { for (int jit = 0; jit <= 1; ++jit) { dec.Execute(vtype, 0, jit == 1); - dec.Assert16("TestVertex16Through-TC", 32767, 32768); + dec.AssertFloat("TestVertex16Through-TC", 32767.0f, 32768.0f); dec.Assert16("TestVertex16Through-Nrm", 32767, 0, 32768); dec.Skip(2); dec.AssertFloat("TestVertex16Through-Pos", 32767.0f, 0.0f, 32768.0f);