mirror of https://github.com/PCSX2/pcsx2.git
gsdx: add svn:eol-style metadata
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4319 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5860de1cce
commit
32911cb7c5
|
@ -1,311 +1,311 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
#include "GSUtil.h"
|
#include "GSUtil.h"
|
||||||
#include "GPURendererSW.h"
|
#include "GPURendererSW.h"
|
||||||
#include "GSDeviceNull.h"
|
#include "GSDeviceNull.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
#include "GPUSettingsDlg.h"
|
#include "GPUSettingsDlg.h"
|
||||||
#include "GSDevice9.h"
|
#include "GSDevice9.h"
|
||||||
#include "GSDevice11.h"
|
#include "GSDevice11.h"
|
||||||
|
|
||||||
static HRESULT s_hr = E_FAIL;
|
static HRESULT s_hr = E_FAIL;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PSE_LT_GPU 2
|
#define PSE_LT_GPU 2
|
||||||
|
|
||||||
static GPURenderer* s_gpu = NULL;
|
static GPURenderer* s_gpu = NULL;
|
||||||
|
|
||||||
EXPORT_C_(uint32) PSEgetLibType()
|
EXPORT_C_(uint32) PSEgetLibType()
|
||||||
{
|
{
|
||||||
return PSE_LT_GPU;
|
return PSE_LT_GPU;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(char*) PSEgetLibName()
|
EXPORT_C_(char*) PSEgetLibName()
|
||||||
{
|
{
|
||||||
return GSUtil::GetLibName();
|
return GSUtil::GetLibName();
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(uint32) PSEgetLibVersion()
|
EXPORT_C_(uint32) PSEgetLibVersion()
|
||||||
{
|
{
|
||||||
static const uint32 version = 1;
|
static const uint32 version = 1;
|
||||||
static const uint32 revision = 1;
|
static const uint32 revision = 1;
|
||||||
|
|
||||||
return version << 16 | revision << 8 | PLUGIN_VERSION;
|
return version << 16 | revision << 8 | PLUGIN_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUinit()
|
EXPORT_C_(int32) GPUinit()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUshutdown()
|
EXPORT_C_(int32) GPUshutdown()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUclose()
|
EXPORT_C_(int32) GPUclose()
|
||||||
{
|
{
|
||||||
delete s_gpu;
|
delete s_gpu;
|
||||||
|
|
||||||
s_gpu = NULL;
|
s_gpu = NULL;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
if(SUCCEEDED(s_hr))
|
if(SUCCEEDED(s_hr))
|
||||||
{
|
{
|
||||||
::CoUninitialize();
|
::CoUninitialize();
|
||||||
|
|
||||||
s_hr = E_FAIL;
|
s_hr = E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUopen(void* hWnd)
|
EXPORT_C_(int32) GPUopen(void* hWnd)
|
||||||
{
|
{
|
||||||
GPUclose();
|
GPUclose();
|
||||||
|
|
||||||
if(!GSUtil::CheckSSE())
|
if(!GSUtil::CheckSSE())
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
s_hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||||
|
|
||||||
if(!GSUtil::CheckDirectX())
|
if(!GSUtil::CheckDirectX())
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int renderer = theApp.GetConfig("Renderer", 1);
|
int renderer = theApp.GetConfig("Renderer", 1);
|
||||||
int threads = theApp.GetConfig("swthreads", 1);
|
int threads = theApp.GetConfig("swthreads", 1);
|
||||||
|
|
||||||
switch(renderer)
|
switch(renderer)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
case 0: s_gpu = new GPURendererSW(new GSDevice9(), threads); break;
|
case 0: s_gpu = new GPURendererSW(new GSDevice9(), threads); break;
|
||||||
case 1: s_gpu = new GPURendererSW(new GSDevice11(), threads); break;
|
case 1: s_gpu = new GPURendererSW(new GSDevice11(), threads); break;
|
||||||
#endif
|
#endif
|
||||||
case 2: s_gpu = new GPURendererSW(new GSDeviceNull(), threads); break;
|
case 2: s_gpu = new GPURendererSW(new GSDeviceNull(), threads); break;
|
||||||
//case 3: s_gpu = new GPURendererNull(new GSDeviceNull()); break;
|
//case 3: s_gpu = new GPURendererNull(new GSDeviceNull()); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!s_gpu->Create(hWnd))
|
if(!s_gpu->Create(hWnd))
|
||||||
{
|
{
|
||||||
GPUclose();
|
GPUclose();
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUconfigure()
|
EXPORT_C_(int32) GPUconfigure()
|
||||||
{
|
{
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
GPUSettingsDlg dlg;
|
GPUSettingsDlg dlg;
|
||||||
|
|
||||||
if(IDOK == dlg.DoModal())
|
if(IDOK == dlg.DoModal())
|
||||||
{
|
{
|
||||||
GPUshutdown();
|
GPUshutdown();
|
||||||
GPUinit();
|
GPUinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// TODO: linux
|
// TODO: linux
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUtest()
|
EXPORT_C_(int32) GPUtest()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUabout()
|
EXPORT_C GPUabout()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUwriteDataMem(const uint8* mem, uint32 size)
|
EXPORT_C GPUwriteDataMem(const uint8* mem, uint32 size)
|
||||||
{
|
{
|
||||||
s_gpu->WriteData(mem, size);
|
s_gpu->WriteData(mem, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUwriteData(uint32 data)
|
EXPORT_C GPUwriteData(uint32 data)
|
||||||
{
|
{
|
||||||
s_gpu->WriteData((uint8*)&data, 1);
|
s_gpu->WriteData((uint8*)&data, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUreadDataMem(uint8* mem, uint32 size)
|
EXPORT_C GPUreadDataMem(uint8* mem, uint32 size)
|
||||||
{
|
{
|
||||||
s_gpu->ReadData(mem, size);
|
s_gpu->ReadData(mem, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(uint32) GPUreadData()
|
EXPORT_C_(uint32) GPUreadData()
|
||||||
{
|
{
|
||||||
uint32 data = 0;
|
uint32 data = 0;
|
||||||
|
|
||||||
s_gpu->ReadData((uint8*)&data, 1);
|
s_gpu->ReadData((uint8*)&data, 1);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUwriteStatus(uint32 status)
|
EXPORT_C GPUwriteStatus(uint32 status)
|
||||||
{
|
{
|
||||||
s_gpu->WriteStatus(status);
|
s_gpu->WriteStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(uint32) GPUreadStatus()
|
EXPORT_C_(uint32) GPUreadStatus()
|
||||||
{
|
{
|
||||||
return s_gpu->ReadStatus();
|
return s_gpu->ReadStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(uint32) GPUdmaChain(const uint8* mem, uint32 addr)
|
EXPORT_C_(uint32) GPUdmaChain(const uint8* mem, uint32 addr)
|
||||||
{
|
{
|
||||||
uint32 last[3];
|
uint32 last[3];
|
||||||
|
|
||||||
memset(last, 0xff, sizeof(last));
|
memset(last, 0xff, sizeof(last));
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if(addr == last[1] || addr == last[2])
|
if(addr == last[1] || addr == last[2])
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
(addr < last[0] ? last[1] : last[2]) = addr;
|
(addr < last[0] ? last[1] : last[2]) = addr;
|
||||||
|
|
||||||
last[0] = addr;
|
last[0] = addr;
|
||||||
|
|
||||||
uint8 size = mem[addr + 3];
|
uint8 size = mem[addr + 3];
|
||||||
|
|
||||||
if(size > 0)
|
if(size > 0)
|
||||||
{
|
{
|
||||||
s_gpu->WriteData(&mem[addr + 4], size);
|
s_gpu->WriteData(&mem[addr + 4], size);
|
||||||
}
|
}
|
||||||
|
|
||||||
addr = *(uint32*)&mem[addr] & 0xffffff;
|
addr = *(uint32*)&mem[addr] & 0xffffff;
|
||||||
}
|
}
|
||||||
while(addr != 0xffffff);
|
while(addr != 0xffffff);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(uint32) GPUgetMode()
|
EXPORT_C_(uint32) GPUgetMode()
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUsetMode(uint32 mode)
|
EXPORT_C GPUsetMode(uint32 mode)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUupdateLace()
|
EXPORT_C GPUupdateLace()
|
||||||
{
|
{
|
||||||
s_gpu->VSync();
|
s_gpu->VSync();
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUmakeSnapshot()
|
EXPORT_C GPUmakeSnapshot()
|
||||||
{
|
{
|
||||||
s_gpu->MakeSnapshot("c:/"); // TODO
|
s_gpu->MakeSnapshot("c:/"); // TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUdisplayText(char* text)
|
EXPORT_C GPUdisplayText(char* text)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUdisplayFlags(uint32 flags)
|
EXPORT_C GPUdisplayFlags(uint32 flags)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(int32) GPUfreeze(uint32 type, GPUFreezeData* data)
|
EXPORT_C_(int32) GPUfreeze(uint32 type, GPUFreezeData* data)
|
||||||
{
|
{
|
||||||
if(!data || data->version != 1)
|
if(!data || data->version != 1)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type == 0)
|
if(type == 0)
|
||||||
{
|
{
|
||||||
s_gpu->Defrost(data);
|
s_gpu->Defrost(data);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(type == 1)
|
else if(type == 1)
|
||||||
{
|
{
|
||||||
s_gpu->Freeze(data);
|
s_gpu->Freeze(data);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(type == 2)
|
else if(type == 2)
|
||||||
{
|
{
|
||||||
int slot = *(int*)data + 1;
|
int slot = *(int*)data + 1;
|
||||||
|
|
||||||
if(slot < 1 || slot > 9)
|
if(slot < 1 || slot > 9)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUgetScreenPic(uint8* mem)
|
EXPORT_C GPUgetScreenPic(uint8* mem)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUshowScreenPic(uint8* mem)
|
EXPORT_C GPUshowScreenPic(uint8* mem)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C GPUcursor(int player, int x, int y)
|
EXPORT_C GPUcursor(int player, int x, int y)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,276 +1,276 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
GPU_POLYGON = 1,
|
GPU_POLYGON = 1,
|
||||||
GPU_LINE = 2,
|
GPU_LINE = 2,
|
||||||
GPU_SPRITE = 3,
|
GPU_SPRITE = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
REG32_(GPUReg, STATUS)
|
REG32_(GPUReg, STATUS)
|
||||||
uint32 TX:4;
|
uint32 TX:4;
|
||||||
uint32 TY:1;
|
uint32 TY:1;
|
||||||
uint32 ABR:2;
|
uint32 ABR:2;
|
||||||
uint32 TP:2;
|
uint32 TP:2;
|
||||||
uint32 DTD:1;
|
uint32 DTD:1;
|
||||||
uint32 DFE:1;
|
uint32 DFE:1;
|
||||||
uint32 MD:1;
|
uint32 MD:1;
|
||||||
uint32 ME:1;
|
uint32 ME:1;
|
||||||
uint32 _PAD0:3;
|
uint32 _PAD0:3;
|
||||||
uint32 WIDTH1:1;
|
uint32 WIDTH1:1;
|
||||||
uint32 WIDTH0:2;
|
uint32 WIDTH0:2;
|
||||||
uint32 HEIGHT:1;
|
uint32 HEIGHT:1;
|
||||||
uint32 ISPAL:1;
|
uint32 ISPAL:1;
|
||||||
uint32 ISRGB24:1;
|
uint32 ISRGB24:1;
|
||||||
uint32 ISINTER:1;
|
uint32 ISINTER:1;
|
||||||
uint32 DEN:1;
|
uint32 DEN:1;
|
||||||
uint32 _PAD1:2;
|
uint32 _PAD1:2;
|
||||||
uint32 IDLE:1;
|
uint32 IDLE:1;
|
||||||
uint32 IMG:1;
|
uint32 IMG:1;
|
||||||
uint32 COM:1;
|
uint32 COM:1;
|
||||||
uint32 DMA:2;
|
uint32 DMA:2;
|
||||||
uint32 LCF:1;
|
uint32 LCF:1;
|
||||||
/*
|
/*
|
||||||
uint32 TX:4;
|
uint32 TX:4;
|
||||||
uint32 TY:1;
|
uint32 TY:1;
|
||||||
uint32 ABR:2;
|
uint32 ABR:2;
|
||||||
uint32 TP:2;
|
uint32 TP:2;
|
||||||
uint32 DTD:1;
|
uint32 DTD:1;
|
||||||
uint32 DFE:1;
|
uint32 DFE:1;
|
||||||
uint32 PBW:1;
|
uint32 PBW:1;
|
||||||
uint32 PBC:1;
|
uint32 PBC:1;
|
||||||
uint32 _PAD0:3;
|
uint32 _PAD0:3;
|
||||||
uint32 HRES2:1;
|
uint32 HRES2:1;
|
||||||
uint32 HRES1:2;
|
uint32 HRES1:2;
|
||||||
uint32 VRES:1;
|
uint32 VRES:1;
|
||||||
uint32 ISPAL:1;
|
uint32 ISPAL:1;
|
||||||
uint32 ISRGB24:1;
|
uint32 ISRGB24:1;
|
||||||
uint32 ISINTER:1;
|
uint32 ISINTER:1;
|
||||||
uint32 ISSTOP:1;
|
uint32 ISSTOP:1;
|
||||||
uint32 _PAD1:1;
|
uint32 _PAD1:1;
|
||||||
uint32 DMARDY:1;
|
uint32 DMARDY:1;
|
||||||
uint32 IDIDLE:1;
|
uint32 IDIDLE:1;
|
||||||
uint32 DATARDY:1;
|
uint32 DATARDY:1;
|
||||||
uint32 ISEMPTY:1;
|
uint32 ISEMPTY:1;
|
||||||
uint32 TMODE:2;
|
uint32 TMODE:2;
|
||||||
uint32 ODE:1;
|
uint32 ODE:1;
|
||||||
*/
|
*/
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, PACKET)
|
REG32_(GPUReg, PACKET)
|
||||||
uint32 _PAD:24;
|
uint32 _PAD:24;
|
||||||
uint32 OPTION:5;
|
uint32 OPTION:5;
|
||||||
uint32 TYPE:3;
|
uint32 TYPE:3;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, PRIM)
|
REG32_(GPUReg, PRIM)
|
||||||
uint32 VTX:24;
|
uint32 VTX:24;
|
||||||
uint32 TGE:1;
|
uint32 TGE:1;
|
||||||
uint32 ABE:1;
|
uint32 ABE:1;
|
||||||
uint32 TME:1;
|
uint32 TME:1;
|
||||||
uint32 _PAD2:1;
|
uint32 _PAD2:1;
|
||||||
uint32 IIP:1;
|
uint32 IIP:1;
|
||||||
uint32 TYPE:3;
|
uint32 TYPE:3;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, POLYGON)
|
REG32_(GPUReg, POLYGON)
|
||||||
uint32 _PAD:24;
|
uint32 _PAD:24;
|
||||||
uint32 TGE:1;
|
uint32 TGE:1;
|
||||||
uint32 ABE:1;
|
uint32 ABE:1;
|
||||||
uint32 TME:1;
|
uint32 TME:1;
|
||||||
uint32 VTX:1;
|
uint32 VTX:1;
|
||||||
uint32 IIP:1;
|
uint32 IIP:1;
|
||||||
uint32 TYPE:3;
|
uint32 TYPE:3;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, LINE)
|
REG32_(GPUReg, LINE)
|
||||||
uint32 _PAD:24;
|
uint32 _PAD:24;
|
||||||
uint32 ZERO1:1;
|
uint32 ZERO1:1;
|
||||||
uint32 ABE:1;
|
uint32 ABE:1;
|
||||||
uint32 ZERO2:1;
|
uint32 ZERO2:1;
|
||||||
uint32 PLL:1;
|
uint32 PLL:1;
|
||||||
uint32 IIP:1;
|
uint32 IIP:1;
|
||||||
uint32 TYPE:3;
|
uint32 TYPE:3;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, SPRITE)
|
REG32_(GPUReg, SPRITE)
|
||||||
uint32 _PAD:24;
|
uint32 _PAD:24;
|
||||||
uint32 ZERO:1;
|
uint32 ZERO:1;
|
||||||
uint32 ABE:1;
|
uint32 ABE:1;
|
||||||
uint32 TME:1;
|
uint32 TME:1;
|
||||||
uint32 SIZE:2;
|
uint32 SIZE:2;
|
||||||
uint32 TYPE:3;
|
uint32 TYPE:3;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, RESET)
|
REG32_(GPUReg, RESET)
|
||||||
uint32 _PAD:32;
|
uint32 _PAD:32;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DEN)
|
REG32_(GPUReg, DEN)
|
||||||
uint32 DEN:1;
|
uint32 DEN:1;
|
||||||
uint32 _PAD:31;
|
uint32 _PAD:31;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DMA)
|
REG32_(GPUReg, DMA)
|
||||||
uint32 DMA:2;
|
uint32 DMA:2;
|
||||||
uint32 _PAD:30;
|
uint32 _PAD:30;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DAREA)
|
REG32_(GPUReg, DAREA)
|
||||||
uint32 X:10;
|
uint32 X:10;
|
||||||
uint32 Y:9;
|
uint32 Y:9;
|
||||||
uint32 _PAD:13;
|
uint32 _PAD:13;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DHRANGE)
|
REG32_(GPUReg, DHRANGE)
|
||||||
uint32 X1:12;
|
uint32 X1:12;
|
||||||
uint32 X2:12;
|
uint32 X2:12;
|
||||||
uint32 _PAD:8;
|
uint32 _PAD:8;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DVRANGE)
|
REG32_(GPUReg, DVRANGE)
|
||||||
uint32 Y1:10;
|
uint32 Y1:10;
|
||||||
uint32 Y2:11;
|
uint32 Y2:11;
|
||||||
uint32 _PAD:11;
|
uint32 _PAD:11;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DMODE)
|
REG32_(GPUReg, DMODE)
|
||||||
uint32 WIDTH0:2;
|
uint32 WIDTH0:2;
|
||||||
uint32 HEIGHT:1;
|
uint32 HEIGHT:1;
|
||||||
uint32 ISPAL:1;
|
uint32 ISPAL:1;
|
||||||
uint32 ISRGB24:1;
|
uint32 ISRGB24:1;
|
||||||
uint32 ISINTER:1;
|
uint32 ISINTER:1;
|
||||||
uint32 WIDTH1:1;
|
uint32 WIDTH1:1;
|
||||||
uint32 REVERSE:1;
|
uint32 REVERSE:1;
|
||||||
uint32 _PAD:24;
|
uint32 _PAD:24;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, GPUINFO)
|
REG32_(GPUReg, GPUINFO)
|
||||||
uint32 PARAM:24;
|
uint32 PARAM:24;
|
||||||
uint32 _PAD:8;
|
uint32 _PAD:8;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, MODE)
|
REG32_(GPUReg, MODE)
|
||||||
uint32 TX:4;
|
uint32 TX:4;
|
||||||
uint32 TY:1;
|
uint32 TY:1;
|
||||||
uint32 ABR:2;
|
uint32 ABR:2;
|
||||||
uint32 TP:2;
|
uint32 TP:2;
|
||||||
uint32 DTD:1;
|
uint32 DTD:1;
|
||||||
uint32 DFE:1;
|
uint32 DFE:1;
|
||||||
uint32 _PAD:21;
|
uint32 _PAD:21;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, MASK)
|
REG32_(GPUReg, MASK)
|
||||||
uint32 MD:1;
|
uint32 MD:1;
|
||||||
uint32 ME:1;
|
uint32 ME:1;
|
||||||
uint32 _PAD:30;
|
uint32 _PAD:30;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DRAREA)
|
REG32_(GPUReg, DRAREA)
|
||||||
uint32 X:10;
|
uint32 X:10;
|
||||||
uint32 Y:10;
|
uint32 Y:10;
|
||||||
uint32 _PAD:12;
|
uint32 _PAD:12;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, DROFF)
|
REG32_(GPUReg, DROFF)
|
||||||
int32 X:11;
|
int32 X:11;
|
||||||
int32 Y:11;
|
int32 Y:11;
|
||||||
int32 _PAD:10;
|
int32 _PAD:10;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, RGB)
|
REG32_(GPUReg, RGB)
|
||||||
uint32 R:8;
|
uint32 R:8;
|
||||||
uint32 G:8;
|
uint32 G:8;
|
||||||
uint32 B:8;
|
uint32 B:8;
|
||||||
uint32 _PAD:8;
|
uint32 _PAD:8;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, XY)
|
REG32_(GPUReg, XY)
|
||||||
int32 X:11;
|
int32 X:11;
|
||||||
int32 _PAD1:5;
|
int32 _PAD1:5;
|
||||||
int32 Y:11;
|
int32 Y:11;
|
||||||
int32 _PAD2:5;
|
int32 _PAD2:5;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, UV)
|
REG32_(GPUReg, UV)
|
||||||
uint32 U:8;
|
uint32 U:8;
|
||||||
uint32 V:8;
|
uint32 V:8;
|
||||||
uint32 _PAD:16;
|
uint32 _PAD:16;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, TWIN)
|
REG32_(GPUReg, TWIN)
|
||||||
uint32 TWW:5;
|
uint32 TWW:5;
|
||||||
uint32 TWH:5;
|
uint32 TWH:5;
|
||||||
uint32 TWX:5;
|
uint32 TWX:5;
|
||||||
uint32 TWY:5;
|
uint32 TWY:5;
|
||||||
uint32 _PAD:12;
|
uint32 _PAD:12;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_(GPUReg, CLUT)
|
REG32_(GPUReg, CLUT)
|
||||||
uint32 _PAD1:16;
|
uint32 _PAD1:16;
|
||||||
uint32 X:6;
|
uint32 X:6;
|
||||||
uint32 Y:9;
|
uint32 Y:9;
|
||||||
uint32 _PAD2:1;
|
uint32 _PAD2:1;
|
||||||
REG_END
|
REG_END
|
||||||
|
|
||||||
REG32_SET(GPUReg)
|
REG32_SET(GPUReg)
|
||||||
GPURegSTATUS STATUS;
|
GPURegSTATUS STATUS;
|
||||||
GPURegPACKET PACKET;
|
GPURegPACKET PACKET;
|
||||||
GPURegPRIM PRIM;
|
GPURegPRIM PRIM;
|
||||||
GPURegPOLYGON POLYGON;
|
GPURegPOLYGON POLYGON;
|
||||||
GPURegLINE LINE;
|
GPURegLINE LINE;
|
||||||
GPURegSPRITE SPRITE;
|
GPURegSPRITE SPRITE;
|
||||||
GPURegRESET RESET;
|
GPURegRESET RESET;
|
||||||
GPURegDEN DEN;
|
GPURegDEN DEN;
|
||||||
GPURegDMA DMA;
|
GPURegDMA DMA;
|
||||||
GPURegDAREA DAREA;
|
GPURegDAREA DAREA;
|
||||||
GPURegDHRANGE DHRANGE;
|
GPURegDHRANGE DHRANGE;
|
||||||
GPURegDVRANGE DVRANGE;
|
GPURegDVRANGE DVRANGE;
|
||||||
GPURegDMODE DMODE;
|
GPURegDMODE DMODE;
|
||||||
GPURegGPUINFO GPUINFO;
|
GPURegGPUINFO GPUINFO;
|
||||||
GPURegMODE MODE;
|
GPURegMODE MODE;
|
||||||
GPURegMASK MASK;
|
GPURegMASK MASK;
|
||||||
GPURegDRAREA DRAREA;
|
GPURegDRAREA DRAREA;
|
||||||
GPURegDROFF DROFF;
|
GPURegDROFF DROFF;
|
||||||
GPURegRGB RGB;
|
GPURegRGB RGB;
|
||||||
GPURegXY XY;
|
GPURegXY XY;
|
||||||
GPURegUV UV;
|
GPURegUV UV;
|
||||||
GPURegTWIN TWIN;
|
GPURegTWIN TWIN;
|
||||||
GPURegCLUT CLUT;
|
GPURegCLUT CLUT;
|
||||||
REG_SET_END
|
REG_SET_END
|
||||||
|
|
||||||
struct GPUFreezeData
|
struct GPUFreezeData
|
||||||
{
|
{
|
||||||
uint32 version; // == 1
|
uint32 version; // == 1
|
||||||
uint32 status;
|
uint32 status;
|
||||||
uint32 control[256];
|
uint32 control[256];
|
||||||
uint16 vram[1024 * 1024];
|
uint16 vram[1024 * 1024];
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -1,82 +1,82 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GPUDrawScanline.h"
|
#include "GPUDrawScanline.h"
|
||||||
|
|
||||||
GPUDrawScanline::GPUDrawScanline()
|
GPUDrawScanline::GPUDrawScanline()
|
||||||
: m_sp_map("GPUSetupPrim", &m_local)
|
: m_sp_map("GPUSetupPrim", &m_local)
|
||||||
, m_ds_map("GPUDrawScanline", &m_local)
|
, m_ds_map("GPUDrawScanline", &m_local)
|
||||||
{
|
{
|
||||||
memset(&m_local, 0, sizeof(m_local));
|
memset(&m_local, 0, sizeof(m_local));
|
||||||
|
|
||||||
m_local.gd = &m_global;
|
m_local.gd = &m_global;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUDrawScanline::~GPUDrawScanline()
|
GPUDrawScanline::~GPUDrawScanline()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUDrawScanline::BeginDraw(const void* param)
|
void GPUDrawScanline::BeginDraw(const void* param)
|
||||||
{
|
{
|
||||||
memcpy(&m_global, param, sizeof(m_global));
|
memcpy(&m_global, param, sizeof(m_global));
|
||||||
|
|
||||||
if(m_global.sel.tme && m_global.sel.twin)
|
if(m_global.sel.tme && m_global.sel.twin)
|
||||||
{
|
{
|
||||||
uint32 u, v;
|
uint32 u, v;
|
||||||
|
|
||||||
u = ~(m_global.twin.x << 3) & 0xff; // TWW
|
u = ~(m_global.twin.x << 3) & 0xff; // TWW
|
||||||
v = ~(m_global.twin.y << 3) & 0xff; // TWH
|
v = ~(m_global.twin.y << 3) & 0xff; // TWH
|
||||||
|
|
||||||
m_local.twin[0].u = GSVector4i((u << 16) | u);
|
m_local.twin[0].u = GSVector4i((u << 16) | u);
|
||||||
m_local.twin[0].v = GSVector4i((v << 16) | v);
|
m_local.twin[0].v = GSVector4i((v << 16) | v);
|
||||||
|
|
||||||
u = m_global.twin.z << 3; // TWX
|
u = m_global.twin.z << 3; // TWX
|
||||||
v = m_global.twin.w << 3; // TWY
|
v = m_global.twin.w << 3; // TWY
|
||||||
|
|
||||||
m_local.twin[1].u = GSVector4i((u << 16) | u) & ~m_local.twin[0].u;
|
m_local.twin[1].u = GSVector4i((u << 16) | u) & ~m_local.twin[0].u;
|
||||||
m_local.twin[1].v = GSVector4i((v << 16) | v) & ~m_local.twin[0].v;
|
m_local.twin[1].v = GSVector4i((v << 16) | v) & ~m_local.twin[0].v;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ds = m_ds_map[m_global.sel];
|
m_ds = m_ds_map[m_global.sel];
|
||||||
|
|
||||||
m_de = NULL;
|
m_de = NULL;
|
||||||
|
|
||||||
m_dr = NULL; // TODO
|
m_dr = NULL; // TODO
|
||||||
|
|
||||||
// doesn't need all bits => less functions generated
|
// doesn't need all bits => less functions generated
|
||||||
|
|
||||||
GPUScanlineSelector sel;
|
GPUScanlineSelector sel;
|
||||||
|
|
||||||
sel.key = 0;
|
sel.key = 0;
|
||||||
|
|
||||||
sel.iip = m_global.sel.iip;
|
sel.iip = m_global.sel.iip;
|
||||||
sel.tfx = m_global.sel.tfx;
|
sel.tfx = m_global.sel.tfx;
|
||||||
sel.twin = m_global.sel.twin;
|
sel.twin = m_global.sel.twin;
|
||||||
sel.sprite = m_global.sel.sprite;
|
sel.sprite = m_global.sel.sprite;
|
||||||
|
|
||||||
m_sp = m_sp_map[sel];
|
m_sp = m_sp_map[sel];
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUDrawScanline::EndDraw(const GSRasterizerStats& stats, uint64 frame)
|
void GPUDrawScanline::EndDraw(const GSRasterizerStats& stats, uint64 frame)
|
||||||
{
|
{
|
||||||
m_ds_map.UpdateStats(stats, frame);
|
m_ds_map.UpdateStats(stats, frame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,47 +1,47 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPUState.h"
|
#include "GPUState.h"
|
||||||
#include "GSRasterizer.h"
|
#include "GSRasterizer.h"
|
||||||
#include "GPUScanlineEnvironment.h"
|
#include "GPUScanlineEnvironment.h"
|
||||||
#include "GPUSetupPrimCodeGenerator.h"
|
#include "GPUSetupPrimCodeGenerator.h"
|
||||||
#include "GPUDrawScanlineCodeGenerator.h"
|
#include "GPUDrawScanlineCodeGenerator.h"
|
||||||
|
|
||||||
class GPUDrawScanline : public IDrawScanline
|
class GPUDrawScanline : public IDrawScanline
|
||||||
{
|
{
|
||||||
GPUScanlineGlobalData m_global;
|
GPUScanlineGlobalData m_global;
|
||||||
GPUScanlineLocalData m_local;
|
GPUScanlineLocalData m_local;
|
||||||
|
|
||||||
GSCodeGeneratorFunctionMap<GPUSetupPrimCodeGenerator, uint32, SetupPrimPtr> m_sp_map;
|
GSCodeGeneratorFunctionMap<GPUSetupPrimCodeGenerator, uint32, SetupPrimPtr> m_sp_map;
|
||||||
GSCodeGeneratorFunctionMap<GPUDrawScanlineCodeGenerator, uint32, DrawScanlinePtr> m_ds_map;
|
GSCodeGeneratorFunctionMap<GPUDrawScanlineCodeGenerator, uint32, DrawScanlinePtr> m_ds_map;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUDrawScanline();
|
GPUDrawScanline();
|
||||||
virtual ~GPUDrawScanline();
|
virtual ~GPUDrawScanline();
|
||||||
|
|
||||||
// IDrawScanline
|
// IDrawScanline
|
||||||
|
|
||||||
void BeginDraw(const void* param);
|
void BeginDraw(const void* param);
|
||||||
void EndDraw(const GSRasterizerStats& stats, uint64 frame);
|
void EndDraw(const GSRasterizerStats& stats, uint64 frame);
|
||||||
void PrintStats() {m_ds_map.PrintStats();}
|
void PrintStats() {m_ds_map.PrintStats();}
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,60 +1,60 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPUScanlineEnvironment.h"
|
#include "GPUScanlineEnvironment.h"
|
||||||
#include "GSFunctionMap.h"
|
#include "GSFunctionMap.h"
|
||||||
|
|
||||||
using namespace Xbyak;
|
using namespace Xbyak;
|
||||||
|
|
||||||
class GPUDrawScanlineCodeGenerator : public GSCodeGenerator
|
class GPUDrawScanlineCodeGenerator : public GSCodeGenerator
|
||||||
{
|
{
|
||||||
void operator = (const GPUDrawScanlineCodeGenerator&);
|
void operator = (const GPUDrawScanlineCodeGenerator&);
|
||||||
|
|
||||||
static const GSVector4i m_test[8];
|
static const GSVector4i m_test[8];
|
||||||
static const uint16 m_dither[4][16];
|
static const uint16 m_dither[4][16];
|
||||||
|
|
||||||
GPUScanlineSelector m_sel;
|
GPUScanlineSelector m_sel;
|
||||||
GPUScanlineLocalData& m_local;
|
GPUScanlineLocalData& m_local;
|
||||||
|
|
||||||
void Generate();
|
void Generate();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void Step();
|
void Step();
|
||||||
void TestMask();
|
void TestMask();
|
||||||
void SampleTexture();
|
void SampleTexture();
|
||||||
void ColorTFX();
|
void ColorTFX();
|
||||||
void AlphaBlend();
|
void AlphaBlend();
|
||||||
void Dither();
|
void Dither();
|
||||||
void WriteFrame();
|
void WriteFrame();
|
||||||
|
|
||||||
void ReadTexel(const Xmm& dst, const Xmm& addr);
|
void ReadTexel(const Xmm& dst, const Xmm& addr);
|
||||||
|
|
||||||
template<int shift> void modulate16(const Xmm& a, const Operand& f);
|
template<int shift> void modulate16(const Xmm& a, const Operand& f);
|
||||||
template<int shift> void lerp16(const Xmm& a, const Xmm& b, const Operand& f);
|
template<int shift> void lerp16(const Xmm& a, const Xmm& b, const Operand& f);
|
||||||
void alltrue();
|
void alltrue();
|
||||||
void blend8(const Xmm& a, const Xmm& b);
|
void blend8(const Xmm& a, const Xmm& b);
|
||||||
void blend(const Xmm& a, const Xmm& b, const Xmm& mask);
|
void blend(const Xmm& a, const Xmm& b, const Xmm& mask);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUDrawScanlineCodeGenerator(void* param, uint32 key, void* code, size_t maxsize);
|
GPUDrawScanlineCodeGenerator(void* param, uint32 key, void* code, size_t maxsize);
|
||||||
};
|
};
|
|
@ -1,79 +1,79 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
__aligned(class, 32) GPUDrawingEnvironment
|
__aligned(class, 32) GPUDrawingEnvironment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GPURegSTATUS STATUS;
|
GPURegSTATUS STATUS;
|
||||||
GPURegPRIM PRIM;
|
GPURegPRIM PRIM;
|
||||||
GPURegDAREA DAREA;
|
GPURegDAREA DAREA;
|
||||||
GPURegDHRANGE DHRANGE;
|
GPURegDHRANGE DHRANGE;
|
||||||
GPURegDVRANGE DVRANGE;
|
GPURegDVRANGE DVRANGE;
|
||||||
GPURegDRAREA DRAREATL;
|
GPURegDRAREA DRAREATL;
|
||||||
GPURegDRAREA DRAREABR;
|
GPURegDRAREA DRAREABR;
|
||||||
GPURegDROFF DROFF;
|
GPURegDROFF DROFF;
|
||||||
GPURegTWIN TWIN;
|
GPURegTWIN TWIN;
|
||||||
GPURegCLUT CLUT;
|
GPURegCLUT CLUT;
|
||||||
|
|
||||||
GPUDrawingEnvironment()
|
GPUDrawingEnvironment()
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
memset(this, 0, sizeof(*this));
|
||||||
|
|
||||||
STATUS.IDLE = 1;
|
STATUS.IDLE = 1;
|
||||||
STATUS.COM = 1;
|
STATUS.COM = 1;
|
||||||
STATUS.WIDTH0 = 1;
|
STATUS.WIDTH0 = 1;
|
||||||
DVRANGE.Y1 = 16;
|
DVRANGE.Y1 = 16;
|
||||||
DVRANGE.Y2 = 256;
|
DVRANGE.Y2 = 256;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSVector4i GetDisplayRect()
|
GSVector4i GetDisplayRect()
|
||||||
{
|
{
|
||||||
static int s_width[] = {256, 320, 512, 640, 368, 384, 512, 640};
|
static int s_width[] = {256, 320, 512, 640, 368, 384, 512, 640};
|
||||||
static int s_height[] = {240, 480};
|
static int s_height[] = {240, 480};
|
||||||
|
|
||||||
GSVector4i r;
|
GSVector4i r;
|
||||||
|
|
||||||
r.left = DAREA.X & ~7; // FIXME
|
r.left = DAREA.X & ~7; // FIXME
|
||||||
r.top = DAREA.Y;
|
r.top = DAREA.Y;
|
||||||
r.right = r.left + s_width[(STATUS.WIDTH1 << 2) | STATUS.WIDTH0];
|
r.right = r.left + s_width[(STATUS.WIDTH1 << 2) | STATUS.WIDTH0];
|
||||||
r.bottom = r.top + (DVRANGE.Y2 - DVRANGE.Y1) * s_height[STATUS.HEIGHT] / 240;
|
r.bottom = r.top + (DVRANGE.Y2 - DVRANGE.Y1) * s_height[STATUS.HEIGHT] / 240;
|
||||||
|
|
||||||
return r.rintersect(GSVector4i(0, 0, 1024, 512));
|
return r.rintersect(GSVector4i(0, 0, 1024, 512));
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetFPS()
|
int GetFPS()
|
||||||
{
|
{
|
||||||
return STATUS.ISPAL ? 50 : 60;
|
return STATUS.ISPAL ? 50 : 60;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GSVector.h"
|
#include "GSVector.h"
|
||||||
|
|
||||||
class GPULocalMemory
|
class GPULocalMemory
|
||||||
{
|
{
|
||||||
static const GSVector4i m_xxxa;
|
static const GSVector4i m_xxxa;
|
||||||
static const GSVector4i m_xxbx;
|
static const GSVector4i m_xxbx;
|
||||||
static const GSVector4i m_xgxx;
|
static const GSVector4i m_xgxx;
|
||||||
static const GSVector4i m_rxxx;
|
static const GSVector4i m_rxxx;
|
||||||
|
|
||||||
uint16* m_vm;
|
uint16* m_vm;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint16* buff;
|
uint16* buff;
|
||||||
int tp, cx, cy;
|
int tp, cx, cy;
|
||||||
bool dirty;
|
bool dirty;
|
||||||
} m_clut;
|
} m_clut;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint8* buff[3];
|
uint8* buff[3];
|
||||||
void* page[3][2][16];
|
void* page[3][2][16];
|
||||||
uint16 valid[3][2];
|
uint16 valid[3][2];
|
||||||
} m_texture;
|
} m_texture;
|
||||||
|
|
||||||
GSVector2i m_scale;
|
GSVector2i m_scale;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPULocalMemory();
|
GPULocalMemory();
|
||||||
virtual ~GPULocalMemory();
|
virtual ~GPULocalMemory();
|
||||||
|
|
||||||
GSVector2i GetScale() {return m_scale;}
|
GSVector2i GetScale() {return m_scale;}
|
||||||
|
|
||||||
int GetWidth() {return 1 << (10 + m_scale.x);}
|
int GetWidth() {return 1 << (10 + m_scale.x);}
|
||||||
int GetHeight() {return 1 << (9 + m_scale.y);}
|
int GetHeight() {return 1 << (9 + m_scale.y);}
|
||||||
|
|
||||||
uint16* GetPixelAddress(int x, int y) const {return &m_vm[(y << (10 + m_scale.x)) + x];}
|
uint16* GetPixelAddress(int x, int y) const {return &m_vm[(y << (10 + m_scale.x)) + x];}
|
||||||
uint16* GetPixelAddressScaled(int x, int y) const {return &m_vm[((y << m_scale.y) << (10 + m_scale.x)) + (x << m_scale.x)];}
|
uint16* GetPixelAddressScaled(int x, int y) const {return &m_vm[((y << m_scale.y) << (10 + m_scale.x)) + (x << m_scale.x)];}
|
||||||
|
|
||||||
const uint16* GetCLUT(int tp, int cx, int cy);
|
const uint16* GetCLUT(int tp, int cx, int cy);
|
||||||
const void* GetTexture(int tp, int tx, int ty);
|
const void* GetTexture(int tp, int tx, int ty);
|
||||||
|
|
||||||
void Invalidate(const GSVector4i& r);
|
void Invalidate(const GSVector4i& r);
|
||||||
|
|
||||||
void FillRect(const GSVector4i& r, uint16 c);
|
void FillRect(const GSVector4i& r, uint16 c);
|
||||||
void WriteRect(const GSVector4i& r, const uint16* RESTRICT src);
|
void WriteRect(const GSVector4i& r, const uint16* RESTRICT src);
|
||||||
void ReadRect(const GSVector4i& r, uint16* RESTRICT dst);
|
void ReadRect(const GSVector4i& r, uint16* RESTRICT dst);
|
||||||
void MoveRect(int sx, int sy, int dx, int dy, int w, int h);
|
void MoveRect(int sx, int sy, int dx, int dy, int w, int h);
|
||||||
|
|
||||||
void ReadPage4(int tx, int ty, uint8* RESTRICT dst);
|
void ReadPage4(int tx, int ty, uint8* RESTRICT dst);
|
||||||
void ReadPage8(int tx, int ty, uint8* RESTRICT dst);
|
void ReadPage8(int tx, int ty, uint8* RESTRICT dst);
|
||||||
void ReadPage16(int tx, int ty, uint16* RESTRICT dst);
|
void ReadPage16(int tx, int ty, uint16* RESTRICT dst);
|
||||||
|
|
||||||
void ReadFrame32(const GSVector4i& r, uint32* RESTRICT dst, bool rgb24);
|
void ReadFrame32(const GSVector4i& r, uint32* RESTRICT dst, bool rgb24);
|
||||||
|
|
||||||
void Expand16(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
void Expand16(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
||||||
void Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
void Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels);
|
||||||
|
|
||||||
void SaveBMP(const string& path, const GSVector4i& r, int tp, int cx, int cy);
|
void SaveBMP(const string& path, const GSVector4i& r, int tp, int cx, int cy);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,244 +1,244 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GPURenderer.h"
|
#include "GPURenderer.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
map<HWND, GPURenderer*> GPURenderer::m_wnd2gpu;
|
map<HWND, GPURenderer*> GPURenderer::m_wnd2gpu;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GPURenderer::GPURenderer(GSDevice* dev)
|
GPURenderer::GPURenderer(GSDevice* dev)
|
||||||
: m_dev(dev)
|
: m_dev(dev)
|
||||||
{
|
{
|
||||||
m_filter = theApp.GetConfig("filter", 0);
|
m_filter = theApp.GetConfig("filter", 0);
|
||||||
m_dither = theApp.GetConfig("dithering", 1);
|
m_dither = theApp.GetConfig("dithering", 1);
|
||||||
m_aspectratio = theApp.GetConfig("AspectRatio", 1);
|
m_aspectratio = theApp.GetConfig("AspectRatio", 1);
|
||||||
m_vsync = !!theApp.GetConfig("vsync", 0);
|
m_vsync = !!theApp.GetConfig("vsync", 0);
|
||||||
m_scale = m_mem.GetScale();
|
m_scale = m_mem.GetScale();
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
m_hWnd = NULL;
|
m_hWnd = NULL;
|
||||||
m_wndproc = NULL;
|
m_wndproc = NULL;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GPURenderer::~GPURenderer()
|
GPURenderer::~GPURenderer()
|
||||||
{
|
{
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
if(m_wndproc)
|
if(m_wndproc)
|
||||||
{
|
{
|
||||||
SetWindowLongPtr(m_hWnd, GWLP_WNDPROC, (LONG_PTR)m_wndproc);
|
SetWindowLongPtr(m_hWnd, GWLP_WNDPROC, (LONG_PTR)m_wndproc);
|
||||||
|
|
||||||
m_wnd2gpu.erase(m_hWnd);
|
m_wnd2gpu.erase(m_hWnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPURenderer::Create(void* hWnd)
|
bool GPURenderer::Create(void* hWnd)
|
||||||
{
|
{
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
// TODO: move subclassing inside GSWnd::Attach
|
// TODO: move subclassing inside GSWnd::Attach
|
||||||
|
|
||||||
m_hWnd = (HWND)hWnd;
|
m_hWnd = (HWND)hWnd;
|
||||||
|
|
||||||
m_wndproc = (WNDPROC)GetWindowLongPtr(m_hWnd, GWLP_WNDPROC);
|
m_wndproc = (WNDPROC)GetWindowLongPtr(m_hWnd, GWLP_WNDPROC);
|
||||||
|
|
||||||
SetWindowLongPtr(m_hWnd, GWLP_WNDPROC, (LONG_PTR)WndProc);
|
SetWindowLongPtr(m_hWnd, GWLP_WNDPROC, (LONG_PTR)WndProc);
|
||||||
|
|
||||||
if(!m_wnd.Attach(m_hWnd))
|
if(!m_wnd.Attach(m_hWnd))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_wnd2gpu[m_hWnd] = this;
|
m_wnd2gpu[m_hWnd] = this;
|
||||||
|
|
||||||
SetWindowLong(m_hWnd, GWL_STYLE, GetWindowLong(m_hWnd, GWL_STYLE) | WS_OVERLAPPEDWINDOW);
|
SetWindowLong(m_hWnd, GWL_STYLE, GetWindowLong(m_hWnd, GWL_STYLE) | WS_OVERLAPPEDWINDOW);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_wnd.Show();
|
m_wnd.Show();
|
||||||
|
|
||||||
if(!m_dev->Create(&m_wnd))
|
if(!m_dev->Create(&m_wnd))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dev->SetVSync(m_vsync);
|
m_dev->SetVSync(m_vsync);
|
||||||
|
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPURenderer::Merge()
|
bool GPURenderer::Merge()
|
||||||
{
|
{
|
||||||
GSTexture* st[2] = {GetOutput(), NULL};
|
GSTexture* st[2] = {GetOutput(), NULL};
|
||||||
|
|
||||||
if(!st[0])
|
if(!st[0])
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSVector2i s = st[0]->GetSize();
|
GSVector2i s = st[0]->GetSize();
|
||||||
|
|
||||||
GSVector4 sr[2];
|
GSVector4 sr[2];
|
||||||
GSVector4 dr[2];
|
GSVector4 dr[2];
|
||||||
|
|
||||||
sr[0] = GSVector4(0, 0, 1, 1);
|
sr[0] = GSVector4(0, 0, 1, 1);
|
||||||
dr[0] = GSVector4(0, 0, s.x, s.y);
|
dr[0] = GSVector4(0, 0, s.x, s.y);
|
||||||
|
|
||||||
m_dev->Merge(st, sr, dr, s, 1, 1, GSVector4(0, 0, 0, 1));
|
m_dev->Merge(st, sr, dr, s, 1, 1, GSVector4(0, 0, 0, 1));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURenderer::VSync()
|
void GPURenderer::VSync()
|
||||||
{
|
{
|
||||||
GSPerfMonAutoTimer pmat(m_perfmon);
|
GSPerfMonAutoTimer pmat(m_perfmon);
|
||||||
|
|
||||||
m_perfmon.Put(GSPerfMon::Frame);
|
m_perfmon.Put(GSPerfMon::Frame);
|
||||||
|
|
||||||
// m_env.STATUS.LCF = ~m_env.STATUS.LCF; // ?
|
// m_env.STATUS.LCF = ~m_env.STATUS.LCF; // ?
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
if(!IsWindow(m_hWnd)) return;
|
if(!IsWindow(m_hWnd)) return;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Flush();
|
Flush();
|
||||||
|
|
||||||
if(!m_dev->IsLost(true))
|
if(!m_dev->IsLost(true))
|
||||||
{
|
{
|
||||||
if(!Merge())
|
if(!Merge())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ResetDevice();
|
ResetDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
// osd
|
// osd
|
||||||
|
|
||||||
if((m_perfmon.GetFrame() & 0x1f) == 0)
|
if((m_perfmon.GetFrame() & 0x1f) == 0)
|
||||||
{
|
{
|
||||||
m_perfmon.Update();
|
m_perfmon.Update();
|
||||||
|
|
||||||
double fps = 1000.0f / m_perfmon.Get(GSPerfMon::Frame);
|
double fps = 1000.0f / m_perfmon.Get(GSPerfMon::Frame);
|
||||||
|
|
||||||
GSVector4i r = m_env.GetDisplayRect();
|
GSVector4i r = m_env.GetDisplayRect();
|
||||||
|
|
||||||
int w = r.width() << m_scale.x;
|
int w = r.width() << m_scale.x;
|
||||||
int h = r.height() << m_scale.y;
|
int h = r.height() << m_scale.y;
|
||||||
|
|
||||||
string s = format(
|
string s = format(
|
||||||
"%lld | %d x %d | %.2f fps (%d%%) | %d/%d | %d%% CPU | %.2f | %.2f",
|
"%lld | %d x %d | %.2f fps (%d%%) | %d/%d | %d%% CPU | %.2f | %.2f",
|
||||||
m_perfmon.GetFrame(), w, h, fps, (int)(100.0 * fps / m_env.GetFPS()),
|
m_perfmon.GetFrame(), w, h, fps, (int)(100.0 * fps / m_env.GetFPS()),
|
||||||
(int)m_perfmon.Get(GSPerfMon::Prim),
|
(int)m_perfmon.Get(GSPerfMon::Prim),
|
||||||
(int)m_perfmon.Get(GSPerfMon::Draw),
|
(int)m_perfmon.Get(GSPerfMon::Draw),
|
||||||
m_perfmon.CPU(),
|
m_perfmon.CPU(),
|
||||||
m_perfmon.Get(GSPerfMon::Swizzle) / 1024,
|
m_perfmon.Get(GSPerfMon::Swizzle) / 1024,
|
||||||
m_perfmon.Get(GSPerfMon::Unswizzle) / 1024
|
m_perfmon.Get(GSPerfMon::Unswizzle) / 1024
|
||||||
);
|
);
|
||||||
|
|
||||||
double fillrate = m_perfmon.Get(GSPerfMon::Fillrate);
|
double fillrate = m_perfmon.Get(GSPerfMon::Fillrate);
|
||||||
|
|
||||||
if(fillrate > 0)
|
if(fillrate > 0)
|
||||||
{
|
{
|
||||||
s = format("%s | %.2f mpps", s.c_str(), fps * fillrate / (1024 * 1024));
|
s = format("%s | %.2f mpps", s.c_str(), fps * fillrate / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_wnd.SetWindowText(s.c_str());
|
m_wnd.SetWindowText(s.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
GSVector4i r = m_wnd.GetClientRect();
|
GSVector4i r = m_wnd.GetClientRect();
|
||||||
|
|
||||||
m_dev->Present(r.fit(m_aspectratio), 0);
|
m_dev->Present(r.fit(m_aspectratio), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPURenderer::MakeSnapshot(const string& path)
|
bool GPURenderer::MakeSnapshot(const string& path)
|
||||||
{
|
{
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
|
|
||||||
char buff[16];
|
char buff[16];
|
||||||
|
|
||||||
if(!strftime(buff, sizeof(buff), "%Y%m%d%H%M%S", localtime(&t)))
|
if(!strftime(buff, sizeof(buff), "%Y%m%d%H%M%S", localtime(&t)))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GSTexture* t = m_dev->GetCurrent())
|
if(GSTexture* t = m_dev->GetCurrent())
|
||||||
{
|
{
|
||||||
return t->Save(format("%s_%s.bmp", path.c_str(), buff));
|
return t->Save(format("%s_%s.bmp", path.c_str(), buff));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
LRESULT CALLBACK GPURenderer::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK GPURenderer::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
map<HWND, GPURenderer*>::iterator i = m_wnd2gpu.find(hWnd);
|
map<HWND, GPURenderer*>::iterator i = m_wnd2gpu.find(hWnd);
|
||||||
|
|
||||||
if(i != m_wnd2gpu.end())
|
if(i != m_wnd2gpu.end())
|
||||||
{
|
{
|
||||||
return i->second->OnMessage(message, wParam, lParam);
|
return i->second->OnMessage(message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT GPURenderer::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT GPURenderer::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
if(message == WM_KEYUP)
|
if(message == WM_KEYUP)
|
||||||
{
|
{
|
||||||
switch(wParam)
|
switch(wParam)
|
||||||
{
|
{
|
||||||
case VK_DELETE:
|
case VK_DELETE:
|
||||||
m_filter = (m_filter + 1) % 3;
|
m_filter = (m_filter + 1) % 3;
|
||||||
return 0;
|
return 0;
|
||||||
case VK_END:
|
case VK_END:
|
||||||
m_dither = m_dither ? 0 : 1;
|
m_dither = m_dither ? 0 : 1;
|
||||||
return 0;
|
return 0;
|
||||||
case VK_NEXT:
|
case VK_NEXT:
|
||||||
m_aspectratio = (m_aspectratio + 1) % 3;
|
m_aspectratio = (m_aspectratio + 1) % 3;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return CallWindowProc(m_wndproc, m_hWnd, message, wParam, lParam);
|
return CallWindowProc(m_wndproc, m_hWnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,184 +1,184 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPUState.h"
|
#include "GPUState.h"
|
||||||
#include "GSVertexList.h"
|
#include "GSVertexList.h"
|
||||||
#include "GSDevice.h"
|
#include "GSDevice.h"
|
||||||
|
|
||||||
class GPURenderer : public GPUState
|
class GPURenderer : public GPUState
|
||||||
{
|
{
|
||||||
bool Merge();
|
bool Merge();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GSDevice* m_dev;
|
GSDevice* m_dev;
|
||||||
int m_filter;
|
int m_filter;
|
||||||
int m_dither;
|
int m_dither;
|
||||||
int m_aspectratio;
|
int m_aspectratio;
|
||||||
bool m_vsync;
|
bool m_vsync;
|
||||||
GSVector2i m_scale;
|
GSVector2i m_scale;
|
||||||
|
|
||||||
virtual void ResetDevice() {}
|
virtual void ResetDevice() {}
|
||||||
virtual GSTexture* GetOutput() = 0;
|
virtual GSTexture* GetOutput() = 0;
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
HWND m_hWnd;
|
HWND m_hWnd;
|
||||||
WNDPROC m_wndproc;
|
WNDPROC m_wndproc;
|
||||||
static map<HWND, GPURenderer*> m_wnd2gpu;
|
static map<HWND, GPURenderer*> m_wnd2gpu;
|
||||||
|
|
||||||
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GSWnd m_wnd;
|
GSWnd m_wnd;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPURenderer(GSDevice* dev);
|
GPURenderer(GSDevice* dev);
|
||||||
virtual ~GPURenderer();
|
virtual ~GPURenderer();
|
||||||
|
|
||||||
virtual bool Create(void* hWnd);
|
virtual bool Create(void* hWnd);
|
||||||
virtual void VSync();
|
virtual void VSync();
|
||||||
virtual bool MakeSnapshot(const string& path);
|
virtual bool MakeSnapshot(const string& path);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Vertex>
|
template<class Vertex>
|
||||||
class GPURendererT : public GPURenderer
|
class GPURendererT : public GPURenderer
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
Vertex* m_vertices;
|
Vertex* m_vertices;
|
||||||
int m_count;
|
int m_count;
|
||||||
int m_maxcount;
|
int m_maxcount;
|
||||||
GSVertexList<Vertex> m_vl;
|
GSVertexList<Vertex> m_vl;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
m_count = 0;
|
m_count = 0;
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
|
|
||||||
GPURenderer::Reset();
|
GPURenderer::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResetPrim()
|
void ResetPrim()
|
||||||
{
|
{
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushPrim()
|
void FlushPrim()
|
||||||
{
|
{
|
||||||
if(m_count > 0)
|
if(m_count > 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Dump("db");
|
Dump("db");
|
||||||
|
|
||||||
if(m_env.PRIM.TME)
|
if(m_env.PRIM.TME)
|
||||||
{
|
{
|
||||||
GSVector4i r;
|
GSVector4i r;
|
||||||
|
|
||||||
r.left = m_env.STATUS.TX << 6;
|
r.left = m_env.STATUS.TX << 6;
|
||||||
r.top = m_env.STATUS.TY << 8;
|
r.top = m_env.STATUS.TY << 8;
|
||||||
r.right = r.left + 256;
|
r.right = r.left + 256;
|
||||||
r.bottom = r.top + 256;
|
r.bottom = r.top + 256;
|
||||||
|
|
||||||
Dump(format("da_%d_%d_%d_%d_%d", m_env.STATUS.TP, r).c_str(), m_env.STATUS.TP, r, false);
|
Dump(format("da_%d_%d_%d_%d_%d", m_env.STATUS.TP, r).c_str(), m_env.STATUS.TP, r, false);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Draw();
|
Draw();
|
||||||
|
|
||||||
m_count = 0;
|
m_count = 0;
|
||||||
|
|
||||||
//Dump("dc", false);
|
//Dump("dc", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GrowVertexBuffer()
|
void GrowVertexBuffer()
|
||||||
{
|
{
|
||||||
if(m_vertices != NULL) _aligned_free(m_vertices);
|
if(m_vertices != NULL) _aligned_free(m_vertices);
|
||||||
|
|
||||||
m_maxcount = max(10000, m_maxcount * 3/2);
|
m_maxcount = max(10000, m_maxcount * 3/2);
|
||||||
m_vertices = (Vertex*)_aligned_malloc(sizeof(Vertex) * m_maxcount, 16);
|
m_vertices = (Vertex*)_aligned_malloc(sizeof(Vertex) * m_maxcount, 16);
|
||||||
m_maxcount -= 100;
|
m_maxcount -= 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline Vertex* DrawingKick(int& count)
|
__forceinline Vertex* DrawingKick(int& count)
|
||||||
{
|
{
|
||||||
count = (int)m_env.PRIM.VTX;
|
count = (int)m_env.PRIM.VTX;
|
||||||
|
|
||||||
if(m_vl.GetCount() < count)
|
if(m_vl.GetCount() < count)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_count >= m_maxcount)
|
if(m_count >= m_maxcount)
|
||||||
{
|
{
|
||||||
GrowVertexBuffer();
|
GrowVertexBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
Vertex* v = &m_vertices[m_count];
|
Vertex* v = &m_vertices[m_count];
|
||||||
|
|
||||||
switch(m_env.PRIM.TYPE)
|
switch(m_env.PRIM.TYPE)
|
||||||
{
|
{
|
||||||
case GPU_POLYGON:
|
case GPU_POLYGON:
|
||||||
m_vl.GetAt(0, v[0]);
|
m_vl.GetAt(0, v[0]);
|
||||||
m_vl.GetAt(1, v[1]);
|
m_vl.GetAt(1, v[1]);
|
||||||
m_vl.GetAt(2, v[2]);
|
m_vl.GetAt(2, v[2]);
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
break;
|
break;
|
||||||
case GPU_LINE:
|
case GPU_LINE:
|
||||||
m_vl.GetAt(0, v[0]);
|
m_vl.GetAt(0, v[0]);
|
||||||
m_vl.GetAt(1, v[1]);
|
m_vl.GetAt(1, v[1]);
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
break;
|
break;
|
||||||
case GPU_SPRITE:
|
case GPU_SPRITE:
|
||||||
m_vl.GetAt(0, v[0]);
|
m_vl.GetAt(0, v[0]);
|
||||||
m_vl.GetAt(1, v[1]);
|
m_vl.GetAt(1, v[1]);
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
m_vl.RemoveAll();
|
m_vl.RemoveAll();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void VertexKick() = 0;
|
virtual void VertexKick() = 0;
|
||||||
|
|
||||||
virtual void Draw() = 0;
|
virtual void Draw() = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPURendererT(GSDevice* dev)
|
GPURendererT(GSDevice* dev)
|
||||||
: GPURenderer(dev)
|
: GPURenderer(dev)
|
||||||
, m_count(0)
|
, m_count(0)
|
||||||
, m_maxcount(0)
|
, m_maxcount(0)
|
||||||
, m_vertices(NULL)
|
, m_vertices(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~GPURendererT()
|
virtual ~GPURendererT()
|
||||||
{
|
{
|
||||||
if(m_vertices) _aligned_free(m_vertices);
|
if(m_vertices) _aligned_free(m_vertices);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,196 +1,196 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GPURendererSW.h"
|
#include "GPURendererSW.h"
|
||||||
//#include "GSdx.h"
|
//#include "GSdx.h"
|
||||||
|
|
||||||
GPURendererSW::GPURendererSW(GSDevice* dev, int threads)
|
GPURendererSW::GPURendererSW(GSDevice* dev, int threads)
|
||||||
: GPURendererT<GSVertexSW>(dev)
|
: GPURendererT<GSVertexSW>(dev)
|
||||||
, m_texture(NULL)
|
, m_texture(NULL)
|
||||||
{
|
{
|
||||||
m_output = (uint32*)_aligned_malloc(m_mem.GetWidth() * m_mem.GetHeight() * sizeof(uint32), 16);
|
m_output = (uint32*)_aligned_malloc(m_mem.GetWidth() * m_mem.GetHeight() * sizeof(uint32), 16);
|
||||||
|
|
||||||
m_rl.Create<GPUDrawScanline>(threads);
|
m_rl.Create<GPUDrawScanline>(threads);
|
||||||
}
|
}
|
||||||
|
|
||||||
GPURendererSW::~GPURendererSW()
|
GPURendererSW::~GPURendererSW()
|
||||||
{
|
{
|
||||||
delete m_texture;
|
delete m_texture;
|
||||||
|
|
||||||
_aligned_free(m_output);
|
_aligned_free(m_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURendererSW::ResetDevice()
|
void GPURendererSW::ResetDevice()
|
||||||
{
|
{
|
||||||
delete m_texture;
|
delete m_texture;
|
||||||
|
|
||||||
m_texture = NULL;
|
m_texture = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSTexture* GPURendererSW::GetOutput()
|
GSTexture* GPURendererSW::GetOutput()
|
||||||
{
|
{
|
||||||
GSVector4i r = m_env.GetDisplayRect();
|
GSVector4i r = m_env.GetDisplayRect();
|
||||||
|
|
||||||
r.left <<= m_scale.x;
|
r.left <<= m_scale.x;
|
||||||
r.top <<= m_scale.y;
|
r.top <<= m_scale.y;
|
||||||
r.right <<= m_scale.x;
|
r.right <<= m_scale.x;
|
||||||
r.bottom <<= m_scale.y;
|
r.bottom <<= m_scale.y;
|
||||||
|
|
||||||
if(m_dev->ResizeTexture(&m_texture, r.width(), r.height()))
|
if(m_dev->ResizeTexture(&m_texture, r.width(), r.height()))
|
||||||
{
|
{
|
||||||
m_mem.ReadFrame32(r, m_output, !!m_env.STATUS.ISRGB24);
|
m_mem.ReadFrame32(r, m_output, !!m_env.STATUS.ISRGB24);
|
||||||
|
|
||||||
m_texture->Update(r.rsize(), m_output, m_mem.GetWidth() * sizeof(uint32));
|
m_texture->Update(r.rsize(), m_output, m_mem.GetWidth() * sizeof(uint32));
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_texture;
|
return m_texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURendererSW::Draw()
|
void GPURendererSW::Draw()
|
||||||
{
|
{
|
||||||
const GPUDrawingEnvironment& env = m_env;
|
const GPUDrawingEnvironment& env = m_env;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
GPUScanlineGlobalData gd;
|
GPUScanlineGlobalData gd;
|
||||||
|
|
||||||
gd.sel.key = 0;
|
gd.sel.key = 0;
|
||||||
gd.sel.iip = env.PRIM.IIP;
|
gd.sel.iip = env.PRIM.IIP;
|
||||||
gd.sel.me = env.STATUS.ME;
|
gd.sel.me = env.STATUS.ME;
|
||||||
|
|
||||||
if(env.PRIM.ABE)
|
if(env.PRIM.ABE)
|
||||||
{
|
{
|
||||||
gd.sel.abe = env.PRIM.ABE;
|
gd.sel.abe = env.PRIM.ABE;
|
||||||
gd.sel.abr = env.STATUS.ABR;
|
gd.sel.abr = env.STATUS.ABR;
|
||||||
}
|
}
|
||||||
|
|
||||||
gd.sel.tge = env.PRIM.TGE;
|
gd.sel.tge = env.PRIM.TGE;
|
||||||
|
|
||||||
if(env.PRIM.TME)
|
if(env.PRIM.TME)
|
||||||
{
|
{
|
||||||
gd.sel.tme = env.PRIM.TME;
|
gd.sel.tme = env.PRIM.TME;
|
||||||
gd.sel.tlu = env.STATUS.TP < 2;
|
gd.sel.tlu = env.STATUS.TP < 2;
|
||||||
gd.sel.twin = (env.TWIN.u32 & 0xfffff) != 0;
|
gd.sel.twin = (env.TWIN.u32 & 0xfffff) != 0;
|
||||||
gd.sel.ltf = m_filter == 1 && env.PRIM.TYPE == GPU_POLYGON || m_filter == 2 ? 1 : 0;
|
gd.sel.ltf = m_filter == 1 && env.PRIM.TYPE == GPU_POLYGON || m_filter == 2 ? 1 : 0;
|
||||||
|
|
||||||
const void* t = m_mem.GetTexture(env.STATUS.TP, env.STATUS.TX, env.STATUS.TY);
|
const void* t = m_mem.GetTexture(env.STATUS.TP, env.STATUS.TX, env.STATUS.TY);
|
||||||
|
|
||||||
if(!t) {ASSERT(0); return;}
|
if(!t) {ASSERT(0); return;}
|
||||||
|
|
||||||
gd.tex = t;
|
gd.tex = t;
|
||||||
gd.clut = m_mem.GetCLUT(env.STATUS.TP, env.CLUT.X, env.CLUT.Y);
|
gd.clut = m_mem.GetCLUT(env.STATUS.TP, env.CLUT.X, env.CLUT.Y);
|
||||||
gd.twin = GSVector4i(env.TWIN.TWW, env.TWIN.TWH, env.TWIN.TWX, env.TWIN.TWY);
|
gd.twin = GSVector4i(env.TWIN.TWW, env.TWIN.TWH, env.TWIN.TWX, env.TWIN.TWY);
|
||||||
}
|
}
|
||||||
|
|
||||||
gd.sel.dtd = m_dither ? env.STATUS.DTD : 0;
|
gd.sel.dtd = m_dither ? env.STATUS.DTD : 0;
|
||||||
gd.sel.md = env.STATUS.MD;
|
gd.sel.md = env.STATUS.MD;
|
||||||
gd.sel.sprite = env.PRIM.TYPE == GPU_SPRITE;
|
gd.sel.sprite = env.PRIM.TYPE == GPU_SPRITE;
|
||||||
gd.sel.scalex = m_mem.GetScale().x;
|
gd.sel.scalex = m_mem.GetScale().x;
|
||||||
|
|
||||||
gd.vm = m_mem.GetPixelAddress(0, 0);
|
gd.vm = m_mem.GetPixelAddress(0, 0);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
GSRasterizerData data;
|
GSRasterizerData data;
|
||||||
|
|
||||||
data.vertices = m_vertices;
|
data.vertices = m_vertices;
|
||||||
data.count = m_count;
|
data.count = m_count;
|
||||||
data.frame = m_perfmon.GetFrame();
|
data.frame = m_perfmon.GetFrame();
|
||||||
data.param = &gd;
|
data.param = &gd;
|
||||||
|
|
||||||
data.scissor.left = (int)m_env.DRAREATL.X << m_scale.x;
|
data.scissor.left = (int)m_env.DRAREATL.X << m_scale.x;
|
||||||
data.scissor.top = (int)m_env.DRAREATL.Y << m_scale.y;
|
data.scissor.top = (int)m_env.DRAREATL.Y << m_scale.y;
|
||||||
data.scissor.right = min((int)(m_env.DRAREABR.X + 1) << m_scale.x, m_mem.GetWidth());
|
data.scissor.right = min((int)(m_env.DRAREABR.X + 1) << m_scale.x, m_mem.GetWidth());
|
||||||
data.scissor.bottom = min((int)(m_env.DRAREABR.Y + 1) << m_scale.y, m_mem.GetHeight());
|
data.scissor.bottom = min((int)(m_env.DRAREABR.Y + 1) << m_scale.y, m_mem.GetHeight());
|
||||||
|
|
||||||
switch(env.PRIM.TYPE)
|
switch(env.PRIM.TYPE)
|
||||||
{
|
{
|
||||||
case GPU_POLYGON: data.primclass = GS_TRIANGLE_CLASS; break;
|
case GPU_POLYGON: data.primclass = GS_TRIANGLE_CLASS; break;
|
||||||
case GPU_LINE: data.primclass = GS_LINE_CLASS; break;
|
case GPU_LINE: data.primclass = GS_LINE_CLASS; break;
|
||||||
case GPU_SPRITE: data.primclass = GS_SPRITE_CLASS; break;
|
case GPU_SPRITE: data.primclass = GS_SPRITE_CLASS; break;
|
||||||
default: __assume(0);
|
default: __assume(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: VertexTrace
|
// TODO: VertexTrace
|
||||||
|
|
||||||
GSVector4 tl(+1e10f);
|
GSVector4 tl(+1e10f);
|
||||||
GSVector4 br(-1e10f);
|
GSVector4 br(-1e10f);
|
||||||
|
|
||||||
for(int i = 0, j = m_count; i < j; i++)
|
for(int i = 0, j = m_count; i < j; i++)
|
||||||
{
|
{
|
||||||
GSVector4 p = m_vertices[i].p;
|
GSVector4 p = m_vertices[i].p;
|
||||||
|
|
||||||
tl = tl.min(p);
|
tl = tl.min(p);
|
||||||
br = br.max(p);
|
br = br.max(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
GSVector4i r = GSVector4i(tl.xyxy(br)).rintersect(data.scissor);
|
GSVector4i r = GSVector4i(tl.xyxy(br)).rintersect(data.scissor);
|
||||||
|
|
||||||
r.left >>= m_scale.x;
|
r.left >>= m_scale.x;
|
||||||
r.top >>= m_scale.y;
|
r.top >>= m_scale.y;
|
||||||
r.right >>= m_scale.x;
|
r.right >>= m_scale.x;
|
||||||
r.bottom >>= m_scale.y;
|
r.bottom >>= m_scale.y;
|
||||||
|
|
||||||
m_rl.Draw(&data, r.width(), r.height());
|
m_rl.Draw(&data, r.width(), r.height());
|
||||||
|
|
||||||
Invalidate(r);
|
Invalidate(r);
|
||||||
|
|
||||||
m_rl.Sync();
|
m_rl.Sync();
|
||||||
|
|
||||||
GSRasterizerStats stats;
|
GSRasterizerStats stats;
|
||||||
|
|
||||||
m_rl.GetStats(stats);
|
m_rl.GetStats(stats);
|
||||||
|
|
||||||
m_perfmon.Put(GSPerfMon::Draw, 1);
|
m_perfmon.Put(GSPerfMon::Draw, 1);
|
||||||
m_perfmon.Put(GSPerfMon::Prim, stats.prims);
|
m_perfmon.Put(GSPerfMon::Prim, stats.prims);
|
||||||
m_perfmon.Put(GSPerfMon::Fillrate, stats.pixels);
|
m_perfmon.Put(GSPerfMon::Fillrate, stats.pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURendererSW::VertexKick()
|
void GPURendererSW::VertexKick()
|
||||||
{
|
{
|
||||||
GSVertexSW& dst = m_vl.AddTail();
|
GSVertexSW& dst = m_vl.AddTail();
|
||||||
|
|
||||||
// TODO: x/y + off.x/y should wrap around at +/-1024
|
// TODO: x/y + off.x/y should wrap around at +/-1024
|
||||||
|
|
||||||
int x = (int)(m_v.XY.X + m_env.DROFF.X) << m_scale.x;
|
int x = (int)(m_v.XY.X + m_env.DROFF.X) << m_scale.x;
|
||||||
int y = (int)(m_v.XY.Y + m_env.DROFF.Y) << m_scale.y;
|
int y = (int)(m_v.XY.Y + m_env.DROFF.Y) << m_scale.y;
|
||||||
|
|
||||||
int s = m_v.UV.X;
|
int s = m_v.UV.X;
|
||||||
int t = m_v.UV.Y;
|
int t = m_v.UV.Y;
|
||||||
|
|
||||||
GSVector4 pt(x, y, s, t);
|
GSVector4 pt(x, y, s, t);
|
||||||
|
|
||||||
dst.p = pt.xyxy(GSVector4::zero());
|
dst.p = pt.xyxy(GSVector4::zero());
|
||||||
dst.t = (pt.zwzw(GSVector4::zero()) + GSVector4(0.125f)) * 256.0f;
|
dst.t = (pt.zwzw(GSVector4::zero()) + GSVector4(0.125f)) * 256.0f;
|
||||||
// dst.c = GSVector4(m_v.RGB.u32) * 128.0f;
|
// dst.c = GSVector4(m_v.RGB.u32) * 128.0f;
|
||||||
dst.c = GSVector4(GSVector4i::load((int)m_v.RGB.u32).u8to32() << 7);
|
dst.c = GSVector4(GSVector4i::load((int)m_v.RGB.u32).u8to32() << 7);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if(GSVertexSW* v = DrawingKick(count))
|
if(GSVertexSW* v = DrawingKick(count))
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
m_count += count;
|
m_count += count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPURenderer.h"
|
#include "GPURenderer.h"
|
||||||
#include "GPUDrawScanline.h"
|
#include "GPUDrawScanline.h"
|
||||||
|
|
||||||
class GPURendererSW : public GPURendererT<GSVertexSW>
|
class GPURendererSW : public GPURendererT<GSVertexSW>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
GSRasterizerList m_rl;
|
GSRasterizerList m_rl;
|
||||||
GSTexture* m_texture;
|
GSTexture* m_texture;
|
||||||
uint32* m_output;
|
uint32* m_output;
|
||||||
|
|
||||||
void ResetDevice();
|
void ResetDevice();
|
||||||
GSTexture* GetOutput();
|
GSTexture* GetOutput();
|
||||||
void VertexKick();
|
void VertexKick();
|
||||||
void Draw();
|
void Draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPURendererSW(GSDevice* dev, int threads);
|
GPURendererSW(GSDevice* dev, int threads);
|
||||||
virtual ~GPURendererSW();
|
virtual ~GPURendererSW();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,78 +1,78 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GSVector.h"
|
#include "GSVector.h"
|
||||||
#include "GPULocalMemory.h"
|
#include "GPULocalMemory.h"
|
||||||
|
|
||||||
union GPUScanlineSelector
|
union GPUScanlineSelector
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 iip:1; // 0
|
uint32 iip:1; // 0
|
||||||
uint32 me:1; // 1
|
uint32 me:1; // 1
|
||||||
uint32 abe:1; // 2
|
uint32 abe:1; // 2
|
||||||
uint32 abr:2; // 3
|
uint32 abr:2; // 3
|
||||||
uint32 tge:1; // 5
|
uint32 tge:1; // 5
|
||||||
uint32 tme:1; // 6
|
uint32 tme:1; // 6
|
||||||
uint32 twin:1; // 7
|
uint32 twin:1; // 7
|
||||||
uint32 tlu:1; // 8
|
uint32 tlu:1; // 8
|
||||||
uint32 dtd:1; // 9
|
uint32 dtd:1; // 9
|
||||||
uint32 ltf:1; // 10
|
uint32 ltf:1; // 10
|
||||||
uint32 md:1; // 11
|
uint32 md:1; // 11
|
||||||
uint32 sprite:1; // 12
|
uint32 sprite:1; // 12
|
||||||
uint32 scalex:2; // 13
|
uint32 scalex:2; // 13
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 _pad1:1; // 0
|
uint32 _pad1:1; // 0
|
||||||
uint32 rfb:2; // 1
|
uint32 rfb:2; // 1
|
||||||
uint32 _pad2:2; // 3
|
uint32 _pad2:2; // 3
|
||||||
uint32 tfx:2; // 5
|
uint32 tfx:2; // 5
|
||||||
};
|
};
|
||||||
|
|
||||||
uint32 key;
|
uint32 key;
|
||||||
|
|
||||||
operator uint32() const {return key;}
|
operator uint32() const {return key;}
|
||||||
};
|
};
|
||||||
|
|
||||||
__aligned(struct, 32) GPUScanlineGlobalData
|
__aligned(struct, 32) GPUScanlineGlobalData
|
||||||
{
|
{
|
||||||
GPUScanlineSelector sel;
|
GPUScanlineSelector sel;
|
||||||
|
|
||||||
void* vm;
|
void* vm;
|
||||||
const void* tex;
|
const void* tex;
|
||||||
const uint16* clut;
|
const uint16* clut;
|
||||||
GSVector4i twin; // TWW, TWH, TWX, TWY
|
GSVector4i twin; // TWW, TWH, TWX, TWY
|
||||||
};
|
};
|
||||||
|
|
||||||
__aligned(struct, 32) GPUScanlineLocalData
|
__aligned(struct, 32) GPUScanlineLocalData
|
||||||
{
|
{
|
||||||
const GPUScanlineGlobalData* gd;
|
const GPUScanlineGlobalData* gd;
|
||||||
|
|
||||||
struct {GSVector4i u, v;} twin[3];
|
struct {GSVector4i u, v;} twin[3];
|
||||||
struct {GSVector4i s, t, r, g, b, _pad[3];} d;
|
struct {GSVector4i s, t, r, g, b, _pad[3];} d;
|
||||||
struct {GSVector4i st, c;} d8;
|
struct {GSVector4i st, c;} d8;
|
||||||
|
|
||||||
struct {GSVector4i s, t, r, b, g, uf, vf, dither, fd, test;} temp;
|
struct {GSVector4i s, t, r, b, g, uf, vf, dither, fd, test;} temp;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,151 +1,151 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
#include "GSUtil.h"
|
#include "GSUtil.h"
|
||||||
#include "GPUSettingsDlg.h"
|
#include "GPUSettingsDlg.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
GPUSettingsDlg::GPUSettingsDlg()
|
GPUSettingsDlg::GPUSettingsDlg()
|
||||||
: GSDialog(IDD_GPUCONFIG)
|
: GSDialog(IDD_GPUCONFIG)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUSettingsDlg::OnInit()
|
void GPUSettingsDlg::OnInit()
|
||||||
{
|
{
|
||||||
__super::OnInit();
|
__super::OnInit();
|
||||||
|
|
||||||
m_modes.clear();
|
m_modes.clear();
|
||||||
|
|
||||||
{
|
{
|
||||||
D3DDISPLAYMODE mode;
|
D3DDISPLAYMODE mode;
|
||||||
memset(&mode, 0, sizeof(mode));
|
memset(&mode, 0, sizeof(mode));
|
||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
|
|
||||||
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
ComboBoxAppend(IDC_RESOLUTION, "Please select...", (LPARAM)&m_modes.back(), true);
|
||||||
|
|
||||||
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
if(CComPtr<IDirect3D9> d3d = Direct3DCreate9(D3D_SDK_VERSION))
|
||||||
{
|
{
|
||||||
uint32 w = theApp.GetConfig("ModeWidth", 0);
|
uint32 w = theApp.GetConfig("ModeWidth", 0);
|
||||||
uint32 h = theApp.GetConfig("ModeHeight", 0);
|
uint32 h = theApp.GetConfig("ModeHeight", 0);
|
||||||
uint32 hz = theApp.GetConfig("ModeRefreshRate", 0);
|
uint32 hz = theApp.GetConfig("ModeRefreshRate", 0);
|
||||||
|
|
||||||
uint32 n = d3d->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8);
|
uint32 n = d3d->GetAdapterModeCount(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8);
|
||||||
|
|
||||||
for(uint32 i = 0; i < n; i++)
|
for(uint32 i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
if(S_OK == d3d->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8, i, &mode))
|
if(S_OK == d3d->EnumAdapterModes(D3DADAPTER_DEFAULT, D3DFMT_X8R8G8B8, i, &mode))
|
||||||
{
|
{
|
||||||
m_modes.push_back(mode);
|
m_modes.push_back(mode);
|
||||||
|
|
||||||
string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate);
|
string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate);
|
||||||
|
|
||||||
ComboBoxAppend(IDC_RESOLUTION, str.c_str(), (LPARAM)&m_modes.back(), w == mode.Width && h == mode.Height && hz == mode.RefreshRate);
|
ComboBoxAppend(IDC_RESOLUTION, str.c_str(), (LPARAM)&m_modes.back(), w == mode.Width && h == mode.Height && hz == mode.RefreshRate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBoxInit(IDC_RENDERER, theApp.m_gpu_renderers, theApp.GetConfig("Renderer", 0));
|
ComboBoxInit(IDC_RENDERER, theApp.m_gpu_renderers, theApp.GetConfig("Renderer", 0));
|
||||||
ComboBoxInit(IDC_FILTER, theApp.m_gpu_filter, theApp.GetConfig("filter", 0));
|
ComboBoxInit(IDC_FILTER, theApp.m_gpu_filter, theApp.GetConfig("filter", 0));
|
||||||
ComboBoxInit(IDC_DITHERING, theApp.m_gpu_dithering, theApp.GetConfig("dithering", 1));
|
ComboBoxInit(IDC_DITHERING, theApp.m_gpu_dithering, theApp.GetConfig("dithering", 1));
|
||||||
ComboBoxInit(IDC_ASPECTRATIO, theApp.m_gpu_aspectratio, theApp.GetConfig("AspectRatio", 1));
|
ComboBoxInit(IDC_ASPECTRATIO, theApp.m_gpu_aspectratio, theApp.GetConfig("AspectRatio", 1));
|
||||||
ComboBoxInit(IDC_SCALE, theApp.m_gpu_scale, theApp.GetConfig("scale_x", 0) | (theApp.GetConfig("scale_y", 0) << 2));
|
ComboBoxInit(IDC_SCALE, theApp.m_gpu_scale, theApp.GetConfig("scale_x", 0) | (theApp.GetConfig("scale_y", 0) << 2));
|
||||||
|
|
||||||
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
|
CheckDlgButton(m_hWnd, IDC_WINDOWED, theApp.GetConfig("windowed", 1));
|
||||||
|
|
||||||
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 1));
|
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETRANGE, 0, MAKELPARAM(16, 1));
|
||||||
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("swthreads", 1), 0));
|
SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_SETPOS, 0, MAKELPARAM(theApp.GetConfig("swthreads", 1), 0));
|
||||||
|
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GPUSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
bool GPUSettingsDlg::OnCommand(HWND hWnd, UINT id, UINT code)
|
||||||
{
|
{
|
||||||
if(id == IDC_RENDERER && code == CBN_SELCHANGE)
|
if(id == IDC_RENDERER && code == CBN_SELCHANGE)
|
||||||
{
|
{
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
}
|
}
|
||||||
else if(id == IDOK)
|
else if(id == IDOK)
|
||||||
{
|
{
|
||||||
INT_PTR data;
|
INT_PTR data;
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_RESOLUTION, data))
|
if(ComboBoxGetSelData(IDC_RESOLUTION, data))
|
||||||
{
|
{
|
||||||
const D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)data;
|
const D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)data;
|
||||||
|
|
||||||
theApp.SetConfig("ModeWidth", (int)mode->Width);
|
theApp.SetConfig("ModeWidth", (int)mode->Width);
|
||||||
theApp.SetConfig("ModeHeight", (int)mode->Height);
|
theApp.SetConfig("ModeHeight", (int)mode->Height);
|
||||||
theApp.SetConfig("ModeRefreshRate", (int)mode->RefreshRate);
|
theApp.SetConfig("ModeRefreshRate", (int)mode->RefreshRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_RENDERER, data))
|
if(ComboBoxGetSelData(IDC_RENDERER, data))
|
||||||
{
|
{
|
||||||
theApp.SetConfig("Renderer", (int)data);
|
theApp.SetConfig("Renderer", (int)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_FILTER, data))
|
if(ComboBoxGetSelData(IDC_FILTER, data))
|
||||||
{
|
{
|
||||||
theApp.SetConfig("filter", (int)data);
|
theApp.SetConfig("filter", (int)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_DITHERING, data))
|
if(ComboBoxGetSelData(IDC_DITHERING, data))
|
||||||
{
|
{
|
||||||
theApp.SetConfig("dithering", (int)data);
|
theApp.SetConfig("dithering", (int)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_ASPECTRATIO, data))
|
if(ComboBoxGetSelData(IDC_ASPECTRATIO, data))
|
||||||
{
|
{
|
||||||
theApp.SetConfig("AspectRatio", (int)data);
|
theApp.SetConfig("AspectRatio", (int)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_SCALE, data))
|
if(ComboBoxGetSelData(IDC_SCALE, data))
|
||||||
{
|
{
|
||||||
theApp.SetConfig("scale_x", data & 3);
|
theApp.SetConfig("scale_x", data & 3);
|
||||||
theApp.SetConfig("scale_y", (data >> 2) & 3);
|
theApp.SetConfig("scale_y", (data >> 2) & 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
theApp.SetConfig("swthreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
|
theApp.SetConfig("swthreads", (int)SendMessage(GetDlgItem(m_hWnd, IDC_SWTHREADS), UDM_GETPOS, 0, 0));
|
||||||
theApp.SetConfig("windowed", (int)IsDlgButtonChecked(m_hWnd, IDC_WINDOWED));
|
theApp.SetConfig("windowed", (int)IsDlgButtonChecked(m_hWnd, IDC_WINDOWED));
|
||||||
}
|
}
|
||||||
|
|
||||||
return __super::OnCommand(hWnd, id, code);
|
return __super::OnCommand(hWnd, id, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUSettingsDlg::UpdateControls()
|
void GPUSettingsDlg::UpdateControls()
|
||||||
{
|
{
|
||||||
INT_PTR i;
|
INT_PTR i;
|
||||||
|
|
||||||
if(ComboBoxGetSelData(IDC_RENDERER, i))
|
if(ComboBoxGetSelData(IDC_RENDERER, i))
|
||||||
{
|
{
|
||||||
bool dx9 = i == 0;
|
bool dx9 = i == 0;
|
||||||
bool dx11 = i == 1;
|
bool dx11 = i == 1;
|
||||||
bool sw = i >= 0 && i <= 1;
|
bool sw = i >= 0 && i <= 1;
|
||||||
|
|
||||||
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO9), dx9 ? SW_SHOW : SW_HIDE);
|
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO9), dx9 ? SW_SHOW : SW_HIDE);
|
||||||
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
|
ShowWindow(GetDlgItem(m_hWnd, IDC_LOGO11), dx11 ? SW_SHOW : SW_HIDE);
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_SCALE), sw);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_SCALE), sw);
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_SWTHREADS_EDIT), sw);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_SWTHREADS_EDIT), sw);
|
||||||
EnableWindow(GetDlgItem(m_hWnd, IDC_SWTHREADS), sw);
|
EnableWindow(GetDlgItem(m_hWnd, IDC_SWTHREADS), sw);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,39 +1,39 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GSDialog.h"
|
#include "GSDialog.h"
|
||||||
#include "GSSetting.h"
|
#include "GSSetting.h"
|
||||||
|
|
||||||
class GPUSettingsDlg : public GSDialog
|
class GPUSettingsDlg : public GSDialog
|
||||||
{
|
{
|
||||||
list<D3DDISPLAYMODE> m_modes;
|
list<D3DDISPLAYMODE> m_modes;
|
||||||
|
|
||||||
void UpdateControls();
|
void UpdateControls();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnInit();
|
void OnInit();
|
||||||
bool OnCommand(HWND hWnd, UINT id, UINT code);
|
bool OnCommand(HWND hWnd, UINT id, UINT code);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUSettingsDlg();
|
GPUSettingsDlg();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,220 +1,220 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO: x64
|
// TODO: x64
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSVertexSW.h"
|
#include "GSVertexSW.h"
|
||||||
#include "GPUSetupPrimCodeGenerator.h"
|
#include "GPUSetupPrimCodeGenerator.h"
|
||||||
|
|
||||||
using namespace Xbyak;
|
using namespace Xbyak;
|
||||||
|
|
||||||
GPUSetupPrimCodeGenerator::GPUSetupPrimCodeGenerator(void* param, uint32 key, void* code, size_t maxsize)
|
GPUSetupPrimCodeGenerator::GPUSetupPrimCodeGenerator(void* param, uint32 key, void* code, size_t maxsize)
|
||||||
: GSCodeGenerator(code, maxsize)
|
: GSCodeGenerator(code, maxsize)
|
||||||
, m_local(*(GPUScanlineLocalData*)param)
|
, m_local(*(GPUScanlineLocalData*)param)
|
||||||
{
|
{
|
||||||
#if _M_AMD64
|
#if _M_AMD64
|
||||||
#error TODO
|
#error TODO
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_sel.key = key;
|
m_sel.key = key;
|
||||||
|
|
||||||
Generate();
|
Generate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUSetupPrimCodeGenerator::Generate()
|
void GPUSetupPrimCodeGenerator::Generate()
|
||||||
{
|
{
|
||||||
if(m_sel.tme && !m_sel.twin)
|
if(m_sel.tme && !m_sel.twin)
|
||||||
{
|
{
|
||||||
pcmpeqd(xmm0, xmm0);
|
pcmpeqd(xmm0, xmm0);
|
||||||
|
|
||||||
if(m_sel.sprite)
|
if(m_sel.sprite)
|
||||||
{
|
{
|
||||||
// t = (GSVector4i(vertices[1].t) >> 8) - GSVector4i::x00000001();
|
// t = (GSVector4i(vertices[1].t) >> 8) - GSVector4i::x00000001();
|
||||||
|
|
||||||
cvttps2dq(xmm1, ptr[ecx + sizeof(GSVertexSW) * 1 + 32]);
|
cvttps2dq(xmm1, ptr[ecx + sizeof(GSVertexSW) * 1 + 32]);
|
||||||
psrld(xmm1, 8);
|
psrld(xmm1, 8);
|
||||||
psrld(xmm0, 31);
|
psrld(xmm0, 31);
|
||||||
psubd(xmm1, xmm0);
|
psubd(xmm1, xmm0);
|
||||||
|
|
||||||
// t = t.ps32(t);
|
// t = t.ps32(t);
|
||||||
// t = t.upl16(t);
|
// t = t.upl16(t);
|
||||||
|
|
||||||
packssdw(xmm1, xmm1);
|
packssdw(xmm1, xmm1);
|
||||||
punpcklwd(xmm1, xmm1);
|
punpcklwd(xmm1, xmm1);
|
||||||
|
|
||||||
// m_local.twin[2].u = t.xxxx();
|
// m_local.twin[2].u = t.xxxx();
|
||||||
// m_local.twin[2].v = t.yyyy();
|
// m_local.twin[2].v = t.yyyy();
|
||||||
|
|
||||||
pshufd(xmm2, xmm1, _MM_SHUFFLE(0, 0, 0, 0));
|
pshufd(xmm2, xmm1, _MM_SHUFFLE(0, 0, 0, 0));
|
||||||
pshufd(xmm3, xmm1, _MM_SHUFFLE(1, 1, 1, 1));
|
pshufd(xmm3, xmm1, _MM_SHUFFLE(1, 1, 1, 1));
|
||||||
|
|
||||||
movdqa(ptr[&m_local.twin[2].u], xmm2);
|
movdqa(ptr[&m_local.twin[2].u], xmm2);
|
||||||
movdqa(ptr[&m_local.twin[2].v], xmm3);
|
movdqa(ptr[&m_local.twin[2].v], xmm3);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: not really needed
|
// TODO: not really needed
|
||||||
|
|
||||||
// m_local.twin[2].u = GSVector4i::x00ff();
|
// m_local.twin[2].u = GSVector4i::x00ff();
|
||||||
// m_local.twin[2].v = GSVector4i::x00ff();
|
// m_local.twin[2].v = GSVector4i::x00ff();
|
||||||
|
|
||||||
psrlw(xmm0, 8);
|
psrlw(xmm0, 8);
|
||||||
|
|
||||||
movdqa(ptr[&m_local.twin[2].u], xmm0);
|
movdqa(ptr[&m_local.twin[2].u], xmm0);
|
||||||
movdqa(ptr[&m_local.twin[2].v], xmm0);
|
movdqa(ptr[&m_local.twin[2].v], xmm0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_sel.tme || m_sel.iip && m_sel.tfx != 3)
|
if(m_sel.tme || m_sel.iip && m_sel.tfx != 3)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < 3; i++)
|
for(int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
movaps(Xmm(5 + i), ptr[&m_shift[i]]);
|
movaps(Xmm(5 + i), ptr[&m_shift[i]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GSVector4 dt = dscan.t;
|
// GSVector4 dt = dscan.t;
|
||||||
// GSVector4 dc = dscan.c;
|
// GSVector4 dc = dscan.c;
|
||||||
|
|
||||||
movaps(xmm4, ptr[edx]);
|
movaps(xmm4, ptr[edx]);
|
||||||
movaps(xmm3, ptr[edx + 32]);
|
movaps(xmm3, ptr[edx + 32]);
|
||||||
|
|
||||||
// GSVector4i dtc8 = GSVector4i(dt * 8.0f).ps32(GSVector4i(dc * 8.0f));
|
// GSVector4i dtc8 = GSVector4i(dt * 8.0f).ps32(GSVector4i(dc * 8.0f));
|
||||||
|
|
||||||
movaps(xmm1, xmm3);
|
movaps(xmm1, xmm3);
|
||||||
mulps(xmm1, xmm5);
|
mulps(xmm1, xmm5);
|
||||||
cvttps2dq(xmm1, xmm1);
|
cvttps2dq(xmm1, xmm1);
|
||||||
movaps(xmm2, xmm4);
|
movaps(xmm2, xmm4);
|
||||||
mulps(xmm2, xmm5);
|
mulps(xmm2, xmm5);
|
||||||
cvttps2dq(xmm2, xmm2);
|
cvttps2dq(xmm2, xmm2);
|
||||||
packssdw(xmm1, xmm2);
|
packssdw(xmm1, xmm2);
|
||||||
|
|
||||||
if(m_sel.tme)
|
if(m_sel.tme)
|
||||||
{
|
{
|
||||||
// m_local.d8.st = dtc8.upl16(dtc8);
|
// m_local.d8.st = dtc8.upl16(dtc8);
|
||||||
|
|
||||||
movdqa(xmm0, xmm1);
|
movdqa(xmm0, xmm1);
|
||||||
punpcklwd(xmm0, xmm0);
|
punpcklwd(xmm0, xmm0);
|
||||||
movdqa(ptr[&m_local.d8.st], xmm0);
|
movdqa(ptr[&m_local.d8.st], xmm0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_sel.iip && m_sel.tfx != 3)
|
if(m_sel.iip && m_sel.tfx != 3)
|
||||||
{
|
{
|
||||||
// m_local.d8.c = dtc8.uph16(dtc8);
|
// m_local.d8.c = dtc8.uph16(dtc8);
|
||||||
|
|
||||||
punpckhwd(xmm1, xmm1);
|
punpckhwd(xmm1, xmm1);
|
||||||
movdqa(ptr[&m_local.d8.c], xmm1);
|
movdqa(ptr[&m_local.d8.c], xmm1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// xmm3 = dt
|
// xmm3 = dt
|
||||||
// xmm4 = dc
|
// xmm4 = dc
|
||||||
// xmm6 = ps0123
|
// xmm6 = ps0123
|
||||||
// xmm7 = ps4567
|
// xmm7 = ps4567
|
||||||
// xmm0, xmm1, xmm2, xmm5 = free
|
// xmm0, xmm1, xmm2, xmm5 = free
|
||||||
|
|
||||||
if(m_sel.tme)
|
if(m_sel.tme)
|
||||||
{
|
{
|
||||||
// GSVector4 dtx = dt.xxxx();
|
// GSVector4 dtx = dt.xxxx();
|
||||||
// GSVector4 dty = dt.yyyy();
|
// GSVector4 dty = dt.yyyy();
|
||||||
|
|
||||||
movaps(xmm0, xmm3);
|
movaps(xmm0, xmm3);
|
||||||
shufps(xmm3, xmm3, _MM_SHUFFLE(0, 0, 0, 0));
|
shufps(xmm3, xmm3, _MM_SHUFFLE(0, 0, 0, 0));
|
||||||
shufps(xmm0, xmm0, _MM_SHUFFLE(1, 1, 1, 1));
|
shufps(xmm0, xmm0, _MM_SHUFFLE(1, 1, 1, 1));
|
||||||
|
|
||||||
// m_local.d.s = GSVector4i(dtx * ps0123).ps32(GSVector4i(dtx * ps4567));
|
// m_local.d.s = GSVector4i(dtx * ps0123).ps32(GSVector4i(dtx * ps4567));
|
||||||
|
|
||||||
movaps(xmm1, xmm3);
|
movaps(xmm1, xmm3);
|
||||||
mulps(xmm3, xmm6);
|
mulps(xmm3, xmm6);
|
||||||
mulps(xmm1, xmm7);
|
mulps(xmm1, xmm7);
|
||||||
cvttps2dq(xmm3, xmm3);
|
cvttps2dq(xmm3, xmm3);
|
||||||
cvttps2dq(xmm1, xmm1);
|
cvttps2dq(xmm1, xmm1);
|
||||||
packssdw(xmm3, xmm1);
|
packssdw(xmm3, xmm1);
|
||||||
movdqa(ptr[&m_local.d.s], xmm3);
|
movdqa(ptr[&m_local.d.s], xmm3);
|
||||||
|
|
||||||
// m_local.d.t = GSVector4i(dty * ps0123).ps32(GSVector4i(dty * ps4567));
|
// m_local.d.t = GSVector4i(dty * ps0123).ps32(GSVector4i(dty * ps4567));
|
||||||
|
|
||||||
movaps(xmm1, xmm0);
|
movaps(xmm1, xmm0);
|
||||||
mulps(xmm0, xmm6);
|
mulps(xmm0, xmm6);
|
||||||
mulps(xmm1, xmm7);
|
mulps(xmm1, xmm7);
|
||||||
cvttps2dq(xmm0, xmm0);
|
cvttps2dq(xmm0, xmm0);
|
||||||
cvttps2dq(xmm1, xmm1);
|
cvttps2dq(xmm1, xmm1);
|
||||||
packssdw(xmm0, xmm1);
|
packssdw(xmm0, xmm1);
|
||||||
movdqa(ptr[&m_local.d.t], xmm0);
|
movdqa(ptr[&m_local.d.t], xmm0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// xmm4 = dc
|
// xmm4 = dc
|
||||||
// xmm6 = ps0123
|
// xmm6 = ps0123
|
||||||
// xmm7 = ps4567
|
// xmm7 = ps4567
|
||||||
// xmm0, xmm1, zmm2, xmm3, xmm5 = free
|
// xmm0, xmm1, zmm2, xmm3, xmm5 = free
|
||||||
|
|
||||||
if(m_sel.iip && m_sel.tfx != 3)
|
if(m_sel.iip && m_sel.tfx != 3)
|
||||||
{
|
{
|
||||||
// GSVector4 dcx = dc.xxxx();
|
// GSVector4 dcx = dc.xxxx();
|
||||||
// GSVector4 dcy = dc.yyyy();
|
// GSVector4 dcy = dc.yyyy();
|
||||||
// GSVector4 dcz = dc.zzzz();
|
// GSVector4 dcz = dc.zzzz();
|
||||||
|
|
||||||
movaps(xmm0, xmm4);
|
movaps(xmm0, xmm4);
|
||||||
movaps(xmm1, xmm4);
|
movaps(xmm1, xmm4);
|
||||||
shufps(xmm4, xmm4, _MM_SHUFFLE(0, 0, 0, 0));
|
shufps(xmm4, xmm4, _MM_SHUFFLE(0, 0, 0, 0));
|
||||||
shufps(xmm0, xmm0, _MM_SHUFFLE(1, 1, 1, 1));
|
shufps(xmm0, xmm0, _MM_SHUFFLE(1, 1, 1, 1));
|
||||||
shufps(xmm1, xmm1, _MM_SHUFFLE(2, 2, 2, 2));
|
shufps(xmm1, xmm1, _MM_SHUFFLE(2, 2, 2, 2));
|
||||||
|
|
||||||
// m_local.d.r = GSVector4i(dcx * ps0123).ps32(GSVector4i(dcx * ps4567));
|
// m_local.d.r = GSVector4i(dcx * ps0123).ps32(GSVector4i(dcx * ps4567));
|
||||||
|
|
||||||
movaps(xmm2, xmm4);
|
movaps(xmm2, xmm4);
|
||||||
mulps(xmm4, xmm6);
|
mulps(xmm4, xmm6);
|
||||||
mulps(xmm2, xmm7);
|
mulps(xmm2, xmm7);
|
||||||
cvttps2dq(xmm4, xmm4);
|
cvttps2dq(xmm4, xmm4);
|
||||||
cvttps2dq(xmm2, xmm2);
|
cvttps2dq(xmm2, xmm2);
|
||||||
packssdw(xmm4, xmm2);
|
packssdw(xmm4, xmm2);
|
||||||
movdqa(ptr[&m_local.d.r], xmm4);
|
movdqa(ptr[&m_local.d.r], xmm4);
|
||||||
|
|
||||||
// m_local.d.g = GSVector4i(dcy * ps0123).ps32(GSVector4i(dcy * ps4567));
|
// m_local.d.g = GSVector4i(dcy * ps0123).ps32(GSVector4i(dcy * ps4567));
|
||||||
|
|
||||||
movaps(xmm2, xmm0);
|
movaps(xmm2, xmm0);
|
||||||
mulps(xmm0, xmm6);
|
mulps(xmm0, xmm6);
|
||||||
mulps(xmm2, xmm7);
|
mulps(xmm2, xmm7);
|
||||||
cvttps2dq(xmm0, xmm0);
|
cvttps2dq(xmm0, xmm0);
|
||||||
cvttps2dq(xmm2, xmm2);
|
cvttps2dq(xmm2, xmm2);
|
||||||
packssdw(xmm0, xmm2);
|
packssdw(xmm0, xmm2);
|
||||||
movdqa(ptr[&m_local.d.g], xmm0);
|
movdqa(ptr[&m_local.d.g], xmm0);
|
||||||
|
|
||||||
// m_local.d.b = GSVector4i(dcz * ps0123).ps32(GSVector4i(dcz * ps4567));
|
// m_local.d.b = GSVector4i(dcz * ps0123).ps32(GSVector4i(dcz * ps4567));
|
||||||
|
|
||||||
movaps(xmm2, xmm1);
|
movaps(xmm2, xmm1);
|
||||||
mulps(xmm1, xmm6);
|
mulps(xmm1, xmm6);
|
||||||
mulps(xmm2, xmm7);
|
mulps(xmm2, xmm7);
|
||||||
cvttps2dq(xmm1, xmm1);
|
cvttps2dq(xmm1, xmm1);
|
||||||
cvttps2dq(xmm2, xmm2);
|
cvttps2dq(xmm2, xmm2);
|
||||||
packssdw(xmm1, xmm2);
|
packssdw(xmm1, xmm2);
|
||||||
movdqa(ptr[&m_local.d.b], xmm1);
|
movdqa(ptr[&m_local.d.b], xmm1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret();
|
ret();
|
||||||
}
|
}
|
||||||
|
|
||||||
const GSVector4 GPUSetupPrimCodeGenerator::m_shift[3] =
|
const GSVector4 GPUSetupPrimCodeGenerator::m_shift[3] =
|
||||||
{
|
{
|
||||||
GSVector4(8.0f, 8.0f, 8.0f, 8.0f),
|
GSVector4(8.0f, 8.0f, 8.0f, 8.0f),
|
||||||
GSVector4(0.0f, 1.0f, 2.0f, 3.0f),
|
GSVector4(0.0f, 1.0f, 2.0f, 3.0f),
|
||||||
GSVector4(4.0f, 5.0f, 6.0f, 7.0f),
|
GSVector4(4.0f, 5.0f, 6.0f, 7.0f),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPUScanlineEnvironment.h"
|
#include "GPUScanlineEnvironment.h"
|
||||||
#include "GSFunctionMap.h"
|
#include "GSFunctionMap.h"
|
||||||
|
|
||||||
class GPUSetupPrimCodeGenerator : public GSCodeGenerator
|
class GPUSetupPrimCodeGenerator : public GSCodeGenerator
|
||||||
{
|
{
|
||||||
void operator = (const GPUSetupPrimCodeGenerator&);
|
void operator = (const GPUSetupPrimCodeGenerator&);
|
||||||
|
|
||||||
static const GSVector4 m_shift[3];
|
static const GSVector4 m_shift[3];
|
||||||
|
|
||||||
GPUScanlineSelector m_sel;
|
GPUScanlineSelector m_sel;
|
||||||
GPUScanlineLocalData& m_local;
|
GPUScanlineLocalData& m_local;
|
||||||
|
|
||||||
void Generate();
|
void Generate();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUSetupPrimCodeGenerator(void* param, uint32 key, void* code, size_t maxsize);
|
GPUSetupPrimCodeGenerator(void* param, uint32 key, void* code, size_t maxsize);
|
||||||
};
|
};
|
File diff suppressed because it is too large
Load Diff
|
@ -1,143 +1,143 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GPUDrawingEnvironment.h"
|
#include "GPUDrawingEnvironment.h"
|
||||||
#include "GPULocalMemory.h"
|
#include "GPULocalMemory.h"
|
||||||
#include "GPUVertex.h"
|
#include "GPUVertex.h"
|
||||||
#include "GSAlignedClass.h"
|
#include "GSAlignedClass.h"
|
||||||
#include "GSUtil.h"
|
#include "GSUtil.h"
|
||||||
#include "GSPerfMon.h"
|
#include "GSPerfMon.h"
|
||||||
|
|
||||||
class GPUState : public GSAlignedClass<32>
|
class GPUState : public GSAlignedClass<32>
|
||||||
{
|
{
|
||||||
typedef void (GPUState::*GPUStatusCommandHandler)(GPUReg* r);
|
typedef void (GPUState::*GPUStatusCommandHandler)(GPUReg* r);
|
||||||
|
|
||||||
GPUStatusCommandHandler m_fpGPUStatusCommandHandlers[256];
|
GPUStatusCommandHandler m_fpGPUStatusCommandHandlers[256];
|
||||||
|
|
||||||
void SCH_Null(GPUReg* r);
|
void SCH_Null(GPUReg* r);
|
||||||
void SCH_ResetGPU(GPUReg* r);
|
void SCH_ResetGPU(GPUReg* r);
|
||||||
void SCH_ResetCommandBuffer(GPUReg* r);
|
void SCH_ResetCommandBuffer(GPUReg* r);
|
||||||
void SCH_ResetIRQ(GPUReg* r);
|
void SCH_ResetIRQ(GPUReg* r);
|
||||||
void SCH_DisplayEnable(GPUReg* r);
|
void SCH_DisplayEnable(GPUReg* r);
|
||||||
void SCH_DMASetup(GPUReg* r);
|
void SCH_DMASetup(GPUReg* r);
|
||||||
void SCH_StartOfDisplayArea(GPUReg* r);
|
void SCH_StartOfDisplayArea(GPUReg* r);
|
||||||
void SCH_HorizontalDisplayRange(GPUReg* r);
|
void SCH_HorizontalDisplayRange(GPUReg* r);
|
||||||
void SCH_VerticalDisplayRange(GPUReg* r);
|
void SCH_VerticalDisplayRange(GPUReg* r);
|
||||||
void SCH_DisplayMode(GPUReg* r);
|
void SCH_DisplayMode(GPUReg* r);
|
||||||
void SCH_GPUInfo(GPUReg* r);
|
void SCH_GPUInfo(GPUReg* r);
|
||||||
|
|
||||||
typedef int (GPUState::*GPUPacketHandler)(GPUReg* r, int size);
|
typedef int (GPUState::*GPUPacketHandler)(GPUReg* r, int size);
|
||||||
|
|
||||||
GPUPacketHandler m_fpGPUPacketHandler[8];
|
GPUPacketHandler m_fpGPUPacketHandler[8];
|
||||||
|
|
||||||
int PH_Command(GPUReg* r, int size);
|
int PH_Command(GPUReg* r, int size);
|
||||||
int PH_Polygon(GPUReg* r, int size);
|
int PH_Polygon(GPUReg* r, int size);
|
||||||
int PH_Line(GPUReg* r, int size);
|
int PH_Line(GPUReg* r, int size);
|
||||||
int PH_Sprite(GPUReg* r, int size);
|
int PH_Sprite(GPUReg* r, int size);
|
||||||
int PH_Move(GPUReg* r, int size);
|
int PH_Move(GPUReg* r, int size);
|
||||||
int PH_Write(GPUReg* r, int size);
|
int PH_Write(GPUReg* r, int size);
|
||||||
int PH_Read(GPUReg* r, int size);
|
int PH_Read(GPUReg* r, int size);
|
||||||
int PH_Environment(GPUReg* r, int size);
|
int PH_Environment(GPUReg* r, int size);
|
||||||
|
|
||||||
class Buffer
|
class Buffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int bytes;
|
int bytes;
|
||||||
int maxbytes;
|
int maxbytes;
|
||||||
uint8* buff;
|
uint8* buff;
|
||||||
int cur;
|
int cur;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Buffer();
|
Buffer();
|
||||||
~Buffer();
|
~Buffer();
|
||||||
void Reserve(int size);
|
void Reserve(int size);
|
||||||
void Append(const uint8* src, int size);
|
void Append(const uint8* src, int size);
|
||||||
void Remove(int size);
|
void Remove(int size);
|
||||||
void RemoveAll();
|
void RemoveAll();
|
||||||
};
|
};
|
||||||
|
|
||||||
Buffer m_write;
|
Buffer m_write;
|
||||||
Buffer m_read;
|
Buffer m_read;
|
||||||
|
|
||||||
void SetPrim(GPUReg* r);
|
void SetPrim(GPUReg* r);
|
||||||
void SetCLUT(GPUReg* r);
|
void SetCLUT(GPUReg* r);
|
||||||
void SetTPAGE(GPUReg* r);
|
void SetTPAGE(GPUReg* r);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int s_n;
|
int s_n;
|
||||||
|
|
||||||
void Dump(const string& s, uint32 TP, const GSVector4i& r, int inc = true)
|
void Dump(const string& s, uint32 TP, const GSVector4i& r, int inc = true)
|
||||||
{
|
{
|
||||||
//if(m_perfmon.GetFrame() < 1000)
|
//if(m_perfmon.GetFrame() < 1000)
|
||||||
//if((m_env.TWIN.u32 & 0xfffff) == 0)
|
//if((m_env.TWIN.u32 & 0xfffff) == 0)
|
||||||
//if(!m_env.STATUS.ME && !m_env.STATUS.MD)
|
//if(!m_env.STATUS.ME && !m_env.STATUS.MD)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(inc) s_n++;
|
if(inc) s_n++;
|
||||||
|
|
||||||
//if(s_n < 86) return;
|
//if(s_n < 86) return;
|
||||||
|
|
||||||
int dir = 1;
|
int dir = 1;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
dir = 2;
|
dir = 2;
|
||||||
#endif
|
#endif
|
||||||
string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str());
|
string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str());
|
||||||
|
|
||||||
m_mem.SaveBMP(path, r, TP, m_env.CLUT.X, m_env.CLUT.Y);
|
m_mem.SaveBMP(path, r, TP, m_env.CLUT.X, m_env.CLUT.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dump(const string& s, int inc = true)
|
void Dump(const string& s, int inc = true)
|
||||||
{
|
{
|
||||||
Dump(s, 2, GSVector4i(0, 0, 1024, 512), inc);
|
Dump(s, 2, GSVector4i(0, 0, 1024, 512), inc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUDrawingEnvironment m_env;
|
GPUDrawingEnvironment m_env;
|
||||||
GPULocalMemory m_mem;
|
GPULocalMemory m_mem;
|
||||||
GPUVertex m_v;
|
GPUVertex m_v;
|
||||||
GSPerfMon m_perfmon;
|
GSPerfMon m_perfmon;
|
||||||
uint32 m_status[256];
|
uint32 m_status[256];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUState();
|
GPUState();
|
||||||
virtual ~GPUState();
|
virtual ~GPUState();
|
||||||
|
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
virtual void Flush();
|
virtual void Flush();
|
||||||
virtual void FlushPrim() = 0;
|
virtual void FlushPrim() = 0;
|
||||||
virtual void ResetPrim() = 0;
|
virtual void ResetPrim() = 0;
|
||||||
virtual void VertexKick() = 0;
|
virtual void VertexKick() = 0;
|
||||||
virtual void Invalidate(const GSVector4i& r);
|
virtual void Invalidate(const GSVector4i& r);
|
||||||
|
|
||||||
void WriteData(const uint8* mem, uint32 size);
|
void WriteData(const uint8* mem, uint32 size);
|
||||||
void ReadData(uint8* mem, uint32 size);
|
void ReadData(uint8* mem, uint32 size);
|
||||||
|
|
||||||
void WriteStatus(uint32 status);
|
void WriteStatus(uint32 status);
|
||||||
uint32 ReadStatus();
|
uint32 ReadStatus();
|
||||||
|
|
||||||
void Freeze(GPUFreezeData* data);
|
void Freeze(GPUFreezeData* data);
|
||||||
void Defrost(const GPUFreezeData* data);
|
void Defrost(const GPUFreezeData* data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GPU.h"
|
#include "GPU.h"
|
||||||
#include "GSVector.h"
|
#include "GSVector.h"
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
__aligned(struct, 32) GPUVertex
|
__aligned(struct, 32) GPUVertex
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
GPURegRGB RGB;
|
GPURegRGB RGB;
|
||||||
GPURegXY XY;
|
GPURegXY XY;
|
||||||
GPURegXY UV;
|
GPURegXY UV;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct {__m128i m128i;};
|
struct {__m128i m128i;};
|
||||||
struct {__m128 m128;};
|
struct {__m128 m128;};
|
||||||
};
|
};
|
||||||
|
|
||||||
GPUVertex() {memset(this, 0, sizeof(*this));}
|
GPUVertex() {memset(this, 0, sizeof(*this));}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPUVertexNull
|
struct GPUVertexNull
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -1,188 +1,188 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2007-2009 Gabest
|
* Copyright (C) 2007-2009 Gabest
|
||||||
* http://www.gabest.org
|
* http://www.gabest.org
|
||||||
*
|
*
|
||||||
* This Program is free software; you can redistribute it and/or modify
|
* This Program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2, or (at your option)
|
* the Free Software Foundation; either version 2, or (at your option)
|
||||||
* any later version.
|
* any later version.
|
||||||
*
|
*
|
||||||
* This Program is distributed in the hope that it will be useful,
|
* This Program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with GNU Make; see the file COPYING. If not, write to
|
* along with GNU Make; see the file COPYING. If not, write to
|
||||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
#include "GSDeviceDX.h"
|
#include "GSDeviceDX.h"
|
||||||
|
|
||||||
GSDeviceDX::GSDeviceDX()
|
GSDeviceDX::GSDeviceDX()
|
||||||
{
|
{
|
||||||
m_msaa = theApp.GetConfig("msaa", 0);
|
m_msaa = theApp.GetConfig("msaa", 0);
|
||||||
|
|
||||||
m_msaa_desc.Count = 1;
|
m_msaa_desc.Count = 1;
|
||||||
m_msaa_desc.Quality = 0;
|
m_msaa_desc.Quality = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GSDeviceDX::~GSDeviceDX()
|
GSDeviceDX::~GSDeviceDX()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
GSTexture* GSDeviceDX::Fetch(int type, int w, int h, bool msaa, int format)
|
GSTexture* GSDeviceDX::Fetch(int type, int w, int h, bool msaa, int format)
|
||||||
{
|
{
|
||||||
if(m_msaa < 2)
|
if(m_msaa < 2)
|
||||||
{
|
{
|
||||||
msaa = false;
|
msaa = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return __super::Fetch(type, w, h, msaa, format);
|
return __super::Fetch(type, w, h, msaa, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GSDeviceDX::SetFeatureLevel(D3D_FEATURE_LEVEL level, bool compat_mode)
|
bool GSDeviceDX::SetFeatureLevel(D3D_FEATURE_LEVEL level, bool compat_mode)
|
||||||
{
|
{
|
||||||
m_shader.level = level;
|
m_shader.level = level;
|
||||||
|
|
||||||
switch(level)
|
switch(level)
|
||||||
{
|
{
|
||||||
case D3D_FEATURE_LEVEL_9_1:
|
case D3D_FEATURE_LEVEL_9_1:
|
||||||
case D3D_FEATURE_LEVEL_9_2:
|
case D3D_FEATURE_LEVEL_9_2:
|
||||||
m_shader.model = "0x200";
|
m_shader.model = "0x200";
|
||||||
m_shader.vs = compat_mode ? "vs_4_0_level_9_1" : "vs_2_0";
|
m_shader.vs = compat_mode ? "vs_4_0_level_9_1" : "vs_2_0";
|
||||||
m_shader.ps = compat_mode ? "ps_4_0_level_9_1" : "ps_2_0";
|
m_shader.ps = compat_mode ? "ps_4_0_level_9_1" : "ps_2_0";
|
||||||
break;
|
break;
|
||||||
case D3D_FEATURE_LEVEL_9_3:
|
case D3D_FEATURE_LEVEL_9_3:
|
||||||
m_shader.model = "0x300";
|
m_shader.model = "0x300";
|
||||||
m_shader.vs = compat_mode ? "vs_4_0_level_9_3" : "vs_3_0";
|
m_shader.vs = compat_mode ? "vs_4_0_level_9_3" : "vs_3_0";
|
||||||
m_shader.ps = compat_mode ? "ps_4_0_level_9_3" : "ps_3_0";
|
m_shader.ps = compat_mode ? "ps_4_0_level_9_3" : "ps_3_0";
|
||||||
break;
|
break;
|
||||||
case D3D_FEATURE_LEVEL_10_0:
|
case D3D_FEATURE_LEVEL_10_0:
|
||||||
m_shader.model = "0x400";
|
m_shader.model = "0x400";
|
||||||
m_shader.vs = "vs_4_0";
|
m_shader.vs = "vs_4_0";
|
||||||
m_shader.gs = "gs_4_0";
|
m_shader.gs = "gs_4_0";
|
||||||
m_shader.ps = "ps_4_0";
|
m_shader.ps = "ps_4_0";
|
||||||
break;
|
break;
|
||||||
case D3D_FEATURE_LEVEL_10_1:
|
case D3D_FEATURE_LEVEL_10_1:
|
||||||
m_shader.model = "0x401";
|
m_shader.model = "0x401";
|
||||||
m_shader.vs = "vs_4_1";
|
m_shader.vs = "vs_4_1";
|
||||||
m_shader.gs = "gs_4_1";
|
m_shader.gs = "gs_4_1";
|
||||||
m_shader.ps = "ps_4_1";
|
m_shader.ps = "ps_4_1";
|
||||||
break;
|
break;
|
||||||
case D3D_FEATURE_LEVEL_11_0:
|
case D3D_FEATURE_LEVEL_11_0:
|
||||||
m_shader.model = "0x500";
|
m_shader.model = "0x500";
|
||||||
m_shader.vs = "vs_5_0";
|
m_shader.vs = "vs_5_0";
|
||||||
m_shader.gs = "gs_5_0";
|
m_shader.gs = "gs_5_0";
|
||||||
m_shader.ps = "ps_5_0";
|
m_shader.ps = "ps_5_0";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// (A - B) * C + D
|
// (A - B) * C + D
|
||||||
// A: Cs/Cd/0
|
// A: Cs/Cd/0
|
||||||
// B: Cs/Cd/0
|
// B: Cs/Cd/0
|
||||||
// C: As/Ad/FIX
|
// C: As/Ad/FIX
|
||||||
// D: Cs/Cd/0
|
// D: Cs/Cd/0
|
||||||
|
|
||||||
// bogus: 0100, 0110, 0120, 0200, 0210, 0220, 1001, 1011, 1021
|
// bogus: 0100, 0110, 0120, 0200, 0210, 0220, 1001, 1011, 1021
|
||||||
// tricky: 1201, 1211, 1221
|
// tricky: 1201, 1211, 1221
|
||||||
|
|
||||||
// Source.rgb = float3(1, 1, 1);
|
// Source.rgb = float3(1, 1, 1);
|
||||||
// 1201 Cd*(1 + As) => Source * Dest color + Dest * Source alpha
|
// 1201 Cd*(1 + As) => Source * Dest color + Dest * Source alpha
|
||||||
// 1211 Cd*(1 + Ad) => Source * Dest color + Dest * Dest alpha
|
// 1211 Cd*(1 + Ad) => Source * Dest color + Dest * Dest alpha
|
||||||
// 1221 Cd*(1 + F) => Source * Dest color + Dest * Factor
|
// 1221 Cd*(1 + F) => Source * Dest color + Dest * Factor
|
||||||
|
|
||||||
const GSDeviceDX::D3D9Blend GSDeviceDX::m_blendMapD3D9[3*3*3*3] =
|
const GSDeviceDX::D3D9Blend GSDeviceDX::m_blendMapD3D9[3*3*3*3] =
|
||||||
{
|
{
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0000: (Cs - Cs)*As + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0000: (Cs - Cs)*As + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0001: (Cs - Cs)*As + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0001: (Cs - Cs)*As + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0002: (Cs - Cs)*As + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0002: (Cs - Cs)*As + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0010: (Cs - Cs)*Ad + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0010: (Cs - Cs)*Ad + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0011: (Cs - Cs)*Ad + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0011: (Cs - Cs)*Ad + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0012: (Cs - Cs)*Ad + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0012: (Cs - Cs)*Ad + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0020: (Cs - Cs)*F + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 0020: (Cs - Cs)*F + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0021: (Cs - Cs)*F + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 0021: (Cs - Cs)*F + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0022: (Cs - Cs)*F + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 0022: (Cs - Cs)*F + 0 ==> 0
|
||||||
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, //*0100: (Cs - Cd)*As + Cs ==> Cs*(As + 1) - Cd*As
|
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, //*0100: (Cs - Cd)*As + Cs ==> Cs*(As + 1) - Cd*As
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA}, // 0101: (Cs - Cd)*As + Cd ==> Cs*As + Cd*(1 - As)
|
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA}, // 0101: (Cs - Cd)*As + Cd ==> Cs*As + Cd*(1 - As)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, // 0102: (Cs - Cd)*As + 0 ==> Cs*As - Cd*As
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, // 0102: (Cs - Cd)*As + 0 ==> Cs*As - Cd*As
|
||||||
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, //*0110: (Cs - Cd)*Ad + Cs ==> Cs*(Ad + 1) - Cd*Ad
|
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, //*0110: (Cs - Cd)*Ad + Cs ==> Cs*(Ad + 1) - Cd*Ad
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_INVDESTALPHA}, // 0111: (Cs - Cd)*Ad + Cd ==> Cs*Ad + Cd*(1 - Ad)
|
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_INVDESTALPHA}, // 0111: (Cs - Cd)*Ad + Cd ==> Cs*Ad + Cd*(1 - Ad)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, // 0112: (Cs - Cd)*Ad + 0 ==> Cs*Ad - Cd*Ad
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, // 0112: (Cs - Cd)*Ad + 0 ==> Cs*Ad - Cd*Ad
|
||||||
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR}, //*0120: (Cs - Cd)*F + Cs ==> Cs*(F + 1) - Cd*F
|
{1, D3DBLENDOP_SUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR}, //*0120: (Cs - Cd)*F + Cs ==> Cs*(F + 1) - Cd*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_INVBLENDFACTOR}, // 0121: (Cs - Cd)*F + Cd ==> Cs*F + Cd*(1 - F)
|
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_INVBLENDFACTOR}, // 0121: (Cs - Cd)*F + Cd ==> Cs*F + Cd*(1 - F)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR}, // 0122: (Cs - Cd)*F + 0 ==> Cs*F - Cd*F
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR}, // 0122: (Cs - Cd)*F + 0 ==> Cs*F - Cd*F
|
||||||
{1, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, //*0200: (Cs - 0)*As + Cs ==> Cs*(As + 1)
|
{1, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, //*0200: (Cs - 0)*As + Cs ==> Cs*(As + 1)
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ONE}, // 0201: (Cs - 0)*As + Cd ==> Cs*As + Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ONE}, // 0201: (Cs - 0)*As + Cd ==> Cs*As + Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, // 0202: (Cs - 0)*As + 0 ==> Cs*As
|
{0, D3DBLENDOP_ADD, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, // 0202: (Cs - 0)*As + 0 ==> Cs*As
|
||||||
{1, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, //*0210: (Cs - 0)*Ad + Cs ==> Cs*(Ad + 1)
|
{1, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, //*0210: (Cs - 0)*Ad + Cs ==> Cs*(Ad + 1)
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ONE}, // 0211: (Cs - 0)*Ad + Cd ==> Cs*Ad + Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ONE}, // 0211: (Cs - 0)*Ad + Cd ==> Cs*Ad + Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, // 0212: (Cs - 0)*Ad + 0 ==> Cs*Ad
|
{0, D3DBLENDOP_ADD, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, // 0212: (Cs - 0)*Ad + 0 ==> Cs*Ad
|
||||||
{1, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, //*0220: (Cs - 0)*F + Cs ==> Cs*(F + 1)
|
{1, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, //*0220: (Cs - 0)*F + Cs ==> Cs*(F + 1)
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ONE}, // 0221: (Cs - 0)*F + Cd ==> Cs*F + Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ONE}, // 0221: (Cs - 0)*F + Cd ==> Cs*F + Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, // 0222: (Cs - 0)*F + 0 ==> Cs*F
|
{0, D3DBLENDOP_ADD, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, // 0222: (Cs - 0)*F + 0 ==> Cs*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVSRCALPHA, D3DBLEND_SRCALPHA}, // 1000: (Cd - Cs)*As + Cs ==> Cd*As + Cs*(1 - As)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVSRCALPHA, D3DBLEND_SRCALPHA}, // 1000: (Cd - Cs)*As + Cs ==> Cd*As + Cs*(1 - As)
|
||||||
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, //*1001: (Cd - Cs)*As + Cd ==> Cd*(As + 1) - Cs*As
|
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, //*1001: (Cd - Cs)*As + Cd ==> Cd*(As + 1) - Cs*As
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, // 1002: (Cd - Cs)*As + 0 ==> Cd*As - Cs*As
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA}, // 1002: (Cd - Cs)*As + 0 ==> Cd*As - Cs*As
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVDESTALPHA, D3DBLEND_DESTALPHA}, // 1010: (Cd - Cs)*Ad + Cs ==> Cd*Ad + Cs*(1 - Ad)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVDESTALPHA, D3DBLEND_DESTALPHA}, // 1010: (Cd - Cs)*Ad + Cs ==> Cd*Ad + Cs*(1 - Ad)
|
||||||
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, //*1011: (Cd - Cs)*Ad + Cd ==> Cd*(Ad + 1) - Cs*Ad
|
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, //*1011: (Cd - Cs)*Ad + Cd ==> Cd*(Ad + 1) - Cs*Ad
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, // 1012: (Cd - Cs)*Ad + 0 ==> Cd*Ad - Cs*Ad
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA}, // 1012: (Cd - Cs)*Ad + 0 ==> Cd*Ad - Cs*Ad
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVBLENDFACTOR, D3DBLEND_BLENDFACTOR}, // 1020: (Cd - Cs)*F + Cs ==> Cd*F + Cs*(1 - F)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVBLENDFACTOR, D3DBLEND_BLENDFACTOR}, // 1020: (Cd - Cs)*F + Cs ==> Cd*F + Cs*(1 - F)
|
||||||
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR},//*1021: (Cd - Cs)*F + Cd ==> Cd*(F + 1) - Cs*F
|
{1, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR},//*1021: (Cd - Cs)*F + Cd ==> Cd*(F + 1) - Cs*F
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR},// 1022: (Cd - Cs)*F + 0 ==> Cd*F - Cs*F
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR},// 1022: (Cd - Cs)*F + 0 ==> Cd*F - Cs*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1100: (Cd - Cd)*As + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1100: (Cd - Cd)*As + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1101: (Cd - Cd)*As + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1101: (Cd - Cd)*As + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1102: (Cd - Cd)*As + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1102: (Cd - Cd)*As + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1110: (Cd - Cd)*Ad + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1110: (Cd - Cd)*Ad + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1111: (Cd - Cd)*Ad + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1111: (Cd - Cd)*Ad + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1112: (Cd - Cd)*Ad + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1112: (Cd - Cd)*Ad + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1120: (Cd - Cd)*F + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 1120: (Cd - Cd)*F + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1121: (Cd - Cd)*F + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 1121: (Cd - Cd)*F + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1122: (Cd - Cd)*F + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 1122: (Cd - Cd)*F + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_SRCALPHA}, // 1200: (Cd - 0)*As + Cs ==> Cs + Cd*As
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_SRCALPHA}, // 1200: (Cd - 0)*As + Cs ==> Cs + Cd*As
|
||||||
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_SRCALPHA}, //#1201: (Cd - 0)*As + Cd ==> Cd*(1 + As) // ffxii main menu background glow effect
|
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_SRCALPHA}, //#1201: (Cd - 0)*As + Cd ==> Cd*(1 + As) // ffxii main menu background glow effect
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_SRCALPHA}, // 1202: (Cd - 0)*As + 0 ==> Cd*As
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_SRCALPHA}, // 1202: (Cd - 0)*As + 0 ==> Cd*As
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 1210: (Cd - 0)*Ad + Cs ==> Cs + Cd*Ad
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 1210: (Cd - 0)*Ad + Cs ==> Cs + Cd*Ad
|
||||||
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_DESTALPHA}, //#1211: (Cd - 0)*Ad + Cd ==> Cd*(1 + Ad)
|
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_DESTALPHA}, //#1211: (Cd - 0)*Ad + Cd ==> Cd*(1 + Ad)
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_DESTALPHA}, // 1212: (Cd - 0)*Ad + 0 ==> Cd*Ad
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_DESTALPHA}, // 1212: (Cd - 0)*Ad + 0 ==> Cd*Ad
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 1220: (Cd - 0)*F + Cs ==> Cs + Cd*F
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 1220: (Cd - 0)*F + Cs ==> Cs + Cd*F
|
||||||
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_BLENDFACTOR}, //#1221: (Cd - 0)*F + Cd ==> Cd*(1 + F)
|
{2, D3DBLENDOP_ADD, D3DBLEND_DESTCOLOR, D3DBLEND_BLENDFACTOR}, //#1221: (Cd - 0)*F + Cd ==> Cd*(1 + F)
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_BLENDFACTOR}, // 1222: (Cd - 0)*F + 0 ==> Cd*F
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_BLENDFACTOR}, // 1222: (Cd - 0)*F + 0 ==> Cd*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVSRCALPHA, D3DBLEND_ZERO}, // 2000: (0 - Cs)*As + Cs ==> Cs*(1 - As)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVSRCALPHA, D3DBLEND_ZERO}, // 2000: (0 - Cs)*As + Cs ==> Cs*(1 - As)
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_ONE}, // 2001: (0 - Cs)*As + Cd ==> Cd - Cs*As
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_ONE}, // 2001: (0 - Cs)*As + Cd ==> Cd - Cs*As
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, // 2002: (0 - Cs)*As + 0 ==> 0 - Cs*As
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_SRCALPHA, D3DBLEND_ZERO}, // 2002: (0 - Cs)*As + 0 ==> 0 - Cs*As
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVDESTALPHA, D3DBLEND_ZERO}, // 2010: (0 - Cs)*Ad + Cs ==> Cs*(1 - Ad)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVDESTALPHA, D3DBLEND_ZERO}, // 2010: (0 - Cs)*Ad + Cs ==> Cs*(1 - Ad)
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_ONE}, // 2011: (0 - Cs)*Ad + Cd ==> Cd - Cs*Ad
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_ONE}, // 2011: (0 - Cs)*Ad + Cd ==> Cd - Cs*Ad
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, // 2012: (0 - Cs)*Ad + 0 ==> 0 - Cs*Ad
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_DESTALPHA, D3DBLEND_ZERO}, // 2012: (0 - Cs)*Ad + 0 ==> 0 - Cs*Ad
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_INVBLENDFACTOR, D3DBLEND_ZERO}, // 2020: (0 - Cs)*F + Cs ==> Cs*(1 - F)
|
{0, D3DBLENDOP_ADD, D3DBLEND_INVBLENDFACTOR, D3DBLEND_ZERO}, // 2020: (0 - Cs)*F + Cs ==> Cs*(1 - F)
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_ONE}, // 2021: (0 - Cs)*F + Cd ==> Cd - Cs*F
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_ONE}, // 2021: (0 - Cs)*F + Cd ==> Cd - Cs*F
|
||||||
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, // 2022: (0 - Cs)*F + 0 ==> 0 - Cs*F
|
{0, D3DBLENDOP_REVSUBTRACT, D3DBLEND_BLENDFACTOR, D3DBLEND_ZERO}, // 2022: (0 - Cs)*F + 0 ==> 0 - Cs*F
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_SRCALPHA}, // 2100: (0 - Cd)*As + Cs ==> Cs - Cd*As
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_SRCALPHA}, // 2100: (0 - Cd)*As + Cs ==> Cs - Cd*As
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVSRCALPHA}, // 2101: (0 - Cd)*As + Cd ==> Cd*(1 - As)
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVSRCALPHA}, // 2101: (0 - Cd)*As + Cd ==> Cd*(1 - As)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ZERO, D3DBLEND_SRCALPHA}, // 2102: (0 - Cd)*As + 0 ==> 0 - Cd*As
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ZERO, D3DBLEND_SRCALPHA}, // 2102: (0 - Cd)*As + 0 ==> 0 - Cd*As
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 2110: (0 - Cd)*Ad + Cs ==> Cs - Cd*Ad
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 2110: (0 - Cd)*Ad + Cs ==> Cs - Cd*Ad
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVDESTALPHA}, // 2111: (0 - Cd)*Ad + Cd ==> Cd*(1 - Ad)
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVDESTALPHA}, // 2111: (0 - Cd)*Ad + Cd ==> Cd*(1 - Ad)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 2112: (0 - Cd)*Ad + 0 ==> 0 - Cd*Ad
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_DESTALPHA}, // 2112: (0 - Cd)*Ad + 0 ==> 0 - Cd*Ad
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 2120: (0 - Cd)*F + Cs ==> Cs - Cd*F
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 2120: (0 - Cd)*F + Cs ==> Cs - Cd*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVBLENDFACTOR}, // 2121: (0 - Cd)*F + Cd ==> Cd*(1 - F)
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVBLENDFACTOR}, // 2121: (0 - Cd)*F + Cd ==> Cd*(1 - F)
|
||||||
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 2122: (0 - Cd)*F + 0 ==> 0 - Cd*F
|
{0, D3DBLENDOP_SUBTRACT, D3DBLEND_ONE, D3DBLEND_BLENDFACTOR}, // 2122: (0 - Cd)*F + 0 ==> 0 - Cd*F
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2200: (0 - 0)*As + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2200: (0 - 0)*As + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2201: (0 - 0)*As + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2201: (0 - 0)*As + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2202: (0 - 0)*As + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2202: (0 - 0)*As + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2210: (0 - 0)*Ad + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2210: (0 - 0)*Ad + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2211: (0 - 0)*Ad + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2211: (0 - 0)*Ad + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2212: (0 - 0)*Ad + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2212: (0 - 0)*Ad + 0 ==> 0
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2220: (0 - 0)*F + Cs ==> Cs
|
{0, D3DBLENDOP_ADD, D3DBLEND_ONE, D3DBLEND_ZERO}, // 2220: (0 - 0)*F + Cs ==> Cs
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2221: (0 - 0)*F + Cd ==> Cd
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ONE}, // 2221: (0 - 0)*F + Cd ==> Cd
|
||||||
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2222: (0 - 0)*F + 0 ==> 0
|
{0, D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_ZERO}, // 2222: (0 - 0)*F + 0 ==> 0
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,70 +1,70 @@
|
||||||
; GSdx.def : Declares the module parameters for the DLL.
|
; GSdx.def : Declares the module parameters for the DLL.
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
; Explicit exports can go here
|
; Explicit exports can go here
|
||||||
PS2EgetLibType
|
PS2EgetLibType
|
||||||
PS2EgetLibName
|
PS2EgetLibName
|
||||||
PS2EgetLibVersion2
|
PS2EgetLibVersion2
|
||||||
PS2EgetCpuPlatform
|
PS2EgetCpuPlatform
|
||||||
PS2EsetEmuVersion
|
PS2EsetEmuVersion
|
||||||
GSsetBaseMem
|
GSsetBaseMem
|
||||||
GSinit
|
GSinit
|
||||||
GSshutdown
|
GSshutdown
|
||||||
GSopen
|
GSopen
|
||||||
GSopen2
|
GSopen2
|
||||||
GSclose
|
GSclose
|
||||||
GSreset
|
GSreset
|
||||||
GSwriteCSR
|
GSwriteCSR
|
||||||
GSgifSoftReset
|
GSgifSoftReset
|
||||||
GSgifTransfer
|
GSgifTransfer
|
||||||
GSgifTransfer1
|
GSgifTransfer1
|
||||||
GSgifTransfer2
|
GSgifTransfer2
|
||||||
GSgifTransfer3
|
GSgifTransfer3
|
||||||
GSvsync
|
GSvsync
|
||||||
GSmakeSnapshot
|
GSmakeSnapshot
|
||||||
GSkeyEvent
|
GSkeyEvent
|
||||||
GSfreeze
|
GSfreeze
|
||||||
GSconfigure
|
GSconfigure
|
||||||
GStest
|
GStest
|
||||||
GSabout
|
GSabout
|
||||||
GSreadFIFO
|
GSreadFIFO
|
||||||
GSreadFIFO2
|
GSreadFIFO2
|
||||||
GSirqCallback
|
GSirqCallback
|
||||||
GSsetupRecording
|
GSsetupRecording
|
||||||
GSsetGameCRC
|
GSsetGameCRC
|
||||||
GSsetFrameSkip
|
GSsetFrameSkip
|
||||||
GSsetFrameLimit
|
GSsetFrameLimit
|
||||||
GSsetVsync
|
GSsetVsync
|
||||||
GSsetExclusive
|
GSsetExclusive
|
||||||
GSsetSettingsDir
|
GSsetSettingsDir
|
||||||
GSgetLastTag
|
GSgetLastTag
|
||||||
GSReplay
|
GSReplay
|
||||||
GSBenchmark
|
GSBenchmark
|
||||||
GSgetTitleInfo2
|
GSgetTitleInfo2
|
||||||
PSEgetLibType
|
PSEgetLibType
|
||||||
PSEgetLibName
|
PSEgetLibName
|
||||||
PSEgetLibVersion
|
PSEgetLibVersion
|
||||||
GPUinit
|
GPUinit
|
||||||
GPUshutdown
|
GPUshutdown
|
||||||
GPUopen
|
GPUopen
|
||||||
GPUclose
|
GPUclose
|
||||||
GPUconfigure
|
GPUconfigure
|
||||||
GPUabout
|
GPUabout
|
||||||
GPUtest
|
GPUtest
|
||||||
GPUwriteData
|
GPUwriteData
|
||||||
GPUwriteStatus
|
GPUwriteStatus
|
||||||
GPUreadData
|
GPUreadData
|
||||||
GPUreadStatus
|
GPUreadStatus
|
||||||
GPUdmaChain
|
GPUdmaChain
|
||||||
GPUgetMode
|
GPUgetMode
|
||||||
GPUsetMode
|
GPUsetMode
|
||||||
GPUupdateLace
|
GPUupdateLace
|
||||||
GPUmakeSnapshot
|
GPUmakeSnapshot
|
||||||
GPUwriteDataMem
|
GPUwriteDataMem
|
||||||
GPUreadDataMem
|
GPUreadDataMem
|
||||||
GPUdisplayText
|
GPUdisplayText
|
||||||
GPUdisplayFlags
|
GPUdisplayFlags
|
||||||
GPUfreeze
|
GPUfreeze
|
||||||
GPUshowScreenPic
|
GPUshowScreenPic
|
||||||
GPUgetScreenPic
|
GPUgetScreenPic
|
||||||
GPUcursor
|
GPUcursor
|
|
@ -1,24 +1,24 @@
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_PropertySheetDisplayName>GSdx</_PropertySheetDisplayName>
|
<_PropertySheetDisplayName>GSdx</_PropertySheetDisplayName>
|
||||||
<TargetName>$(ProjectName)-$(SSEtype)</TargetName>
|
<TargetName>$(ProjectName)-$(SSEtype)</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<DisableSpecificWarnings>4995;4324;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4995;4324;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>JITProfiling.lib;d3d11_beta.lib;d3dx11.lib;d3d10.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;cg.lib;cgGL.lib;glut32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>JITProfiling.lib;d3d11_beta.lib;d3dx11.lib;d3d10.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;ddraw.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;cg.lib;cgGL.lib;glut32.lib;glew32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>./vtune;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>./vtune;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<DelayLoadDLLs>d3d9.dll;d3dx9_41.dll;d3d10.dll;d3d10_1.dll;d3dx10_41.dll;d3d11.dll;d3d11_beta.dll;d3dx11_41.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>d3d9.dll;d3dx9_41.dll;d3d10.dll;d3d10_1.dll;d3dx10_41.dll;d3d11.dll;d3d11_beta.dll;d3dx11_41.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>
|
<Command>
|
||||||
</Command>
|
</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(SolutionDir)common\vsprops\preBuild.cmd" "$(ProjectDir)."</Command>
|
<Command>"$(SolutionDir)common\vsprops\preBuild.cmd" "$(ProjectDir)."</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,315 +1,315 @@
|
||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include "afxres.h"
|
#include "afxres.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// English (U.S.) resources
|
// English (U.S.) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// TEXTINCLUDE
|
// TEXTINCLUDE
|
||||||
//
|
//
|
||||||
|
|
||||||
1 TEXTINCLUDE
|
1 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
2 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\0"
|
"#include ""afxres.h""\r\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
3 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""res/tfx.fx""\r\n"
|
"#include ""res/tfx.fx""\r\n"
|
||||||
"#include ""res/convert.fx""\r\n"
|
"#include ""res/convert.fx""\r\n"
|
||||||
"#include ""res/interlace.fx""\r\n"
|
"#include ""res/interlace.fx""\r\n"
|
||||||
"#include ""res/merge.fx""\r\0"
|
"#include ""res/merge.fx""\r\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// RCDATA
|
// RCDATA
|
||||||
//
|
//
|
||||||
|
|
||||||
IDR_CONVERT_FX RCDATA "res\\convert.fx"
|
IDR_CONVERT_FX RCDATA "res\\convert.fx"
|
||||||
IDR_TFX_FX RCDATA "res\\tfx.fx"
|
IDR_TFX_FX RCDATA "res\\tfx.fx"
|
||||||
IDR_MERGE_FX RCDATA "res\\merge.fx"
|
IDR_MERGE_FX RCDATA "res\\merge.fx"
|
||||||
IDR_INTERLACE_FX RCDATA "res\\interlace.fx"
|
IDR_INTERLACE_FX RCDATA "res\\interlace.fx"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Bitmap
|
// Bitmap
|
||||||
//
|
//
|
||||||
|
|
||||||
IDB_LOGO9 BITMAP "res\\logo9.bmp"
|
IDB_LOGO9 BITMAP "res\\logo9.bmp"
|
||||||
IDB_LOGO10 BITMAP "res\\logo10.bmp"
|
IDB_LOGO10 BITMAP "res\\logo10.bmp"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_CONFIG DIALOGEX 0, 0, 189, 351
|
IDD_CONFIG DIALOGEX 0, 0, 189, 351
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Settings..."
|
CAPTION "Settings..."
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,175,42
|
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,175,42
|
||||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
||||||
LTEXT "Resolution:",IDC_STATIC,7,58,37,8
|
LTEXT "Resolution:",IDC_STATIC,7,58,37,8
|
||||||
COMBOBOX IDC_RESOLUTION,71,56,111,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RESOLUTION,71,56,111,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Renderer:",IDC_STATIC,7,73,34,8
|
LTEXT "Renderer:",IDC_STATIC,7,73,34,8
|
||||||
COMBOBOX IDC_RENDERER,71,71,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RENDERER,71,71,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Interlacing (F5):",IDC_STATIC,7,89,53,8
|
LTEXT "Interlacing (F5):",IDC_STATIC,7,89,53,8
|
||||||
COMBOBOX IDC_INTERLACE,71,86,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_INTERLACE,71,86,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,104,60,8
|
LTEXT "Aspect Ratio (F6):",IDC_STATIC,7,104,60,8
|
||||||
COMBOBOX IDC_ASPECTRATIO,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_ASPECTRATIO,71,101,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
DEFPUSHBUTTON "OK",IDOK,43,323,50,14
|
DEFPUSHBUTTON "OK",IDOK,43,323,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,96,323,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,96,323,50,14
|
||||||
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,231,93,10
|
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,231,93,10
|
||||||
LTEXT "D3D internal res:",IDC_STATIC,18,135,55,8
|
LTEXT "D3D internal res:",IDC_STATIC,18,135,55,8
|
||||||
EDITTEXT IDC_RESX_EDIT,82,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESX_EDIT,82,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,110,135,11,14
|
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,110,135,11,14
|
||||||
EDITTEXT IDC_RESY_EDIT,120,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESY_EDIT,120,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,144,135,11,14
|
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,144,135,11,14
|
||||||
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,165,33,10
|
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,123,165,33,10
|
||||||
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,147,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_UPSCALE_MULTIPLIER,82,147,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Or use Scaling:",IDC_STATIC,18,150,49,8
|
LTEXT "Or use Scaling:",IDC_STATIC,18,150,49,8
|
||||||
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,165,99,8
|
LTEXT "Or use original PS2 resolution :",IDC_STATIC,18,165,99,8
|
||||||
EDITTEXT IDC_MSAAEDIT,75,258,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_MSAAEDIT,75,258,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,109,261,11,14
|
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,109,261,11,14
|
||||||
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,18,261,53,8
|
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,18,261,53,8
|
||||||
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,117,175,66
|
GROUPBOX "D3D Enhancements (can cause glitches)",IDC_STATIC,7,117,175,66
|
||||||
LTEXT "SW rend. threads:",IDC_STATIC,7,189,60,8
|
LTEXT "SW rend. threads:",IDC_STATIC,7,189,60,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,71,187,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,71,187,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,190,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,190,11,14
|
||||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,7,203,67,10
|
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,7,203,67,10
|
||||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,204,58,10
|
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,204,58,10
|
||||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,217,82,10
|
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,217,82,10
|
||||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,217,93,10
|
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,217,93,10
|
||||||
CONTROL "Edge anti-aliasing",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,231,72,10
|
CONTROL "Edge anti-aliasing",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,231,72,10
|
||||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,279,51,10
|
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,279,51,10
|
||||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,279,51,10
|
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,279,51,10
|
||||||
GROUPBOX "Hacks",IDC_USERHACKS,13,244,161,71,BS_CENTER
|
GROUPBOX "Hacks",IDC_USERHACKS,13,244,161,71,BS_CENTER
|
||||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,55,291,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SKIPDRAWHACKEDIT,55,291,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,94,293,11,14
|
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,94,293,11,14
|
||||||
LTEXT "SkipDraw:",IDC_STATIC_TEXT_SKIPDRAW,20,293,33,8
|
LTEXT "SkipDraw:",IDC_STATIC_TEXT_SKIPDRAW,20,293,33,8
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
IDD_CAPTURE DIALOGEX 0, 0, 279, 71
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Capture settings"
|
CAPTION "Capture settings"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
EDITTEXT IDC_FILENAME,7,7,207,14,ES_AUTOHSCROLL
|
EDITTEXT IDC_FILENAME,7,7,207,14,ES_AUTOHSCROLL
|
||||||
PUSHBUTTON "Browse...",IDC_BROWSE,222,7,50,14
|
PUSHBUTTON "Browse...",IDC_BROWSE,222,7,50,14
|
||||||
COMBOBOX IDC_CODECS,7,27,207,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_CODECS,7,27,207,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "Config...",IDC_CONFIGURE,222,26,50,14
|
PUSHBUTTON "Config...",IDC_CONFIGURE,222,26,50,14
|
||||||
LTEXT "Size:",IDC_STATIC,6,50,16,8
|
LTEXT "Size:",IDC_STATIC,6,50,16,8
|
||||||
EDITTEXT IDC_WIDTH,30,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_WIDTH,30,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||||
EDITTEXT IDC_HEIGHT,64,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_HEIGHT,64,47,31,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,169,47,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,169,47,50,14
|
||||||
DEFPUSHBUTTON "OK",IDOK,221,47,50,14
|
DEFPUSHBUTTON "OK",IDOK,221,47,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_GPUCONFIG DIALOGEX 0, 0, 189, 199
|
IDD_GPUCONFIG DIALOGEX 0, 0, 189, 199
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Settings..."
|
CAPTION "Settings..."
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,7,7,175,44
|
||||||
LTEXT "Resolution:",IDC_STATIC,7,59,37,8
|
LTEXT "Resolution:",IDC_STATIC,7,59,37,8
|
||||||
COMBOBOX IDC_RESOLUTION,78,57,104,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RESOLUTION,78,57,104,125,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Renderer:",IDC_STATIC,7,74,34,8
|
LTEXT "Renderer:",IDC_STATIC,7,74,34,8
|
||||||
COMBOBOX IDC_RENDERER,78,72,104,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RENDERER,78,72,104,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Texture Filter (Del):",IDC_STATIC,7,90,64,8
|
LTEXT "Texture Filter (Del):",IDC_STATIC,7,90,64,8
|
||||||
COMBOBOX IDC_FILTER,78,87,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_FILTER,78,87,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Dithering (End):",IDC_STATIC,7,105,52,8
|
LTEXT "Dithering (End):",IDC_STATIC,7,105,52,8
|
||||||
COMBOBOX IDC_DITHERING,78,102,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_DITHERING,78,102,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Aspect Ratio (PgDn):",IDC_STATIC,7,120,68,8
|
LTEXT "Aspect Ratio (PgDn):",IDC_STATIC,7,120,68,8
|
||||||
COMBOBOX IDC_ASPECTRATIO,78,117,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_ASPECTRATIO,78,117,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Rendering Threads:",IDC_STATIC,7,157,64,8
|
LTEXT "Rendering Threads:",IDC_STATIC,7,157,64,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,78,155,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,78,155,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,161,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,99,161,11,14
|
||||||
DEFPUSHBUTTON "OK",IDOK,43,178,50,14
|
DEFPUSHBUTTON "OK",IDOK,43,178,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,96,178,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,96,178,50,14
|
||||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,173,42
|
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,7,7,173,42
|
||||||
LTEXT "Internal Resolution:",IDC_STATIC,7,135,64,8
|
LTEXT "Internal Resolution:",IDC_STATIC,7,135,64,8
|
||||||
COMBOBOX IDC_SCALE,78,132,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_SCALE,78,132,104,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
CONTROL "Windowed",IDC_WINDOWED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,157,49,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CONFIG2 DIALOGEX 0, 0, 187, 341
|
IDD_CONFIG2 DIALOGEX 0, 0, 187, 341
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Settings..."
|
CAPTION "Settings..."
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,6,6,173,42
|
CONTROL 2022,IDC_LOGO11,"Static",SS_BITMAP,6,6,173,42
|
||||||
DEFPUSHBUTTON "OK",IDOK,41,312,50,14
|
DEFPUSHBUTTON "OK",IDOK,41,312,50,14
|
||||||
LTEXT "Renderer:",IDC_STATIC,6,57,34,8
|
LTEXT "Renderer:",IDC_STATIC,6,57,34,8
|
||||||
COMBOBOX IDC_RENDERER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_RENDERER,70,55,111,118,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Interlacing (F5):",IDC_STATIC,6,73,81,8
|
LTEXT "Interlacing (F5):",IDC_STATIC,6,73,81,8
|
||||||
COMBOBOX IDC_INTERLACE,70,70,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_INTERLACE,70,70,111,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Custom resolution:",IDC_STATIC,26,135,65,8
|
LTEXT "Custom resolution:",IDC_STATIC,26,135,65,8
|
||||||
EDITTEXT IDC_RESX_EDIT,92,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESX_EDIT,92,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,135,11,14
|
CONTROL "",IDC_RESX,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,120,135,11,14
|
||||||
EDITTEXT IDC_RESY_EDIT,130,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_RESY_EDIT,130,132,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,130,11,14
|
CONTROL "",IDC_RESY,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,154,130,11,14
|
||||||
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,105,33,10
|
CONTROL "Native",IDC_NATIVERES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,105,33,10
|
||||||
LTEXT "Rendering threads:",IDC_STATIC,19,214,63,8
|
LTEXT "Rendering threads:",IDC_STATIC,19,214,63,8
|
||||||
EDITTEXT IDC_SWTHREADS_EDIT,87,212,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SWTHREADS_EDIT,87,212,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,115,215,11,14
|
CONTROL "",IDC_SWTHREADS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,115,215,11,14
|
||||||
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,117,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_UPSCALE_MULTIPLIER,92,117,74,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
LTEXT "Or use Scaling:",IDC_STATIC,38,120,49,8
|
LTEXT "Or use Scaling:",IDC_STATIC,38,120,49,8
|
||||||
LTEXT "Original PS2 resolution :",IDC_STATIC,10,105,80,8
|
LTEXT "Original PS2 resolution :",IDC_STATIC,10,105,80,8
|
||||||
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,230,93,10
|
CONTROL "Edge anti-aliasing (AA1)",IDC_AA1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,230,93,10
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,95,312,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,95,312,50,14
|
||||||
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44
|
CONTROL 2021,IDC_LOGO9,"Static",SS_BITMAP,6,6,175,44
|
||||||
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,275,51,10
|
CONTROL "Alpha Hack",IDC_ALPHAHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,275,51,10
|
||||||
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,87,275,51,10
|
CONTROL "Offset Hack",IDC_OFFSETHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,87,275,51,10
|
||||||
GROUPBOX "Hacks",IDC_USERHACKS,6,250,175,55,BS_CENTER
|
GROUPBOX "Hacks",IDC_USERHACKS,6,250,175,55,BS_CENTER
|
||||||
EDITTEXT IDC_SKIPDRAWHACKEDIT,65,286,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_SKIPDRAWHACKEDIT,65,286,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,104,288,11,14
|
CONTROL "",IDC_SKIPDRAWHACK,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,104,288,11,14
|
||||||
LTEXT "Skipdraw Hack:",IDC_STATIC_TEXT_SKIPDRAW,11,289,50,8
|
LTEXT "Skipdraw Hack:",IDC_STATIC_TEXT_SKIPDRAW,11,289,50,8
|
||||||
EDITTEXT IDC_MSAAEDIT,69,260,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_MSAAEDIT,69,260,35,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,103,263,11,14
|
CONTROL "",IDC_MSAA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,103,263,11,14
|
||||||
GROUPBOX "D3D Internal resolution (can cause glitches)",IDC_STATIC,6,87,175,64,BS_CENTER
|
GROUPBOX "D3D Internal resolution (can cause glitches)",IDC_STATIC,6,87,175,64,BS_CENTER
|
||||||
GROUPBOX "Software Mode Settings",IDC_STATIC,6,198,175,50,BS_CENTER
|
GROUPBOX "Software Mode Settings",IDC_STATIC,6,198,175,50,BS_CENTER
|
||||||
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,152,175,45,BS_CENTER
|
GROUPBOX "Hardware Mode Settings",IDC_STATIC,6,152,175,45,BS_CENTER
|
||||||
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,166,58,10
|
CONTROL "Logarithmic Z",IDC_LOGZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,166,58,10
|
||||||
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,179,87,10
|
CONTROL "Alpha correction (FBA)",IDC_FBA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,88,179,87,10
|
||||||
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,179,82,10
|
CONTROL "Allow 8-bit textures",IDC_PALTEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,179,82,10
|
||||||
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,6,165,67,10
|
CONTROL "Texture filtering",IDC_FILTER,"Button",BS_AUTO3STATE | WS_TABSTOP,6,165,67,10
|
||||||
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,11,263,53,8
|
LTEXT "HW Anti Aliasing",IDC_STATIC_TEXT_HWAA,11,263,53,8
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// DESIGNINFO
|
// DESIGNINFO
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO
|
GUIDELINES DESIGNINFO
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_CONFIG, DIALOG
|
IDD_CONFIG, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 182
|
RIGHTMARGIN, 182
|
||||||
VERTGUIDE, 71
|
VERTGUIDE, 71
|
||||||
VERTGUIDE, 89
|
VERTGUIDE, 89
|
||||||
VERTGUIDE, 182
|
VERTGUIDE, 182
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 344
|
BOTTOMMARGIN, 344
|
||||||
HORZGUIDE, 49
|
HORZGUIDE, 49
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CAPTURE, DIALOG
|
IDD_CAPTURE, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
VERTGUIDE, 6
|
VERTGUIDE, 6
|
||||||
VERTGUIDE, 30
|
VERTGUIDE, 30
|
||||||
VERTGUIDE, 271
|
VERTGUIDE, 271
|
||||||
HORZGUIDE, 54
|
HORZGUIDE, 54
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_GPUCONFIG, DIALOG
|
IDD_GPUCONFIG, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 182
|
RIGHTMARGIN, 182
|
||||||
VERTGUIDE, 78
|
VERTGUIDE, 78
|
||||||
VERTGUIDE, 182
|
VERTGUIDE, 182
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 192
|
BOTTOMMARGIN, 192
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_CONFIG2, DIALOG
|
IDD_CONFIG2, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 6
|
LEFTMARGIN, 6
|
||||||
RIGHTMARGIN, 181
|
RIGHTMARGIN, 181
|
||||||
VERTGUIDE, 87
|
VERTGUIDE, 87
|
||||||
TOPMARGIN, 6
|
TOPMARGIN, 6
|
||||||
BOTTOMMARGIN, 334
|
BOTTOMMARGIN, 334
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Version
|
// Version
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,1,9
|
FILEVERSION 1,0,1,9
|
||||||
PRODUCTVERSION 1,0,1,9
|
PRODUCTVERSION 1,0,1,9
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
#else
|
#else
|
||||||
FILEFLAGS 0x0L
|
FILEFLAGS 0x0L
|
||||||
#endif
|
#endif
|
||||||
FILEOS 0x4L
|
FILEOS 0x4L
|
||||||
FILETYPE 0x2L
|
FILETYPE 0x2L
|
||||||
FILESUBTYPE 0x0L
|
FILESUBTYPE 0x0L
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904e4"
|
BLOCK "040904e4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "http://guliverkli.sf.net/"
|
VALUE "Comments", "http://guliverkli.sf.net/"
|
||||||
VALUE "CompanyName", "Gabest"
|
VALUE "CompanyName", "Gabest"
|
||||||
VALUE "FileDescription", "GS plugin for ps2 emulators"
|
VALUE "FileDescription", "GS plugin for ps2 emulators"
|
||||||
VALUE "FileVersion", "1, 0, 1, 9"
|
VALUE "FileVersion", "1, 0, 1, 9"
|
||||||
VALUE "InternalName", "GSdx.dll"
|
VALUE "InternalName", "GSdx.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (c) 2007-2008 Gabest. All rights reserved."
|
VALUE "LegalCopyright", "Copyright (c) 2007-2008 Gabest. All rights reserved."
|
||||||
VALUE "OriginalFilename", "GSdx.dll"
|
VALUE "OriginalFilename", "GSdx.dll"
|
||||||
VALUE "ProductName", "GSdx"
|
VALUE "ProductName", "GSdx"
|
||||||
VALUE "ProductVersion", "1, 0, 1, 9"
|
VALUE "ProductVersion", "1, 0, 1, 9"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x409, 1252
|
VALUE "Translation", 0x409, 1252
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
#ifndef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
//
|
//
|
||||||
#include "res/tfx.fx"
|
#include "res/tfx.fx"
|
||||||
#include "res/convert.fx"
|
#include "res/convert.fx"
|
||||||
#include "res/interlace.fx"
|
#include "res/interlace.fx"
|
||||||
#include "res/merge.fx"
|
#include "res/merge.fx"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#endif // not APSTUDIO_INVOKED
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,142 +1,142 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// File: Activex.rcv
|
// File: Activex.rcv
|
||||||
//
|
//
|
||||||
// Desc: DirectShow base classes - this file defines the version resource
|
// Desc: DirectShow base classes - this file defines the version resource
|
||||||
// used for the application.
|
// used for the application.
|
||||||
//
|
//
|
||||||
// NOTE: All strings MUST have an explicit \0 for termination!
|
// NOTE: All strings MUST have an explicit \0 for termination!
|
||||||
//
|
//
|
||||||
// For a complete description of the Version Resource, search the
|
// For a complete description of the Version Resource, search the
|
||||||
// Microsoft Developer's Network (MSDN) CD-ROM for 'version resource'..
|
// Microsoft Developer's Network (MSDN) CD-ROM for 'version resource'..
|
||||||
//
|
//
|
||||||
// Copyright (c) 1992 - 2002, Microsoft Corporation. All rights reserved.
|
// Copyright (c) 1992 - 2002, Microsoft Corporation. All rights reserved.
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ACTIVEX_RCV_
|
#ifndef _ACTIVEX_RCV_
|
||||||
#define _ACTIVEX_RCV_
|
#define _ACTIVEX_RCV_
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#define WIN32
|
#define WIN32
|
||||||
#endif
|
#endif
|
||||||
#include <winver.h>
|
#include <winver.h>
|
||||||
|
|
||||||
#ifndef _ACTIVEX_VER_
|
#ifndef _ACTIVEX_VER_
|
||||||
#include <activex.ver>
|
#include <activex.ver>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version flags.
|
// Version flags.
|
||||||
//
|
//
|
||||||
// OFFICIAL and FINAL should be defined when appropriate.
|
// OFFICIAL and FINAL should be defined when appropriate.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef OFFICIAL
|
#ifndef OFFICIAL
|
||||||
#define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
|
#define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD
|
||||||
#else
|
#else
|
||||||
#define VER_PRIVATEBUILD 0
|
#define VER_PRIVATEBUILD 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FINAL
|
#ifndef FINAL
|
||||||
#define VER_PRERELEASE VS_FF_PRERELEASE
|
#define VER_PRERELEASE VS_FF_PRERELEASE
|
||||||
#else
|
#else
|
||||||
#define VER_PRERELEASE 0
|
#define VER_PRERELEASE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define VER_DEBUG VS_FF_DEBUG
|
#define VER_DEBUG VS_FF_DEBUG
|
||||||
#else
|
#else
|
||||||
#define VER_DEBUG 0
|
#define VER_DEBUG 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version definitions
|
// Version definitions
|
||||||
//
|
//
|
||||||
|
|
||||||
#define VERSION_RES_FLAGSMASK 0x0030003FL
|
#define VERSION_RES_FLAGSMASK 0x0030003FL
|
||||||
#define VERSION_RES_FLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
|
#define VERSION_RES_FLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
|
||||||
|
|
||||||
#ifndef VERSION_RES_OS
|
#ifndef VERSION_RES_OS
|
||||||
#define VERSION_RES_OS VOS__WINDOWS32
|
#define VERSION_RES_OS VOS__WINDOWS32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VERSION_RES_TYPE
|
#ifndef VERSION_RES_TYPE
|
||||||
#define VERSION_RES_TYPE VFT_DLL
|
#define VERSION_RES_TYPE VFT_DLL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VERSION_RES_SUBTYPE
|
#ifndef VERSION_RES_SUBTYPE
|
||||||
#define VERSION_RES_SUBTYPE VFT2_UNKNOWN
|
#define VERSION_RES_SUBTYPE VFT2_UNKNOWN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define VERSION_RES_LANGUAGE 0x409
|
#define VERSION_RES_LANGUAGE 0x409
|
||||||
|
|
||||||
#ifndef VERSION_RES_CHARSET
|
#ifndef VERSION_RES_CHARSET
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define VERSION_RES_CHARSET 1200
|
#define VERSION_RES_CHARSET 1200
|
||||||
#else
|
#else
|
||||||
#define VERSION_RES_CHARSET 1252
|
#define VERSION_RES_CHARSET 1252
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VERSION_RES_ACTIVEX
|
#ifndef VERSION_RES_ACTIVEX
|
||||||
#define VERSION_RES_ACTIVEX "Filter dll\0"
|
#define VERSION_RES_ACTIVEX "Filter dll\0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef AMOVIE_SELF_REGISTER
|
#ifdef AMOVIE_SELF_REGISTER
|
||||||
#ifndef OLE_SELF_REGISTER
|
#ifndef OLE_SELF_REGISTER
|
||||||
#define OLE_SELF_REGISTER
|
#define OLE_SELF_REGISTER
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OLE_SELF_REGISTER
|
#ifdef OLE_SELF_REGISTER
|
||||||
#ifdef AMOVIE_SELF_REGISTER
|
#ifdef AMOVIE_SELF_REGISTER
|
||||||
#define VERSION_RES_SELFREGISTER "AM20\0"
|
#define VERSION_RES_SELFREGISTER "AM20\0"
|
||||||
#else
|
#else
|
||||||
#define VERSION_RES_SELFREGISTER "\0"
|
#define VERSION_RES_SELFREGISTER "\0"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Version resource
|
// Version resource
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION VERSION_RES_MAJOR_VER, VERSION_RES_MINOR_VER, 0, VERSION_RES_BUILD
|
FILEVERSION VERSION_RES_MAJOR_VER, VERSION_RES_MINOR_VER, 0, VERSION_RES_BUILD
|
||||||
PRODUCTVERSION VERSION_RES_MAJOR_VER, VERSION_RES_MINOR_VER, 0, VERSION_RES_BUILD
|
PRODUCTVERSION VERSION_RES_MAJOR_VER, VERSION_RES_MINOR_VER, 0, VERSION_RES_BUILD
|
||||||
FILEFLAGSMASK VERSION_RES_FLAGSMASK
|
FILEFLAGSMASK VERSION_RES_FLAGSMASK
|
||||||
FILEFLAGS VERSION_RES_FLAGS
|
FILEFLAGS VERSION_RES_FLAGS
|
||||||
FILEOS VERSION_RES_OS
|
FILEOS VERSION_RES_OS
|
||||||
FILETYPE VERSION_RES_TYPE
|
FILETYPE VERSION_RES_TYPE
|
||||||
FILESUBTYPE VERSION_RES_SUBTYPE
|
FILESUBTYPE VERSION_RES_SUBTYPE
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", VERSION_RES_COMPANY_NAME
|
VALUE "CompanyName", VERSION_RES_COMPANY_NAME
|
||||||
VALUE "Comment", VERSION_RES_COMMENT
|
VALUE "Comment", VERSION_RES_COMMENT
|
||||||
VALUE "FileDescription", VERSION_RES_BIN_DESCRIPTION
|
VALUE "FileDescription", VERSION_RES_BIN_DESCRIPTION
|
||||||
VALUE "FileVersion", VERSION_RES_STRING
|
VALUE "FileVersion", VERSION_RES_STRING
|
||||||
VALUE "InternalName", VERSION_RES_BIN_NAME
|
VALUE "InternalName", VERSION_RES_BIN_NAME
|
||||||
VALUE "LegalCopyright", VERSION_RES_COPYRIGHT
|
VALUE "LegalCopyright", VERSION_RES_COPYRIGHT
|
||||||
VALUE "OriginalFilename", VERSION_RES_BIN_NAME
|
VALUE "OriginalFilename", VERSION_RES_BIN_NAME
|
||||||
VALUE "ProductName", VERSION_RES_PRODUCT_NAME
|
VALUE "ProductName", VERSION_RES_PRODUCT_NAME
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
VALUE "ProductVersion", VERSION_RES_STRING_D
|
VALUE "ProductVersion", VERSION_RES_STRING_D
|
||||||
#else
|
#else
|
||||||
VALUE "ProductVersion", VERSION_RES_STRING
|
VALUE "ProductVersion", VERSION_RES_STRING
|
||||||
#endif
|
#endif
|
||||||
VALUE "ActiveMovie", VERSION_RES_ACTIVEX
|
VALUE "ActiveMovie", VERSION_RES_ACTIVEX
|
||||||
#ifdef OLE_SELF_REGISTER
|
#ifdef OLE_SELF_REGISTER
|
||||||
VALUE "OLESelfRegister", VERSION_RES_SELFREGISTER
|
VALUE "OLESelfRegister", VERSION_RES_SELFREGISTER
|
||||||
#endif
|
#endif
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", VERSION_RES_LANGUAGE, VERSION_RES_CHARSET
|
VALUE "Translation", VERSION_RES_LANGUAGE, VERSION_RES_CHARSET
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _ACTIVEX_RCV_
|
// _ACTIVEX_RCV_
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// File: Activex.ver
|
// File: Activex.ver
|
||||||
//
|
//
|
||||||
// Desc: DirectShow base classes - common versioning information for
|
// Desc: DirectShow base classes - common versioning information for
|
||||||
// ACTIVEX binaries.
|
// ACTIVEX binaries.
|
||||||
//
|
//
|
||||||
// Copyright (c) 1996-2002, Microsoft Corporation. All rights reserved.
|
// Copyright (c) 1996-2002, Microsoft Corporation. All rights reserved.
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ACTIVEX_VER_
|
#ifndef _ACTIVEX_VER_
|
||||||
#define _ACTIVEX_VER_
|
#define _ACTIVEX_VER_
|
||||||
|
|
||||||
// NOTE: all string resources that will be used in ACTIVEX.RCV for the
|
// NOTE: all string resources that will be used in ACTIVEX.RCV for the
|
||||||
// version resource information *MUST* have an explicit \0 terminator!
|
// version resource information *MUST* have an explicit \0 terminator!
|
||||||
|
|
||||||
#define VERSION_RES_MAJOR_VER 9
|
#define VERSION_RES_MAJOR_VER 9
|
||||||
#define VERSION_RES_MINOR_VER 0
|
#define VERSION_RES_MINOR_VER 0
|
||||||
#define VERSION_RES_BUILD 0
|
#define VERSION_RES_BUILD 0
|
||||||
|
|
||||||
#define VERSION_RES_STRING_D "9.00 (Debug)\0"
|
#define VERSION_RES_STRING_D "9.00 (Debug)\0"
|
||||||
#define VERSION_RES_STRING "9.00\0"
|
#define VERSION_RES_STRING "9.00\0"
|
||||||
|
|
||||||
#define VERSION_RES_PRODUCT_NAME "DirectX 9.0 Sample\0"
|
#define VERSION_RES_PRODUCT_NAME "DirectX 9.0 Sample\0"
|
||||||
#define VERSION_RES_COMMENT "DirectShow Sample\0"
|
#define VERSION_RES_COMMENT "DirectShow Sample\0"
|
||||||
#define VERSION_RES_COMPANY_NAME "Microsoft Corporation\0"
|
#define VERSION_RES_COMPANY_NAME "Microsoft Corporation\0"
|
||||||
#define VERSION_RES_COPYRIGHT "Copyright (C) 1992-2002 Microsoft Corporation\0"
|
#define VERSION_RES_COPYRIGHT "Copyright (C) 1992-2002 Microsoft Corporation\0"
|
||||||
|
|
||||||
// The following defines are required on a file-by-file basis
|
// The following defines are required on a file-by-file basis
|
||||||
//
|
//
|
||||||
// #define VERSION_RES_BIN_NAME "sample.ax\0"
|
// #define VERSION_RES_BIN_NAME "sample.ax\0"
|
||||||
// #define VERSION_RES_BIN_DESCRIPTION "Sample Filter\0"
|
// #define VERSION_RES_BIN_DESCRIPTION "Sample Filter\0"
|
||||||
//
|
//
|
||||||
// Also required, if you don't want the defaults, are
|
// Also required, if you don't want the defaults, are
|
||||||
//
|
//
|
||||||
// #define VERSION_RES_ACTIVEX "Filter dll\0" (the default value)
|
// #define VERSION_RES_ACTIVEX "Filter dll\0" (the default value)
|
||||||
//
|
//
|
||||||
// A string defining the type of component.
|
// A string defining the type of component.
|
||||||
//
|
//
|
||||||
// #define VERSION_RES_TYPE VFT_DLL (default)
|
// #define VERSION_RES_TYPE VFT_DLL (default)
|
||||||
// VFT_APP
|
// VFT_APP
|
||||||
// VFT_VXD
|
// VFT_VXD
|
||||||
// VFT_DRV
|
// VFT_DRV
|
||||||
// VFT_FONT
|
// VFT_FONT
|
||||||
// VFT_STATIC_LIB
|
// VFT_STATIC_LIB
|
||||||
// VFT_UNKNOWN
|
// VFT_UNKNOWN
|
||||||
//
|
//
|
||||||
// #define VERSION_RES_SUBTYPE VFT2_UNKNOWN (default)
|
// #define VERSION_RES_SUBTYPE VFT2_UNKNOWN (default)
|
||||||
// VFT2_DRV_INSTALLABLE
|
// VFT2_DRV_INSTALLABLE
|
||||||
// VFT2_DRV_SOUND
|
// VFT2_DRV_SOUND
|
||||||
// <several other options>
|
// <several other options>
|
||||||
//
|
//
|
||||||
// See winver.h for further details
|
// See winver.h for further details
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,130 +1,130 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// File: DDMM.cpp
|
// File: DDMM.cpp
|
||||||
//
|
//
|
||||||
// Desc: DirectShow base classes - implements routines for using DirectDraw
|
// Desc: DirectShow base classes - implements routines for using DirectDraw
|
||||||
// on a multimonitor system.
|
// on a multimonitor system.
|
||||||
//
|
//
|
||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
//#include <strsafe.h>
|
//#include <strsafe.h>
|
||||||
#include <strmif.h>
|
#include <strmif.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include "ddmm.h"
|
#include "ddmm.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FindDeviceCallback
|
* FindDeviceCallback
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
LPSTR szDevice;
|
LPSTR szDevice;
|
||||||
GUID* lpGUID;
|
GUID* lpGUID;
|
||||||
GUID GUID;
|
GUID GUID;
|
||||||
BOOL fFound;
|
BOOL fFound;
|
||||||
} FindDeviceData;
|
} FindDeviceData;
|
||||||
|
|
||||||
BOOL CALLBACK FindDeviceCallback(GUID* lpGUID, LPSTR szName, LPSTR szDevice, LPVOID lParam)
|
BOOL CALLBACK FindDeviceCallback(GUID* lpGUID, LPSTR szName, LPSTR szDevice, LPVOID lParam)
|
||||||
{
|
{
|
||||||
FindDeviceData *p = (FindDeviceData*)lParam;
|
FindDeviceData *p = (FindDeviceData*)lParam;
|
||||||
|
|
||||||
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
|
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
|
||||||
if (lpGUID) {
|
if (lpGUID) {
|
||||||
p->GUID = *lpGUID;
|
p->GUID = *lpGUID;
|
||||||
p->lpGUID = &p->GUID;
|
p->lpGUID = &p->GUID;
|
||||||
} else {
|
} else {
|
||||||
p->lpGUID = NULL;
|
p->lpGUID = NULL;
|
||||||
}
|
}
|
||||||
p->fFound = TRUE;
|
p->fFound = TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL CALLBACK FindDeviceCallbackEx(GUID* lpGUID, LPSTR szName, LPSTR szDevice, LPVOID lParam, HMONITOR hMonitor)
|
BOOL CALLBACK FindDeviceCallbackEx(GUID* lpGUID, LPSTR szName, LPSTR szDevice, LPVOID lParam, HMONITOR hMonitor)
|
||||||
{
|
{
|
||||||
FindDeviceData *p = (FindDeviceData*)lParam;
|
FindDeviceData *p = (FindDeviceData*)lParam;
|
||||||
|
|
||||||
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
|
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
|
||||||
if (lpGUID) {
|
if (lpGUID) {
|
||||||
p->GUID = *lpGUID;
|
p->GUID = *lpGUID;
|
||||||
p->lpGUID = &p->GUID;
|
p->lpGUID = &p->GUID;
|
||||||
} else {
|
} else {
|
||||||
p->lpGUID = NULL;
|
p->lpGUID = NULL;
|
||||||
}
|
}
|
||||||
p->fFound = TRUE;
|
p->fFound = TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DirectDrawCreateFromDevice
|
* DirectDrawCreateFromDevice
|
||||||
*
|
*
|
||||||
* create a DirectDraw object for a particular device
|
* create a DirectDraw object for a particular device
|
||||||
*/
|
*/
|
||||||
IDirectDraw * DirectDrawCreateFromDevice(LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, PDRAWENUM DirectDrawEnumerateP)
|
IDirectDraw * DirectDrawCreateFromDevice(LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, PDRAWENUM DirectDrawEnumerateP)
|
||||||
{
|
{
|
||||||
IDirectDraw* pdd = NULL;
|
IDirectDraw* pdd = NULL;
|
||||||
FindDeviceData find;
|
FindDeviceData find;
|
||||||
|
|
||||||
if (szDevice == NULL) {
|
if (szDevice == NULL) {
|
||||||
DirectDrawCreateP(NULL, &pdd, NULL);
|
DirectDrawCreateP(NULL, &pdd, NULL);
|
||||||
return pdd;
|
return pdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
find.szDevice = szDevice;
|
find.szDevice = szDevice;
|
||||||
find.fFound = FALSE;
|
find.fFound = FALSE;
|
||||||
DirectDrawEnumerateP(FindDeviceCallback, (LPVOID)&find);
|
DirectDrawEnumerateP(FindDeviceCallback, (LPVOID)&find);
|
||||||
|
|
||||||
if (find.fFound)
|
if (find.fFound)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// In 4bpp mode the following DDraw call causes a message box to be popped
|
// In 4bpp mode the following DDraw call causes a message box to be popped
|
||||||
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
|
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
|
||||||
// make sure it doesn't happen.
|
// make sure it doesn't happen.
|
||||||
//
|
//
|
||||||
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||||
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
|
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
|
||||||
SetErrorMode(ErrorMode);
|
SetErrorMode(ErrorMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pdd;
|
return pdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DirectDrawCreateFromDeviceEx
|
* DirectDrawCreateFromDeviceEx
|
||||||
*
|
*
|
||||||
* create a DirectDraw object for a particular device
|
* create a DirectDraw object for a particular device
|
||||||
*/
|
*/
|
||||||
IDirectDraw * DirectDrawCreateFromDeviceEx(LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, LPDIRECTDRAWENUMERATEEXA DirectDrawEnumerateExP)
|
IDirectDraw * DirectDrawCreateFromDeviceEx(LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, LPDIRECTDRAWENUMERATEEXA DirectDrawEnumerateExP)
|
||||||
{
|
{
|
||||||
IDirectDraw* pdd = NULL;
|
IDirectDraw* pdd = NULL;
|
||||||
FindDeviceData find;
|
FindDeviceData find;
|
||||||
|
|
||||||
if (szDevice == NULL) {
|
if (szDevice == NULL) {
|
||||||
DirectDrawCreateP(NULL, &pdd, NULL);
|
DirectDrawCreateP(NULL, &pdd, NULL);
|
||||||
return pdd;
|
return pdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
find.szDevice = szDevice;
|
find.szDevice = szDevice;
|
||||||
find.fFound = FALSE;
|
find.fFound = FALSE;
|
||||||
DirectDrawEnumerateExP(FindDeviceCallbackEx, (LPVOID)&find,
|
DirectDrawEnumerateExP(FindDeviceCallbackEx, (LPVOID)&find,
|
||||||
DDENUM_ATTACHEDSECONDARYDEVICES);
|
DDENUM_ATTACHEDSECONDARYDEVICES);
|
||||||
|
|
||||||
if (find.fFound)
|
if (find.fFound)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// In 4bpp mode the following DDraw call causes a message box to be popped
|
// In 4bpp mode the following DDraw call causes a message box to be popped
|
||||||
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
|
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
|
||||||
// make sure it doesn't happen.
|
// make sure it doesn't happen.
|
||||||
//
|
//
|
||||||
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
|
||||||
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
|
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
|
||||||
SetErrorMode(ErrorMode);
|
SetErrorMode(ErrorMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pdd;
|
return pdd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,242 +1,242 @@
|
||||||
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
||||||
#if SHADER_MODEL >= 0x400
|
#if SHADER_MODEL >= 0x400
|
||||||
|
|
||||||
struct VS_INPUT
|
struct VS_INPUT
|
||||||
{
|
{
|
||||||
float4 p : POSITION;
|
float4 p : POSITION;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VS_OUTPUT
|
struct VS_OUTPUT
|
||||||
{
|
{
|
||||||
float4 p : SV_Position;
|
float4 p : SV_Position;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Texture2D Texture;
|
Texture2D Texture;
|
||||||
SamplerState TextureSampler;
|
SamplerState TextureSampler;
|
||||||
|
|
||||||
float4 sample_c(float2 uv)
|
float4 sample_c(float2 uv)
|
||||||
{
|
{
|
||||||
return Texture.Sample(TextureSampler, uv);
|
return Texture.Sample(TextureSampler, uv);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PS_INPUT
|
struct PS_INPUT
|
||||||
{
|
{
|
||||||
float4 p : SV_Position;
|
float4 p : SV_Position;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PS_OUTPUT
|
struct PS_OUTPUT
|
||||||
{
|
{
|
||||||
float4 c : SV_Target0;
|
float4 c : SV_Target0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#elif SHADER_MODEL <= 0x300
|
#elif SHADER_MODEL <= 0x300
|
||||||
|
|
||||||
struct VS_INPUT
|
struct VS_INPUT
|
||||||
{
|
{
|
||||||
float4 p : POSITION;
|
float4 p : POSITION;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VS_OUTPUT
|
struct VS_OUTPUT
|
||||||
{
|
{
|
||||||
float4 p : POSITION;
|
float4 p : POSITION;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PS_INPUT
|
struct PS_INPUT
|
||||||
{
|
{
|
||||||
#if SHADER_MODEL < 0x300
|
#if SHADER_MODEL < 0x300
|
||||||
float4 p : TEXCOORD1;
|
float4 p : TEXCOORD1;
|
||||||
#else
|
#else
|
||||||
float4 p : VPOS;
|
float4 p : VPOS;
|
||||||
#endif
|
#endif
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PS_OUTPUT
|
struct PS_OUTPUT
|
||||||
{
|
{
|
||||||
float4 c : COLOR;
|
float4 c : COLOR;
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler Texture : register(s0);
|
sampler Texture : register(s0);
|
||||||
|
|
||||||
float4 sample_c(float2 uv)
|
float4 sample_c(float2 uv)
|
||||||
{
|
{
|
||||||
return tex2D(Texture, uv);
|
return tex2D(Texture, uv);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VS_OUTPUT vs_main(VS_INPUT input)
|
VS_OUTPUT vs_main(VS_INPUT input)
|
||||||
{
|
{
|
||||||
VS_OUTPUT output;
|
VS_OUTPUT output;
|
||||||
|
|
||||||
output.p = input.p;
|
output.p = input.p;
|
||||||
output.t = input.t;
|
output.t = input.t;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main0(PS_INPUT input)
|
PS_OUTPUT ps_main0(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
output.c = sample_c(input.t);
|
output.c = sample_c(input.t);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_crt(PS_INPUT input, int i)
|
float4 ps_crt(PS_INPUT input, int i)
|
||||||
{
|
{
|
||||||
float4 mask[4] =
|
float4 mask[4] =
|
||||||
{
|
{
|
||||||
float4(1, 0, 0, 0),
|
float4(1, 0, 0, 0),
|
||||||
float4(0, 1, 0, 0),
|
float4(0, 1, 0, 0),
|
||||||
float4(0, 0, 1, 0),
|
float4(0, 0, 1, 0),
|
||||||
float4(1, 1, 1, 0)
|
float4(1, 1, 1, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
return sample_c(input.t) * saturate(mask[i] + 0.5f);
|
return sample_c(input.t) * saturate(mask[i] + 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SHADER_MODEL >= 0x400
|
#if SHADER_MODEL >= 0x400
|
||||||
|
|
||||||
uint ps_main1(PS_INPUT input) : SV_Target0
|
uint ps_main1(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
float4 c = sample_c(input.t);
|
float4 c = sample_c(input.t);
|
||||||
|
|
||||||
c.a *= 256.0f / 127; // hm, 0.5 won't give us 1.0 if we just multiply with 2
|
c.a *= 256.0f / 127; // hm, 0.5 won't give us 1.0 if we just multiply with 2
|
||||||
|
|
||||||
uint4 i = c * float4(0x001f, 0x03e0, 0x7c00, 0x8000);
|
uint4 i = c * float4(0x001f, 0x03e0, 0x7c00, 0x8000);
|
||||||
|
|
||||||
return (i.x & 0x001f) | (i.y & 0x03e0) | (i.z & 0x7c00) | (i.w & 0x8000);
|
return (i.x & 0x001f) | (i.y & 0x03e0) | (i.z & 0x7c00) | (i.w & 0x8000);
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main2(PS_INPUT input)
|
PS_OUTPUT ps_main2(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
clip(sample_c(input.t).a - 128.0f / 255); // >= 0x80 pass
|
clip(sample_c(input.t).a - 128.0f / 255); // >= 0x80 pass
|
||||||
|
|
||||||
output.c = 0;
|
output.c = 0;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main3(PS_INPUT input)
|
PS_OUTPUT ps_main3(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
clip(127.95f / 255 - sample_c(input.t).a); // < 0x80 pass (== 0x80 should not pass)
|
clip(127.95f / 255 - sample_c(input.t).a); // < 0x80 pass (== 0x80 should not pass)
|
||||||
|
|
||||||
output.c = 0;
|
output.c = 0;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main4(PS_INPUT input)
|
PS_OUTPUT ps_main4(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
output.c = fmod(sample_c(input.t) * 255 + 0.5f, 256) / 255;
|
output.c = fmod(sample_c(input.t) * 255 + 0.5f, 256) / 255;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
uint4 p = (uint4)input.p;
|
uint4 p = (uint4)input.p;
|
||||||
|
|
||||||
// output.c = ps_crt(input, ((p.x + (p.y & 1) * 3) >> 1) % 3);
|
// output.c = ps_crt(input, ((p.x + (p.y & 1) * 3) >> 1) % 3);
|
||||||
output.c = ps_crt(input, ((p.x + ((p.y >> 1) & 1) * 3) >> 1) % 3);
|
output.c = ps_crt(input, ((p.x + ((p.y >> 1) & 1) * 3) >> 1) % 3);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
uint4 p = (uint4)input.p;
|
uint4 p = (uint4)input.p;
|
||||||
|
|
||||||
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif SHADER_MODEL <= 0x300
|
#elif SHADER_MODEL <= 0x300
|
||||||
|
|
||||||
PS_OUTPUT ps_main1(PS_INPUT input)
|
PS_OUTPUT ps_main1(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
float4 c = sample_c(input.t);
|
float4 c = sample_c(input.t);
|
||||||
|
|
||||||
c.a *= 128.0f / 255; // *= 0.5f is no good here, need to do this in order to get 0x80 for 1.0f (instead of 0x7f)
|
c.a *= 128.0f / 255; // *= 0.5f is no good here, need to do this in order to get 0x80 for 1.0f (instead of 0x7f)
|
||||||
|
|
||||||
output.c = c;
|
output.c = c;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main2(PS_INPUT input)
|
PS_OUTPUT ps_main2(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
clip(sample_c(input.t).a - 255.0f / 255); // >= 0x80 pass
|
clip(sample_c(input.t).a - 255.0f / 255); // >= 0x80 pass
|
||||||
|
|
||||||
output.c = 0;
|
output.c = 0;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main3(PS_INPUT input)
|
PS_OUTPUT ps_main3(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
clip(254.95f / 255 - sample_c(input.t).a); // < 0x80 pass (== 0x80 should not pass)
|
clip(254.95f / 255 - sample_c(input.t).a); // < 0x80 pass (== 0x80 should not pass)
|
||||||
|
|
||||||
output.c = 0;
|
output.c = 0;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main4(PS_INPUT input)
|
PS_OUTPUT ps_main4(PS_INPUT input)
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
output.c = 1;
|
output.c = 1;
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
PS_OUTPUT ps_main5(PS_INPUT input) // triangular
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
int4 p = (int4)input.p;
|
int4 p = (int4)input.p;
|
||||||
|
|
||||||
// output.c = ps_crt(input, ((p.x + (p.y % 2) * 3) / 2) % 3);
|
// output.c = ps_crt(input, ((p.x + (p.y % 2) * 3) / 2) % 3);
|
||||||
output.c = ps_crt(input, ((p.x + ((p.y / 2) % 2) * 3) / 2) % 3);
|
output.c = ps_crt(input, ((p.x + ((p.y / 2) % 2) * 3) / 2) % 3);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
PS_OUTPUT ps_main6(PS_INPUT input) // diagonal
|
||||||
{
|
{
|
||||||
PS_OUTPUT output;
|
PS_OUTPUT output;
|
||||||
|
|
||||||
int4 p = (int4)input.p;
|
int4 p = (int4)input.p;
|
||||||
|
|
||||||
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
output.c = ps_crt(input, (p.x + (p.y % 3)) % 3);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
||||||
#if SHADER_MODEL >= 0x400
|
#if SHADER_MODEL >= 0x400
|
||||||
|
|
||||||
Texture2D Texture;
|
Texture2D Texture;
|
||||||
SamplerState Sampler;
|
SamplerState Sampler;
|
||||||
|
|
||||||
cbuffer cb0
|
cbuffer cb0
|
||||||
{
|
{
|
||||||
float2 ZrH;
|
float2 ZrH;
|
||||||
float hH;
|
float hH;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PS_INPUT
|
struct PS_INPUT
|
||||||
{
|
{
|
||||||
float4 p : SV_Position;
|
float4 p : SV_Position;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 ps_main0(PS_INPUT input) : SV_Target0
|
float4 ps_main0(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
clip(frac(input.t.y * hH) - 0.5);
|
clip(frac(input.t.y * hH) - 0.5);
|
||||||
|
|
||||||
return Texture.Sample(Sampler, input.t);
|
return Texture.Sample(Sampler, input.t);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main1(PS_INPUT input) : SV_Target0
|
float4 ps_main1(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
clip(0.5 - frac(input.t.y * hH));
|
clip(0.5 - frac(input.t.y * hH));
|
||||||
|
|
||||||
return Texture.Sample(Sampler, input.t);
|
return Texture.Sample(Sampler, input.t);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main2(PS_INPUT input) : SV_Target0
|
float4 ps_main2(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
float4 c0 = Texture.Sample(Sampler, input.t - ZrH);
|
float4 c0 = Texture.Sample(Sampler, input.t - ZrH);
|
||||||
float4 c1 = Texture.Sample(Sampler, input.t);
|
float4 c1 = Texture.Sample(Sampler, input.t);
|
||||||
float4 c2 = Texture.Sample(Sampler, input.t + ZrH);
|
float4 c2 = Texture.Sample(Sampler, input.t + ZrH);
|
||||||
|
|
||||||
return (c0 + c1 * 2 + c2) / 4;
|
return (c0 + c1 * 2 + c2) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main3(PS_INPUT input) : SV_Target0
|
float4 ps_main3(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
return Texture.Sample(Sampler, input.t);
|
return Texture.Sample(Sampler, input.t);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif SHADER_MODEL <= 0x300
|
#elif SHADER_MODEL <= 0x300
|
||||||
|
|
||||||
sampler s0 : register(s0);
|
sampler s0 : register(s0);
|
||||||
|
|
||||||
float4 Params1 : register(c0);
|
float4 Params1 : register(c0);
|
||||||
|
|
||||||
#define ZrH (Params1.xy)
|
#define ZrH (Params1.xy)
|
||||||
#define hH (Params1.z)
|
#define hH (Params1.z)
|
||||||
|
|
||||||
float4 ps_main0(float2 tex : TEXCOORD0) : COLOR
|
float4 ps_main0(float2 tex : TEXCOORD0) : COLOR
|
||||||
{
|
{
|
||||||
clip(frac(tex.y * hH) - 0.5);
|
clip(frac(tex.y * hH) - 0.5);
|
||||||
|
|
||||||
return tex2D(s0, tex);
|
return tex2D(s0, tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main1(float2 tex : TEXCOORD0) : COLOR
|
float4 ps_main1(float2 tex : TEXCOORD0) : COLOR
|
||||||
{
|
{
|
||||||
clip(0.5 - frac(tex.y * hH));
|
clip(0.5 - frac(tex.y * hH));
|
||||||
|
|
||||||
return tex2D(s0, tex);
|
return tex2D(s0, tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main2(float2 tex : TEXCOORD0) : COLOR
|
float4 ps_main2(float2 tex : TEXCOORD0) : COLOR
|
||||||
{
|
{
|
||||||
float4 c0 = tex2D(s0, tex - ZrH);
|
float4 c0 = tex2D(s0, tex - ZrH);
|
||||||
float4 c1 = tex2D(s0, tex);
|
float4 c1 = tex2D(s0, tex);
|
||||||
float4 c2 = tex2D(s0, tex + ZrH);
|
float4 c2 = tex2D(s0, tex + ZrH);
|
||||||
|
|
||||||
return (c0 + c1 * 2 + c2) / 4;
|
return (c0 + c1 * 2 + c2) / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main3(float2 tex : TEXCOORD0) : COLOR
|
float4 ps_main3(float2 tex : TEXCOORD0) : COLOR
|
||||||
{
|
{
|
||||||
return tex2D(s0, tex);
|
return tex2D(s0, tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,60 +1,60 @@
|
||||||
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
#ifdef SHADER_MODEL // make safe to include in resource file to enforce dependency
|
||||||
#if SHADER_MODEL >= 0x400
|
#if SHADER_MODEL >= 0x400
|
||||||
|
|
||||||
Texture2D Texture;
|
Texture2D Texture;
|
||||||
SamplerState Sampler;
|
SamplerState Sampler;
|
||||||
|
|
||||||
cbuffer cb0
|
cbuffer cb0
|
||||||
{
|
{
|
||||||
float4 BGColor;
|
float4 BGColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PS_INPUT
|
struct PS_INPUT
|
||||||
{
|
{
|
||||||
float4 p : SV_Position;
|
float4 p : SV_Position;
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 ps_main0(PS_INPUT input) : SV_Target0
|
float4 ps_main0(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
float4 c = Texture.Sample(Sampler, input.t);
|
float4 c = Texture.Sample(Sampler, input.t);
|
||||||
c.a = min(c.a * 2, 1);
|
c.a = min(c.a * 2, 1);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main1(PS_INPUT input) : SV_Target0
|
float4 ps_main1(PS_INPUT input) : SV_Target0
|
||||||
{
|
{
|
||||||
float4 c = Texture.Sample(Sampler, input.t);
|
float4 c = Texture.Sample(Sampler, input.t);
|
||||||
c.a = BGColor.a;
|
c.a = BGColor.a;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif SHADER_MODEL <= 0x300
|
#elif SHADER_MODEL <= 0x300
|
||||||
|
|
||||||
sampler Texture : register(s0);
|
sampler Texture : register(s0);
|
||||||
|
|
||||||
float4 g_params[1];
|
float4 g_params[1];
|
||||||
|
|
||||||
#define BGColor (g_params[0])
|
#define BGColor (g_params[0])
|
||||||
|
|
||||||
struct PS_INPUT
|
struct PS_INPUT
|
||||||
{
|
{
|
||||||
float2 t : TEXCOORD0;
|
float2 t : TEXCOORD0;
|
||||||
};
|
};
|
||||||
|
|
||||||
float4 ps_main0(PS_INPUT input) : COLOR
|
float4 ps_main0(PS_INPUT input) : COLOR
|
||||||
{
|
{
|
||||||
float4 c = tex2D(Texture, input.t);
|
float4 c = tex2D(Texture, input.t);
|
||||||
// a = ;
|
// a = ;
|
||||||
return c.bgra;
|
return c.bgra;
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 ps_main1(PS_INPUT input) : COLOR
|
float4 ps_main1(PS_INPUT input) : COLOR
|
||||||
{
|
{
|
||||||
float4 c = tex2D(Texture, input.t);
|
float4 c = tex2D(Texture, input.t);
|
||||||
c.a = BGColor.a;
|
c.a = BGColor.a;
|
||||||
return c.bgra;
|
return c.bgra;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,26 +1,26 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<ProjectRootDir>$(ProjectDir).</ProjectRootDir>
|
<ProjectRootDir>$(ProjectDir).</ProjectRootDir>
|
||||||
<SvnRootDir>$(ProjectRootDir)\..\..</SvnRootDir>
|
<SvnRootDir>$(ProjectRootDir)\..\..</SvnRootDir>
|
||||||
<SvnCommonDir>$(SvnRootDir)\common</SvnCommonDir>
|
<SvnCommonDir>$(SvnRootDir)\common</SvnCommonDir>
|
||||||
<PcsxSubsection>plugins</PcsxSubsection>
|
<PcsxSubsection>plugins</PcsxSubsection>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuildMacro Include="ProjectRootDir">
|
<BuildMacro Include="ProjectRootDir">
|
||||||
<Value>$(ProjectRootDir)</Value>
|
<Value>$(ProjectRootDir)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
<BuildMacro Include="SvnRootDir">
|
<BuildMacro Include="SvnRootDir">
|
||||||
<Value>$(SvnRootDir)</Value>
|
<Value>$(SvnRootDir)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
<BuildMacro Include="SvnCommonDir">
|
<BuildMacro Include="SvnCommonDir">
|
||||||
<Value>$(SvnCommonDir)</Value>
|
<Value>$(SvnCommonDir)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
<BuildMacro Include="PcsxSubsection">
|
<BuildMacro Include="PcsxSubsection">
|
||||||
<Value>$(PcsxSubsection)</Value>
|
<Value>$(PcsxSubsection)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,23 +1,23 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="ProjectRootDir"
|
Name="ProjectRootDir"
|
||||||
>
|
>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="ProjectRootDir"
|
Name="ProjectRootDir"
|
||||||
Value="$(ProjectDir)."
|
Value="$(ProjectDir)."
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="SvnRootDir"
|
Name="SvnRootDir"
|
||||||
Value="$(ProjectRootDir)\..\.."
|
Value="$(ProjectRootDir)\..\.."
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="SvnCommonDir"
|
Name="SvnCommonDir"
|
||||||
Value="$(SvnRootDir)\common"
|
Value="$(SvnRootDir)\common"
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="PcsxSubsection"
|
Name="PcsxSubsection"
|
||||||
Value="plugins"
|
Value="plugins"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<SSEtype>AVX</SSEtype>
|
<SSEtype>AVX</SSEtype>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>_M_SSE=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_M_SSE=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalOptions>/arch:AVX %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:AVX %(AdditionalOptions)</AdditionalOptions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuildMacro Include="SSEtype">
|
<BuildMacro Include="SSEtype">
|
||||||
<Value>$(SSEtype)</Value>
|
<Value>$(SSEtype)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,34 +1,34 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_WINNT=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_WINNT=0x500;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<DisableSpecificWarnings>4996;4995;4324;4100;4101;4201;4556;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4996;4995;4324;4100;4101;4201;4556;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<AdditionalIncludeDirectories>$(DXSDK_DIR)include</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(DXSDK_DIR)include</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>JITProfiling.lib;d3d11.lib;d3dx11.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>JITProfiling.lib;d3d11.lib;d3dx11.lib;d3d10_1.lib;d3dx10.lib;d3d9.lib;d3dx9.lib;dxguid.lib;winmm.lib;strmiids.lib;xinput.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<OutputFile>$(OutDir)$(ProjectName)-$(SSEtype).dll</OutputFile>
|
<OutputFile>$(OutDir)$(ProjectName)-$(SSEtype).dll</OutputFile>
|
||||||
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;./vtune;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;./vtune;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<DelayLoadDLLs>d3d9.dll;d3dx9_43.dll;d3d11.dll;d3dx11_43.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
<DelayLoadDLLs>d3d9.dll;d3dx9_43.dll;d3d11.dll;d3dx11_43.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>.\postBuild.cmd "$(TargetPath)" "$(TargetName)" $(TargetExt) $(PcsxSubsection)</Command>
|
<Command>.\postBuild.cmd "$(TargetPath)" "$(TargetName)" $(TargetExt) $(PcsxSubsection)</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(SvnCommonDir)\vsprops\preBuild.cmd" "$(ProjectRootDir)"</Command>
|
<Command>"$(SvnCommonDir)\vsprops\preBuild.cmd" "$(ProjectRootDir)"</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,35 +1,35 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="common"
|
Name="common"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;_WIN32_WINNT=0x500"
|
PreprocessorDefinitions="WIN32;_WINDOWS;_WIN32_WINNT=0x500"
|
||||||
FloatingPointModel="2"
|
FloatingPointModel="2"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
WarningLevel="4"
|
WarningLevel="4"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
DisableSpecificWarnings="4996;4995;4324;4100;4101;4201;4556"
|
DisableSpecificWarnings="4996;4995;4324;4100;4101;4201;4556"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="JITProfiling.lib d3d11.lib d3dx11.lib d3d10_1.lib d3dx10.lib d3d9.lib d3dx9.lib dxguid.lib winmm.lib strmiids.lib xinput.lib"
|
AdditionalDependencies="JITProfiling.lib d3d11.lib d3dx11.lib d3d10_1.lib d3dx10.lib d3d9.lib d3dx9.lib dxguid.lib winmm.lib strmiids.lib xinput.lib"
|
||||||
OutputFile="$(OutDir)\$(ProjectName)-$(SSEtype).dll"
|
OutputFile="$(OutDir)\$(ProjectName)-$(SSEtype).dll"
|
||||||
AdditionalLibraryDirectories="./vtune"
|
AdditionalLibraryDirectories="./vtune"
|
||||||
DelayLoadDLLs="d3d9.dll;d3dx9_43.dll;d3d11.dll;d3dx11_43.dll"
|
DelayLoadDLLs="d3d9.dll;d3dx9_43.dll;d3d11.dll;d3dx11_43.dll"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
RandomizedBaseAddress="1"
|
RandomizedBaseAddress="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine=".\postBuild.cmd "$(TargetPath)" "$(TargetName)" $(TargetExt) $(PcsxSubsection)"
|
CommandLine=".\postBuild.cmd "$(TargetPath)" "$(TargetName)" $(TargetExt) $(PcsxSubsection)"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
CommandLine=""$(SvnCommonDir)\vsprops\preBuild.cmd" "$(ProjectRootDir)""
|
CommandLine=""$(SvnCommonDir)\vsprops\preBuild.cmd" "$(ProjectRootDir)""
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
<TargetName>$(ProjectName)-$(SSEtype)-dbg</TargetName>
|
<TargetName>$(ProjectName)-$(SSEtype)-dbg</TargetName>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>StackFrameRuntimeCheck</BasicRuntimeChecks>
|
<BasicRuntimeChecks>StackFrameRuntimeCheck</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,19 +1,19 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="debug"
|
Name="debug"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="_DEBUG"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="1"
|
BasicRuntimeChecks="1"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ImportGroup Label="PropertySheets" />
|
<ImportGroup Label="PropertySheets" />
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetName>$(ProjectName)-dev</TargetName>
|
<TargetName>$(ProjectName)-dev</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup />
|
<ItemDefinitionGroup />
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
</Project>
|
</Project>
|
|
@ -1,26 +1,26 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>$(ProjectName)-$(SSEtype)</TargetName>
|
<TargetName>$(ProjectName)-$(SSEtype)</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<PreprocessorDefinitions>NDEBUG;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,26 +1,26 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="release"
|
Name="release"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
PreprocessorDefinitions="NDEBUG;_SECURE_SCL=0"
|
PreprocessorDefinitions="NDEBUG;_SECURE_SCL=0"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
BufferSecurityCheck="false"
|
BufferSecurityCheck="false"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<SSEtype>SSE2</SSEtype>
|
<SSEtype>SSE2</SSEtype>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>_M_SSE=0x200;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_M_SSE=0x200;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuildMacro Include="SSEtype">
|
<BuildMacro Include="SSEtype">
|
||||||
<Value>$(SSEtype)</Value>
|
<Value>$(SSEtype)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,16 +1,16 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="sse2"
|
Name="sse2"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
PreprocessorDefinitions="_M_SSE=0x200"
|
PreprocessorDefinitions="_M_SSE=0x200"
|
||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="SSEtype"
|
Name="SSEtype"
|
||||||
Value="SSE2"
|
Value="SSE2"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<SSEtype>SSE4</SSEtype>
|
<SSEtype>SSE4</SSEtype>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>_M_SSE=0x401;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_M_SSE=0x401;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuildMacro Include="SSEtype">
|
<BuildMacro Include="SSEtype">
|
||||||
<Value>$(SSEtype)</Value>
|
<Value>$(SSEtype)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,16 +1,16 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="sse4"
|
Name="sse4"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
PreprocessorDefinitions="_M_SSE=0x401"
|
PreprocessorDefinitions="_M_SSE=0x401"
|
||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="SSEtype"
|
Name="SSEtype"
|
||||||
Value="SSE4"
|
Value="SSE4"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<SSEtype>SSSE3</SSEtype>
|
<SSEtype>SSSE3</SSEtype>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||||
<_PropertySheetDisplayName>sse3</_PropertySheetDisplayName>
|
<_PropertySheetDisplayName>sse3</_PropertySheetDisplayName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>_M_SSE=0x301;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_M_SSE=0x301;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BuildMacro Include="SSEtype">
|
<BuildMacro Include="SSEtype">
|
||||||
<Value>$(SSEtype)</Value>
|
<Value>$(SSEtype)</Value>
|
||||||
</BuildMacro>
|
</BuildMacro>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,16 +1,16 @@
|
||||||
<?xml version="1.0" encoding="windows-1250"?>
|
<?xml version="1.0" encoding="windows-1250"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
Name="sse3"
|
Name="sse3"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
PreprocessorDefinitions="_M_SSE=0x301"
|
PreprocessorDefinitions="_M_SSE=0x301"
|
||||||
EnableEnhancedInstructionSet="2"
|
EnableEnhancedInstructionSet="2"
|
||||||
/>
|
/>
|
||||||
<UserMacro
|
<UserMacro
|
||||||
Name="SSEtype"
|
Name="SSEtype"
|
||||||
Value="SSSE3"
|
Value="SSSE3"
|
||||||
/>
|
/>
|
||||||
</VisualStudioPropertySheet>
|
</VisualStudioPropertySheet>
|
||||||
|
|
Loading…
Reference in New Issue