mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Fix various warnings reported by clang
- mostly remove unused variables - rename some generic JIT identifiers
This commit is contained in:
parent
a3508823de
commit
6914eca167
@ -134,7 +134,7 @@ namespace AudioCommon
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return SConfig::GetInstance().m_EnableJIT;
|
return SConfig::GetInstance().m_DSPEnableJIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PauseAndLock(bool doLock, bool unpauseOnUnlock)
|
void PauseAndLock(bool doLock, bool unpauseOnUnlock)
|
||||||
|
@ -22,11 +22,6 @@ const char *filter = "0123456789ABCDEFGHJKMNPQRTUVWXYZILOS";
|
|||||||
|
|
||||||
u32 genseeds[0x20];
|
u32 genseeds[0x20];
|
||||||
|
|
||||||
|
|
||||||
const u8 bitstringlen[0x08] = {
|
|
||||||
0x06, 0x0A, 0x0C, 0x11, 0x11, 0x08, 0x07, 0x20,
|
|
||||||
};
|
|
||||||
|
|
||||||
const u8 gentable0[0x38] = {
|
const u8 gentable0[0x38] = {
|
||||||
0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01,
|
0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01,
|
||||||
0x3A, 0x32, 0x2A, 0x22, 0x1A, 0x12, 0x0A, 0x02,
|
0x3A, 0x32, 0x2A, 0x22, 0x1A, 0x12, 0x0A, 0x02,
|
||||||
|
@ -109,7 +109,7 @@ bool BootCore(const std::string& _rFilename)
|
|||||||
config_cache.bDSPHLE = StartUp.bDSPHLE;
|
config_cache.bDSPHLE = StartUp.bDSPHLE;
|
||||||
config_cache.strBackend = StartUp.m_strVideoBackend;
|
config_cache.strBackend = StartUp.m_strVideoBackend;
|
||||||
config_cache.bHLE_BS2 = StartUp.bHLE_BS2;
|
config_cache.bHLE_BS2 = StartUp.bHLE_BS2;
|
||||||
config_cache.m_EnableJIT = SConfig::GetInstance().m_EnableJIT;
|
config_cache.m_EnableJIT = SConfig::GetInstance().m_DSPEnableJIT;
|
||||||
config_cache.bDSPThread = StartUp.bDSPThread;
|
config_cache.bDSPThread = StartUp.bDSPThread;
|
||||||
config_cache.Volume = SConfig::GetInstance().m_Volume;
|
config_cache.Volume = SConfig::GetInstance().m_Volume;
|
||||||
config_cache.sBackend = SConfig::GetInstance().sBackend;
|
config_cache.sBackend = SConfig::GetInstance().sBackend;
|
||||||
@ -158,7 +158,7 @@ bool BootCore(const std::string& _rFilename)
|
|||||||
}
|
}
|
||||||
if (game_ini.Get("DSP", "Volume", &SConfig::GetInstance().m_Volume, SConfig::GetInstance().m_Volume))
|
if (game_ini.Get("DSP", "Volume", &SConfig::GetInstance().m_Volume, SConfig::GetInstance().m_Volume))
|
||||||
config_cache.bSetVolume = true;
|
config_cache.bSetVolume = true;
|
||||||
game_ini.Get("DSP", "EnableJIT", &SConfig::GetInstance().m_EnableJIT, SConfig::GetInstance().m_EnableJIT);
|
game_ini.Get("DSP", "EnableJIT", &SConfig::GetInstance().m_DSPEnableJIT, SConfig::GetInstance().m_DSPEnableJIT);
|
||||||
game_ini.Get("DSP", "Backend", &SConfig::GetInstance().sBackend, SConfig::GetInstance().sBackend);
|
game_ini.Get("DSP", "Backend", &SConfig::GetInstance().sBackend, SConfig::GetInstance().sBackend);
|
||||||
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
|
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ bool BootCore(const std::string& _rFilename)
|
|||||||
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
|
StartUp.bDSPHLE = g_NetPlaySettings.m_DSPHLE;
|
||||||
StartUp.bEnableMemcardSaving = g_NetPlaySettings.m_WriteToMemcard;
|
StartUp.bEnableMemcardSaving = g_NetPlaySettings.m_WriteToMemcard;
|
||||||
StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore;
|
StartUp.iCPUCore = g_NetPlaySettings.m_CPUcore;
|
||||||
SConfig::GetInstance().m_EnableJIT = g_NetPlaySettings.m_DSPEnableJIT;
|
SConfig::GetInstance().m_DSPEnableJIT = g_NetPlaySettings.m_DSPEnableJIT;
|
||||||
SConfig::GetInstance().m_EXIDevice[0] = g_NetPlaySettings.m_EXIDevice[0];
|
SConfig::GetInstance().m_EXIDevice[0] = g_NetPlaySettings.m_EXIDevice[0];
|
||||||
SConfig::GetInstance().m_EXIDevice[1] = g_NetPlaySettings.m_EXIDevice[1];
|
SConfig::GetInstance().m_EXIDevice[1] = g_NetPlaySettings.m_EXIDevice[1];
|
||||||
config_cache.bSetEXIDevice[0] = true;
|
config_cache.bSetEXIDevice[0] = true;
|
||||||
@ -268,7 +268,7 @@ void Stop()
|
|||||||
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
|
VideoBackend::ActivateBackend(StartUp.m_strVideoBackend);
|
||||||
StartUp.bHLE_BS2 = config_cache.bHLE_BS2;
|
StartUp.bHLE_BS2 = config_cache.bHLE_BS2;
|
||||||
SConfig::GetInstance().sBackend = config_cache.sBackend;
|
SConfig::GetInstance().sBackend = config_cache.sBackend;
|
||||||
SConfig::GetInstance().m_EnableJIT = config_cache.m_EnableJIT;
|
SConfig::GetInstance().m_DSPEnableJIT = config_cache.m_EnableJIT;
|
||||||
|
|
||||||
// Only change these back if they were actually set by game ini, since they can be changed while a game is running.
|
// Only change these back if they were actually set by game ini, since they can be changed while a game is running.
|
||||||
if (config_cache.bSetFramelimit)
|
if (config_cache.bSetFramelimit)
|
||||||
|
@ -267,7 +267,7 @@ void SConfig::SaveSettings()
|
|||||||
ini.Set("Movie", "Author", m_strMovieAuthor);
|
ini.Set("Movie", "Author", m_strMovieAuthor);
|
||||||
|
|
||||||
// DSP
|
// DSP
|
||||||
ini.Set("DSP", "EnableJIT", m_EnableJIT);
|
ini.Set("DSP", "EnableJIT", m_DSPEnableJIT);
|
||||||
ini.Set("DSP", "DumpAudio", m_DumpAudio);
|
ini.Set("DSP", "DumpAudio", m_DumpAudio);
|
||||||
ini.Set("DSP", "Backend", sBackend);
|
ini.Set("DSP", "Backend", sBackend);
|
||||||
ini.Set("DSP", "Volume", m_Volume);
|
ini.Set("DSP", "Volume", m_Volume);
|
||||||
@ -430,7 +430,7 @@ void SConfig::LoadSettings()
|
|||||||
ini.Get("Movie", "Author", &m_strMovieAuthor, "");
|
ini.Get("Movie", "Author", &m_strMovieAuthor, "");
|
||||||
|
|
||||||
// DSP
|
// DSP
|
||||||
ini.Get("DSP", "EnableJIT", &m_EnableJIT, true);
|
ini.Get("DSP", "EnableJIT", &m_DSPEnableJIT, true);
|
||||||
ini.Get("DSP", "DumpAudio", &m_DumpAudio, false);
|
ini.Get("DSP", "DumpAudio", &m_DumpAudio, false);
|
||||||
#if defined __linux__ && HAVE_ALSA
|
#if defined __linux__ && HAVE_ALSA
|
||||||
ini.Get("DSP", "Backend", &sBackend, BACKEND_ALSA);
|
ini.Get("DSP", "Backend", &sBackend, BACKEND_ALSA);
|
||||||
|
@ -79,7 +79,7 @@ struct SConfig : NonCopyable
|
|||||||
unsigned int m_FrameSkip;
|
unsigned int m_FrameSkip;
|
||||||
|
|
||||||
// DSP settings
|
// DSP settings
|
||||||
bool m_EnableJIT;
|
bool m_DSPEnableJIT;
|
||||||
bool m_DumpAudio;
|
bool m_DumpAudio;
|
||||||
int m_Volume;
|
int m_Volume;
|
||||||
std::string sBackend;
|
std::string sBackend;
|
||||||
|
@ -296,7 +296,7 @@ restart:
|
|||||||
{
|
{
|
||||||
PB.ReachedEnd = 0;
|
PB.ReachedEnd = 0;
|
||||||
|
|
||||||
if ((PB.RepeatMode == 0) || (!PB.StopOnSilence == 0))
|
if ((PB.RepeatMode == 0) || (PB.StopOnSilence != 0))
|
||||||
{
|
{
|
||||||
PB.KeyOff = 1;
|
PB.KeyOff = 1;
|
||||||
PB.RemLength = 0;
|
PB.RemLength = 0;
|
||||||
|
@ -10,8 +10,8 @@ namespace WiimoteEmu
|
|||||||
// Extension device IDs to be written to the last bytes of the extension reg
|
// Extension device IDs to be written to the last bytes of the extension reg
|
||||||
// The id for nothing inserted
|
// The id for nothing inserted
|
||||||
static const u8 nothing_id[] = { 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e };
|
static const u8 nothing_id[] = { 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e };
|
||||||
// The id for a partially inserted extension
|
// The id for a partially inserted extension (currently unused)
|
||||||
static const u8 partially_id[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff };
|
//static const u8 partially_id[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff };
|
||||||
|
|
||||||
Attachment::Attachment( const char* const _name, WiimoteEmu::ExtensionReg& _reg )
|
Attachment::Attachment( const char* const _name, WiimoteEmu::ExtensionReg& _reg )
|
||||||
: name( _name ), reg( _reg )
|
: name( _name ), reg( _reg )
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
static const u64 GC_ALIGNED16(psSignBits2[2]) = {0x8000000000000000ULL, 0x8000000000000000ULL};
|
static const u64 GC_ALIGNED16(psSignBits2[2]) = {0x8000000000000000ULL, 0x8000000000000000ULL};
|
||||||
static const u64 GC_ALIGNED16(psAbsMask2[2]) = {0x7FFFFFFFFFFFFFFFULL, 0x7FFFFFFFFFFFFFFFULL};
|
static const u64 GC_ALIGNED16(psAbsMask2[2]) = {0x7FFFFFFFFFFFFFFFULL, 0x7FFFFFFFFFFFFFFFULL};
|
||||||
static const double GC_ALIGNED16(psOneOne2[2]) = {1.0, 1.0};
|
|
||||||
static const double one_const = 1.0f;
|
static const double one_const = 1.0f;
|
||||||
|
|
||||||
void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (XEmitter::*op)(Gen::X64Reg, Gen::OpArg))
|
void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool single, void (XEmitter::*op)(Gen::X64Reg, Gen::OpArg))
|
||||||
|
@ -16,10 +16,8 @@ namespace {
|
|||||||
|
|
||||||
// pshufb todo: MOVQ
|
// pshufb todo: MOVQ
|
||||||
const u8 GC_ALIGNED16(bswapShuffle1x4[16]) = {3, 2, 1, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
const u8 GC_ALIGNED16(bswapShuffle1x4[16]) = {3, 2, 1, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||||
const u8 GC_ALIGNED16(bswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15};
|
|
||||||
const u8 GC_ALIGNED16(bswapShuffle1x8[16]) = {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15};
|
const u8 GC_ALIGNED16(bswapShuffle1x8[16]) = {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||||
const u8 GC_ALIGNED16(bswapShuffle1x8Dupe[16]) = {7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0};
|
const u8 GC_ALIGNED16(bswapShuffle1x8Dupe[16]) = {7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0};
|
||||||
const u8 GC_ALIGNED16(bswapShuffle2x8[16]) = {7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8};
|
|
||||||
|
|
||||||
u64 GC_ALIGNED16(temp64);
|
u64 GC_ALIGNED16(temp64);
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#include "Core/PowerPC/Jit64/JitAsm.h"
|
#include "Core/PowerPC/Jit64/JitAsm.h"
|
||||||
#include "Core/PowerPC/Jit64/JitRegCache.h"
|
#include "Core/PowerPC/Jit64/JitRegCache.h"
|
||||||
|
|
||||||
const u8 GC_ALIGNED16(pbswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15};
|
|
||||||
|
|
||||||
// The big problem is likely instructions that set the quantizers in the same block.
|
// The big problem is likely instructions that set the quantizers in the same block.
|
||||||
// We will have to break block after quantizers are written to.
|
// We will have to break block after quantizers are written to.
|
||||||
void Jit64::psq_st(UGeckoInstruction inst)
|
void Jit64::psq_st(UGeckoInstruction inst)
|
||||||
|
@ -14,10 +14,9 @@
|
|||||||
|
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
const u64 wii_sector_size = 0x8000;
|
static const u64 wii_sector_size = 0x8000;
|
||||||
const u64 wii_sector_count = 143432 * 2;
|
static const u64 wii_sector_count = 143432 * 2;
|
||||||
const u64 wii_sector_log2 = 15;
|
static const u64 wii_disc_header_size = 256;
|
||||||
const u64 wii_disc_header_size = 256;
|
|
||||||
|
|
||||||
static inline u64 align(u64 value, u64 bounds)
|
static inline u64 align(u64 value, u64 bounds)
|
||||||
{
|
{
|
||||||
|
@ -368,7 +368,7 @@ void CConfigMain::InitializeGUIValues()
|
|||||||
if (startup_params.bDSPHLE)
|
if (startup_params.bDSPHLE)
|
||||||
DSPEngine->SetSelection(0);
|
DSPEngine->SetSelection(0);
|
||||||
else
|
else
|
||||||
DSPEngine->SetSelection(SConfig::GetInstance().m_EnableJIT ? 1 : 2);
|
DSPEngine->SetSelection(SConfig::GetInstance().m_DSPEnableJIT ? 1 : 2);
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend));
|
VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend));
|
||||||
@ -957,8 +957,7 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
case ID_DSPENGINE:
|
case ID_DSPENGINE:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = DSPEngine->GetSelection() == 0;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = DSPEngine->GetSelection() == 0;
|
||||||
if (!DSPEngine->GetSelection() == 0)
|
SConfig::GetInstance().m_DSPEnableJIT = DSPEngine->GetSelection() == 1;
|
||||||
SConfig::GetInstance().m_EnableJIT = DSPEngine->GetSelection() == 1;
|
|
||||||
AudioCommon::UpdateSoundStream();
|
AudioCommon::UpdateSoundStream();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ void NetPlayDiag::GetNetSettings(NetSettings &settings)
|
|||||||
settings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread;
|
settings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread;
|
||||||
settings.m_CPUcore = instance.m_LocalCoreStartupParameter.iCPUCore;
|
settings.m_CPUcore = instance.m_LocalCoreStartupParameter.iCPUCore;
|
||||||
settings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE;
|
settings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE;
|
||||||
settings.m_DSPEnableJIT = instance.m_EnableJIT;
|
settings.m_DSPEnableJIT = instance.m_DSPEnableJIT;
|
||||||
settings.m_WriteToMemcard = m_memcard_write->GetValue();
|
settings.m_WriteToMemcard = m_memcard_write->GetValue();
|
||||||
settings.m_EXIDevice[0] = instance.m_EXIDevice[0];
|
settings.m_EXIDevice[0] = instance.m_EXIDevice[0];
|
||||||
settings.m_EXIDevice[1] = instance.m_EXIDevice[1];
|
settings.m_EXIDevice[1] = instance.m_EXIDevice[1];
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include "VideoCommon/VertexShaderManager.h"
|
#include "VideoCommon/VertexShaderManager.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
const bool renderFog = false;
|
|
||||||
namespace BPFunctions
|
namespace BPFunctions
|
||||||
{
|
{
|
||||||
// ----------------------------------------------
|
// ----------------------------------------------
|
||||||
|
@ -177,13 +177,6 @@ int TexDecoder_GetPaletteSize(int format)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u32 decodeIA8(u16 val)
|
|
||||||
{
|
|
||||||
int a = val >> 8;
|
|
||||||
int i = val & 0xFF;
|
|
||||||
return (a << 24) | (i << 16) | (i << 8) | i;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline u32 decode5A3(u16 val)
|
static inline u32 decode5A3(u16 val)
|
||||||
{
|
{
|
||||||
int r,g,b,a;
|
int r,g,b,a;
|
||||||
|
@ -28,11 +28,6 @@
|
|||||||
|
|
||||||
//BBox
|
//BBox
|
||||||
#include "VideoCommon/XFMemory.h"
|
#include "VideoCommon/XFMemory.h"
|
||||||
#ifndef _M_GENERIC
|
|
||||||
#ifndef __APPLE__
|
|
||||||
#define USE_JIT
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define COMPILED_CODE_SIZE 4096
|
#define COMPILED_CODE_SIZE 4096
|
||||||
|
|
||||||
@ -472,7 +467,6 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
|||||||
m_compiledCode = NULL;
|
m_compiledCode = NULL;
|
||||||
m_numLoadedVertices = 0;
|
m_numLoadedVertices = 0;
|
||||||
m_VertexSize = 0;
|
m_VertexSize = 0;
|
||||||
m_numPipelineStages = 0;
|
|
||||||
m_NativeFmt = 0;
|
m_NativeFmt = 0;
|
||||||
loop_counter = 0;
|
loop_counter = 0;
|
||||||
VertexLoader_Normal::Init();
|
VertexLoader_Normal::Init();
|
||||||
@ -482,11 +476,12 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
|||||||
m_VtxDesc = vtx_desc;
|
m_VtxDesc = vtx_desc;
|
||||||
SetVAT(vtx_attr.g0.Hex, vtx_attr.g1.Hex, vtx_attr.g2.Hex);
|
SetVAT(vtx_attr.g0.Hex, vtx_attr.g1.Hex, vtx_attr.g2.Hex);
|
||||||
|
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
AllocCodeSpace(COMPILED_CODE_SIZE);
|
AllocCodeSpace(COMPILED_CODE_SIZE);
|
||||||
CompileVertexTranslator();
|
CompileVertexTranslator();
|
||||||
WriteProtect();
|
WriteProtect();
|
||||||
#else
|
#else
|
||||||
|
m_numPipelineStages = 0;
|
||||||
CompileVertexTranslator();
|
CompileVertexTranslator();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -494,7 +489,7 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
|
|||||||
|
|
||||||
VertexLoader::~VertexLoader()
|
VertexLoader::~VertexLoader()
|
||||||
{
|
{
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
FreeCodeSpace();
|
FreeCodeSpace();
|
||||||
#endif
|
#endif
|
||||||
delete m_NativeFmt;
|
delete m_NativeFmt;
|
||||||
@ -505,7 +500,7 @@ void VertexLoader::CompileVertexTranslator()
|
|||||||
m_VertexSize = 0;
|
m_VertexSize = 0;
|
||||||
const TVtxAttr &vtx_attr = m_VtxAttr;
|
const TVtxAttr &vtx_attr = m_VtxAttr;
|
||||||
|
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
if (m_compiledCode)
|
if (m_compiledCode)
|
||||||
PanicAlert("Trying to recompile a vertex translator");
|
PanicAlert("Trying to recompile a vertex translator");
|
||||||
|
|
||||||
@ -531,6 +526,9 @@ void VertexLoader::CompileVertexTranslator()
|
|||||||
WriteSetVariable(32, &s_texmtxwrite, Imm32(0));
|
WriteSetVariable(32, &s_texmtxwrite, Imm32(0));
|
||||||
WriteSetVariable(32, &s_texmtxread, Imm32(0));
|
WriteSetVariable(32, &s_texmtxread, Imm32(0));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Reset pipeline
|
||||||
|
m_numPipelineStages = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
@ -544,8 +542,6 @@ void VertexLoader::CompileVertexTranslator()
|
|||||||
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const u32)((m_VtxDesc.Hex >> 31) & 3)
|
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const u32)((m_VtxDesc.Hex >> 31) & 3)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset pipeline
|
|
||||||
m_numPipelineStages = 0;
|
|
||||||
u32 components = 0;
|
u32 components = 0;
|
||||||
|
|
||||||
// Position in pc vertex format.
|
// Position in pc vertex format.
|
||||||
@ -770,7 +766,7 @@ void VertexLoader::CompileVertexTranslator()
|
|||||||
native_stride = nat_offset;
|
native_stride = nat_offset;
|
||||||
vtx_decl.stride = native_stride;
|
vtx_decl.stride = native_stride;
|
||||||
|
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
// End loop here
|
// End loop here
|
||||||
#ifdef _M_X64
|
#ifdef _M_X64
|
||||||
MOV(64, R(RAX), Imm64((u64)&loop_counter));
|
MOV(64, R(RAX), Imm64((u64)&loop_counter));
|
||||||
@ -790,7 +786,7 @@ void VertexLoader::CompileVertexTranslator()
|
|||||||
|
|
||||||
void VertexLoader::WriteCall(TPipelineFunction func)
|
void VertexLoader::WriteCall(TPipelineFunction func)
|
||||||
{
|
{
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
#ifdef _M_X64
|
#ifdef _M_X64
|
||||||
MOV(64, R(RAX), Imm64((u64)func));
|
MOV(64, R(RAX), Imm64((u64)func));
|
||||||
CALLptr(R(RAX));
|
CALLptr(R(RAX));
|
||||||
@ -805,7 +801,7 @@ void VertexLoader::WriteCall(TPipelineFunction func)
|
|||||||
#ifndef _M_GENERIC
|
#ifndef _M_GENERIC
|
||||||
void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address)
|
void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address)
|
||||||
{
|
{
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
#ifdef _M_X64
|
#ifdef _M_X64
|
||||||
MOV(64, R(RAX), Imm64((u64)address));
|
MOV(64, R(RAX), Imm64((u64)address));
|
||||||
MOV(bits, dest, MatR(RAX));
|
MOV(bits, dest, MatR(RAX));
|
||||||
@ -817,7 +813,7 @@ void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address)
|
|||||||
|
|
||||||
void VertexLoader::WriteSetVariable(int bits, void *address, OpArg value)
|
void VertexLoader::WriteSetVariable(int bits, void *address, OpArg value)
|
||||||
{
|
{
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
#ifdef _M_X64
|
#ifdef _M_X64
|
||||||
MOV(64, R(RAX), Imm64((u64)address));
|
MOV(64, R(RAX), Imm64((u64)address));
|
||||||
MOV(bits, MatR(RAX), value);
|
MOV(bits, MatR(RAX), value);
|
||||||
@ -870,7 +866,7 @@ void VertexLoader::SetupRunVertices(int vtx_attr_group, int primitive, int const
|
|||||||
|
|
||||||
void VertexLoader::ConvertVertices ( int count )
|
void VertexLoader::ConvertVertices ( int count )
|
||||||
{
|
{
|
||||||
#ifdef USE_JIT
|
#ifdef USE_VERTEX_LOADER_JIT
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
loop_counter = count;
|
loop_counter = count;
|
||||||
|
@ -17,6 +17,11 @@
|
|||||||
#include "VideoCommon/DataReader.h"
|
#include "VideoCommon/DataReader.h"
|
||||||
#include "VideoCommon/NativeVertexFormat.h"
|
#include "VideoCommon/NativeVertexFormat.h"
|
||||||
|
|
||||||
|
#ifndef _M_GENERIC
|
||||||
|
#ifndef __APPLE__
|
||||||
|
#define USE_VERTEX_LOADER_JIT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
class VertexLoaderUID
|
class VertexLoaderUID
|
||||||
{
|
{
|
||||||
@ -119,9 +124,11 @@ private:
|
|||||||
NativeVertexFormat *m_NativeFmt;
|
NativeVertexFormat *m_NativeFmt;
|
||||||
int native_stride;
|
int native_stride;
|
||||||
|
|
||||||
// Pipeline. To be JIT compiled in the future.
|
#ifndef USE_VERTEX_LOADER_JIT
|
||||||
|
// Pipeline.
|
||||||
TPipelineFunction m_PipelineStages[64]; // TODO - figure out real max. it's lower.
|
TPipelineFunction m_PipelineStages[64]; // TODO - figure out real max. it's lower.
|
||||||
int m_numPipelineStages;
|
int m_numPipelineStages;
|
||||||
|
#endif
|
||||||
|
|
||||||
const u8 *m_compiledCode;
|
const u8 *m_compiledCode;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user