We need to require at least shader 2.0a now

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7590 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2011-06-08 03:09:07 +00:00
parent 81844b8955
commit 3fceffd8c0
1 changed files with 18 additions and 18 deletions

View File

@ -213,11 +213,11 @@ void Enumerate()
a.resolutions.clear(); a.resolutions.clear();
D3D::D3D->GetAdapterIdentifier(i, 0, &a.ident); D3D::D3D->GetAdapterIdentifier(i, 0, &a.ident);
bool isNvidia = a.ident.VendorId == VENDOR_NVIDIA; bool isNvidia = a.ident.VendorId == VENDOR_NVIDIA;
// Add SuperSamples modes // Add SuperSamples modes
a.aa_levels.push_back(AALevel("None", D3DMULTISAMPLE_NONE, 0)); a.aa_levels.push_back(AALevel("None", D3DMULTISAMPLE_NONE, 0));
a.aa_levels.push_back(AALevel("4x SSAA", D3DMULTISAMPLE_NONE, 0)); a.aa_levels.push_back(AALevel("4x SSAA", D3DMULTISAMPLE_NONE, 0));
a.aa_levels.push_back(AALevel("9x SSAA", D3DMULTISAMPLE_NONE, 0)); a.aa_levels.push_back(AALevel("9x SSAA", D3DMULTISAMPLE_NONE, 0));
//Add multisample modes //Add multisample modes
//disable them will they are not implemnted //disable them will they are not implemnted
/* /*
@ -226,7 +226,7 @@ void Enumerate()
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels)) i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels))
if (qlevels > 0) if (qlevels > 0)
a.aa_levels.push_back(AALevel("2x MSAA", D3DMULTISAMPLE_2_SAMPLES, 0)); a.aa_levels.push_back(AALevel("2x MSAA", D3DMULTISAMPLE_2_SAMPLES, 0));
if (D3DERR_NOTAVAILABLE != D3D::D3D->CheckDeviceMultiSampleType( if (D3DERR_NOTAVAILABLE != D3D::D3D->CheckDeviceMultiSampleType(
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels)) i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &qlevels))
if (qlevels > 0) if (qlevels > 0)
@ -268,7 +268,7 @@ void Enumerate()
// http://developer.amd.com/gpu_assets/Advanced%20DX9%20Capabilities%20for%20ATI%20Radeon%20Cards.pdf // http://developer.amd.com/gpu_assets/Advanced%20DX9%20Capabilities%20for%20ATI%20Radeon%20Cards.pdf
a.supports_intz = D3D_OK == D3D->CheckDeviceFormat( a.supports_intz = D3D_OK == D3D->CheckDeviceFormat(
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_INTZ); D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_INTZ);
// Also check for RAWZ (nvidia only, but the only option to get Z24 textures on sub GF8800 // Also check for RAWZ (nvidia only, but the only option to get Z24 textures on sub GF8800
a.supports_rawz = D3D_OK == D3D->CheckDeviceFormat( a.supports_rawz = D3D_OK == D3D->CheckDeviceFormat(
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
@ -287,10 +287,10 @@ void Enumerate()
} }
int numModes = D3D::D3D->GetAdapterModeCount(i, D3DFMT_X8R8G8B8); int numModes = D3D::D3D->GetAdapterModeCount(i, D3DFMT_X8R8G8B8);
for (int m = 0; m < numModes; m++) for (int m = 0; m < numModes; m++)
{ {
D3DDISPLAYMODE mode; D3DDISPLAYMODE mode;
D3D::D3D->EnumAdapterModes(i, D3DFMT_X8R8G8B8, m, &mode); D3D::D3D->EnumAdapterModes(i, D3DFMT_X8R8G8B8, m, &mode);
int found = -1; int found = -1;
for (int x = 0; x < (int)a.resolutions.size(); x++) for (int x = 0; x < (int)a.resolutions.size(); x++)
{ {
@ -303,7 +303,7 @@ void Enumerate()
Resolution temp; Resolution temp;
Resolution &r = found==-1 ? temp : a.resolutions[found]; Resolution &r = found==-1 ? temp : a.resolutions[found];
sprintf(r.name, "%ix%i", mode.Width, mode.Height); sprintf(r.name, "%ix%i", mode.Width, mode.Height);
r.bitdepths.insert(mode.Format); r.bitdepths.insert(mode.Format);
r.refreshes.insert(mode.RefreshRate); r.refreshes.insert(mode.RefreshRate);
@ -404,16 +404,16 @@ HRESULT Create(int adapter, HWND wnd, int _resolution, int aa_mode, bool auto_de
InitPP(adapter, resolution, aa_mode, &d3dpp); InitPP(adapter, resolution, aa_mode, &d3dpp);
if (FAILED(D3D->CreateDevice( if (FAILED(D3D->CreateDevice(
adapter, adapter,
D3DDEVTYPE_HAL, D3DDEVTYPE_HAL,
wnd, wnd,
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, //doesn't seem to make a difference D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, //doesn't seem to make a difference
&d3dpp, &dev))) &d3dpp, &dev)))
{ {
if (FAILED(D3D->CreateDevice( if (FAILED(D3D->CreateDevice(
adapter, adapter,
D3DDEVTYPE_HAL, D3DDEVTYPE_HAL,
wnd, wnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &dev))) &d3dpp, &dev)))
@ -455,7 +455,7 @@ void Close()
if( back_buffer ) if( back_buffer )
back_buffer->Release(); back_buffer->Release();
back_buffer = NULL; back_buffer = NULL;
ULONG references = dev->Release(); ULONG references = dev->Release();
if (references) if (references)
ERROR_LOG(VIDEO, "Unreleased references: %i.", references); ERROR_LOG(VIDEO, "Unreleased references: %i.", references);
@ -522,14 +522,14 @@ D3DFORMAT GetSupportedDepthSurfaceFormat(D3DFORMAT target_format)
const char *VertexShaderVersionString() const char *VertexShaderVersionString()
{ {
static const char *versions[5] = {"ERROR", "vs_1_4", "vs_2_0", "vs_3_0", "vs_4_0"}; static const char *versions[5] = {"ERROR", "vs_1_4", "vs_2_a", "vs_3_0", "vs_4_0"};
int version = ((D3D::caps.VertexShaderVersion >> 8) & 0xFF); int version = ((D3D::caps.VertexShaderVersion >> 8) & 0xFF);
return versions[std::min(4, version)]; return versions[std::min(4, version)];
} }
const char *PixelShaderVersionString() const char *PixelShaderVersionString()
{ {
static const char *versions[5] = {"ERROR", "ps_1_4", "ps_2_0", "ps_3_0", "ps_4_0"}; static const char *versions[5] = {"ERROR", "ps_1_4", "ps_2_a", "ps_3_0", "ps_4_0"};
int version = ((D3D::caps.PixelShaderVersion >> 8) & 0xFF); int version = ((D3D::caps.PixelShaderVersion >> 8) & 0xFF);
return versions[std::min(4, version)]; return versions[std::min(4, version)];
} }
@ -614,7 +614,7 @@ bool BeginFrame()
dev->BeginScene(); dev->BeginScene();
return true; return true;
} }
else else
return false; return false;
} }
@ -677,7 +677,7 @@ void RefreshRenderState(D3DRENDERSTATETYPE State)
{ {
if(m_RenderStatesSet[State] && m_RenderStatesChanged[State]) if(m_RenderStatesSet[State] && m_RenderStatesChanged[State])
{ {
D3D::dev->SetRenderState(State, m_RenderStates[State]); D3D::dev->SetRenderState(State, m_RenderStates[State]);
m_RenderStatesChanged[State] = false; m_RenderStatesChanged[State] = false;
} }
} }