gsdx sw: s/g_cpu/m_cpu/

This commit is contained in:
Gregory Hainaut
2016-11-24 23:03:25 +01:00
parent c3e38e46c7
commit 0f5529be18
4 changed files with 32 additions and 30 deletions
+17 -17
View File
@@ -26,7 +26,7 @@
#else
void GSDrawScanlineCodeGenerator::Generate()
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
Generate_AVX();
else
Generate_SSE();
@@ -124,7 +124,7 @@ GSDrawScanlineCodeGenerator::GSDrawScanlineCodeGenerator(void* param, uint64 key
void GSDrawScanlineCodeGenerator::modulate16(const Xmm& a, const Operand& f, uint8 shift)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
if(shift == 0)
{
@@ -153,7 +153,7 @@ void GSDrawScanlineCodeGenerator::modulate16(const Xmm& a, const Operand& f, uin
void GSDrawScanlineCodeGenerator::lerp16(const Xmm& a, const Xmm& b, const Xmm& f, uint8 shift)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpsubw(a, b);
modulate16(a, f, shift);
@@ -169,7 +169,7 @@ void GSDrawScanlineCodeGenerator::lerp16(const Xmm& a, const Xmm& b, const Xmm&
void GSDrawScanlineCodeGenerator::lerp16_4(const Xmm& a, const Xmm& b, const Xmm& f)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpsubw(a, b);
vpmullw(a, f);
@@ -187,13 +187,13 @@ void GSDrawScanlineCodeGenerator::lerp16_4(const Xmm& a, const Xmm& b, const Xmm
void GSDrawScanlineCodeGenerator::mix16(const Xmm& a, const Xmm& b, const Xmm& temp)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpblendw(a, b, 0xaa);
}
else
{
if(g_cpu.has(util::Cpu::tSSE41))
if(m_cpu.has(util::Cpu::tSSE41))
{
pblendw(a, b, 0xaa);
}
@@ -210,13 +210,13 @@ void GSDrawScanlineCodeGenerator::mix16(const Xmm& a, const Xmm& b, const Xmm& t
void GSDrawScanlineCodeGenerator::clamp16(const Xmm& a, const Xmm& temp)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpackuswb(a, a);
#if _M_SSE >= 0x501
// Greg: why ?
if(g_cpu.has(util::Cpu::tAVX2)) {
if(m_cpu.has(util::Cpu::tAVX2)) {
ASSERT(a.isYMM());
vpermq(Ymm(a.getIdx()), Ymm(a.getIdx()), _MM_SHUFFLE(3, 1, 2, 0)); // this sucks
}
@@ -226,7 +226,7 @@ void GSDrawScanlineCodeGenerator::clamp16(const Xmm& a, const Xmm& temp)
}
else
{
if(g_cpu.has(util::Cpu::tSSE41))
if(m_cpu.has(util::Cpu::tSSE41))
{
packuswb(a, a);
pmovzxbw(a, a);
@@ -244,7 +244,7 @@ void GSDrawScanlineCodeGenerator::alltrue(const Xmm& test)
{
uint32 mask = test.isYMM() ? 0xffffffff : 0xffff;
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpmovmskb(eax, test);
cmp(eax, mask);
@@ -260,7 +260,7 @@ void GSDrawScanlineCodeGenerator::alltrue(const Xmm& test)
void GSDrawScanlineCodeGenerator::blend(const Xmm& a, const Xmm& b, const Xmm& mask)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpand(b, mask);
vpandn(mask, a);
@@ -277,7 +277,7 @@ void GSDrawScanlineCodeGenerator::blend(const Xmm& a, const Xmm& b, const Xmm& m
void GSDrawScanlineCodeGenerator::blendr(const Xmm& b, const Xmm& a, const Xmm& mask)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpand(b, mask);
vpandn(mask, a);
@@ -293,9 +293,9 @@ void GSDrawScanlineCodeGenerator::blendr(const Xmm& b, const Xmm& a, const Xmm&
void GSDrawScanlineCodeGenerator::blend8(const Xmm& a, const Xmm& b)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
vpblendvb(a, a, b, xmm0);
else if(g_cpu.has(util::Cpu::tSSE41))
else if(m_cpu.has(util::Cpu::tSSE41))
pblendvb(a, b);
else
blend(a, b, xmm0);
@@ -303,11 +303,11 @@ void GSDrawScanlineCodeGenerator::blend8(const Xmm& a, const Xmm& b)
void GSDrawScanlineCodeGenerator::blend8r(const Xmm& b, const Xmm& a)
{
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
vpblendvb(b, a, b, xmm0);
}
else if(g_cpu.has(util::Cpu::tSSE41))
else if(m_cpu.has(util::Cpu::tSSE41))
{
pblendvb(a, b);
movdqa(b, a);
@@ -323,7 +323,7 @@ void GSDrawScanlineCodeGenerator::split16_2x8(const Xmm& l, const Xmm& h, const
// l = src & 0xFF; (1 left shift + 1 right shift)
// h = (src >> 8) & 0xFF; (1 right shift)
if(g_cpu.has(util::Cpu::tAVX))
if(m_cpu.has(util::Cpu::tAVX))
{
if (src == h) {
vpsllw(l, src, 8);