SWV: Software Video now compiles and runs on x64

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4411 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY 2009-10-12 17:39:09 +00:00
parent c2ae2e8d58
commit a887a475e3
4 changed files with 217 additions and 5 deletions

View File

@ -676,16 +676,20 @@ Global
{11F55366-12EC-4C44-A8CB-1D4E315D61ED}.Release|x64.Build.0 = Release|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Debug|Win32.ActiveCfg = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Debug|Win32.Build.0 = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Debug|x64.ActiveCfg = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Debug|x64.ActiveCfg = Debug|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Debug|x64.Build.0 = Debug|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.DebugFast|Win32.ActiveCfg = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.DebugFast|Win32.Build.0 = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.DebugFast|x64.ActiveCfg = Debug|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.DebugFast|x64.ActiveCfg = Debug|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.DebugFast|x64.Build.0 = Debug|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release_JITIL|Win32.ActiveCfg = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release_JITIL|Win32.Build.0 = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release_JITIL|x64.ActiveCfg = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release_JITIL|x64.ActiveCfg = Release|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release_JITIL|x64.Build.0 = Release|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release|Win32.ActiveCfg = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release|Win32.Build.0 = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release|x64.ActiveCfg = Release|Win32
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release|x64.ActiveCfg = Release|x64
{66A4E7BD-E2E8-4373-9B75-8750EB5AE683}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -12,6 +12,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -187,6 +190,179 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_WIN32;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoSoftware.pch"
AssemblerListingLocation="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="false"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib winmm.lib opengl32.lib glew64s.lib glu32.lib rpcrt4.lib common.lib wxbase28ud.lib wxmsw28ud_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoSWD.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\core\common\$(PlatformName)\$(ConfigurationName)&quot;;..\..\..\Externals\Cg;..\..\..\Externals\GLew;..\..\..\Externals\libjpeg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="0"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="../../PluginSpecs;../../Core/Common/Src;../../Core/InputCommon/Src;./Src;./Src/Windows;../../../Externals;..\..\..\Externals\libjpeg;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\..\..\Externals\Glew"
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_WIN32;PLUGIN_VIDEOSOFTWARE_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_SECURE_SCL=0"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoSoftware.pch"
WarningLevel="3"
DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="false"
AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib winmm.lib opengl32.lib glew64s.lib glu32.lib rpcrt4.lib libjpeg64.lib common.lib wxbase28u.lib wxmsw28u_core.lib"
OutputFile="..\..\..\Binary\x64\Plugins\Plugin_VideoSW.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\core\common\$(PlatformName)\$(ConfigurationName)&quot;;..\..\..\Externals\Cg;..\..\..\Externals\GLew;..\..\..\Externals\libjpeg;&quot;..\..\..\Externals\wxWidgets\lib\vc_lib\$(PlatformName)&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="msvcprt.lib;libcmt.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@ -210,6 +386,10 @@
RelativePath=".\Src\NativeVertexWriter.h"
>
</File>
<File
RelativePath="..\..\Core\VideoCommon\Src\OpenCL\OCLTextureDecoder.cpp"
>
</File>
<File
RelativePath="..\Plugin_VideoOGL\Src\rasterfont.cpp"
>
@ -406,6 +586,22 @@
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\Src\stdafx.h"

View File

@ -49,11 +49,17 @@ inline int iround(float x)
{
int t;
#if defined(_WIN32) && !defined(_M_X64)
__asm
{
fld x
fistp t
}
#else
t = (int)x;
if((x - t) >= 0.5)
return t + 1;
#endif
return t;
}

View File

@ -30,11 +30,17 @@ inline int iround(float x)
{
int t;
__asm volatile
#if defined(_WIN32) && !defined(_M_X64)
__asm
{
fld x
fistp t
}
#else
t = (int)x;
if((x - t) >= 0.5)
return t + 1;
#endif
return t;
}