Commit feaaae28 by Shannon Woods

Revert "Add TRACE_EVENT support to ANGLE"

This reverts commit 889f9d71.
parent 686eb7d5
...@@ -39,7 +39,6 @@ Google Inc. ...@@ -39,7 +39,6 @@ Google Inc.
Adrienne Walker Adrienne Walker
thestig@chromium.org thestig@chromium.org
Justin Schuh Justin Schuh
Scott Graham
Adobe Systems Inc. Adobe Systems Inc.
Alexandru Chiculita Alexandru Chiculita
......
...@@ -225,20 +225,14 @@ ...@@ -225,20 +225,14 @@
'../include', '../include',
'libGLESv2', 'libGLESv2',
], ],
'defines': [
'ANGLE_IMPLEMENTATION',
],
'sources': [ 'sources': [
'third_party/murmurhash/MurmurHash3.h', 'third_party/murmurhash/MurmurHash3.h',
'third_party/murmurhash/MurmurHash3.cpp', 'third_party/murmurhash/MurmurHash3.cpp',
'third_party/trace_event/trace_event.h',
'common/angleutils.h', 'common/angleutils.h',
'common/debug.cpp', 'common/debug.cpp',
'common/debug.h', 'common/debug.h',
'common/RefCountObject.cpp', 'common/RefCountObject.cpp',
'common/RefCountObject.h', 'common/RefCountObject.h',
'common/event_tracer.cpp',
'common/event_tracer.h',
'common/version.h', 'common/version.h',
'libGLESv2/precompiled.h', 'libGLESv2/precompiled.h',
'libGLESv2/precompiled.cpp', 'libGLESv2/precompiled.cpp',
......
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 2 #define MINOR_VERSION 2
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2436 #define BUILD_REVISION 2435
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;ANGLE_IMPLEMENTATION;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild> <MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
...@@ -120,7 +120,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -120,7 +120,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)/..; $(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;ANGLE_IMPLEMENTATION;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>ANGLE_DISABLE_TRACE;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGLESV2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;NOMINMAX;_SECURE_SCL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
...@@ -242,12 +242,6 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -242,12 +242,6 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile> </ClCompile>
<ClCompile Include="..\common\event_tracer.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Fence.cpp" /> <ClCompile Include="Fence.cpp" />
<ClCompile Include="Float16ToFloat32.cpp" /> <ClCompile Include="Float16ToFloat32.cpp" />
<ClCompile Include="Framebuffer.cpp" /> <ClCompile Include="Framebuffer.cpp" />
...@@ -311,10 +305,8 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\" ...@@ -311,10 +305,8 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\common\debug.h" /> <ClInclude Include="..\common\debug.h" />
<ClInclude Include="..\common\event_tracer.h" />
<ClInclude Include="..\common\system.h" /> <ClInclude Include="..\common\system.h" />
<ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" /> <ClInclude Include="..\third_party\murmurhash\MurmurHash3.h" />
<ClInclude Include="..\third_party\trace_event\trace_event.h" />
<ClInclude Include="angletypes.h" /> <ClInclude Include="angletypes.h" />
<ClInclude Include="BinaryStream.h" /> <ClInclude Include="BinaryStream.h" />
<ClInclude Include="Buffer.h" /> <ClInclude Include="Buffer.h" />
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
<Filter Include="Source Files\Renderer11"> <Filter Include="Source Files\Renderer11">
<UniqueIdentifier>{72db61d3-e081-4b58-bc63-a04a8a70585f}</UniqueIdentifier> <UniqueIdentifier>{72db61d3-e081-4b58-bc63-a04a8a70585f}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Third Party\trace_event">
<UniqueIdentifier>{ebfc1614-8f0b-48c7-b6bd-295bf91ef85c}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Buffer.cpp"> <ClCompile Include="Buffer.cpp">
...@@ -224,9 +221,6 @@ ...@@ -224,9 +221,6 @@
<ClCompile Include="renderer\IndexRangeCache.cpp"> <ClCompile Include="renderer\IndexRangeCache.cpp">
<Filter>Source Files\Renderer</Filter> <Filter>Source Files\Renderer</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\common\event_tracer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="BinaryStream.h"> <ClInclude Include="BinaryStream.h">
...@@ -496,12 +490,6 @@ ...@@ -496,12 +490,6 @@
<ClInclude Include="renderer\IndexRangeCache.h"> <ClInclude Include="renderer\IndexRangeCache.h">
<Filter>Header Files\Renderer</Filter> <Filter>Header Files\Renderer</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\common\event_tracer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\third_party\trace_event\trace_event.h">
<Filter>Third Party\trace_event</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="renderer\shaders\Blit.ps"> <None Include="renderer\shaders\Blit.ps">
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "libGLESv2/renderer/Renderer9.h" #include "libGLESv2/renderer/Renderer9.h"
#include "libGLESv2/renderer/Renderer11.h" #include "libGLESv2/renderer/Renderer11.h"
#include "libGLESv2/utilities.h" #include "libGLESv2/utilities.h"
#include "third_party/trace_event/trace_event.h"
#if !defined(ANGLE_ENABLE_D3D11) #if !defined(ANGLE_ENABLE_D3D11)
// Enables use of the Direct3D 11 API for a default display, when available // Enables use of the Direct3D 11 API for a default display, when available
...@@ -41,7 +40,6 @@ Renderer::~Renderer() ...@@ -41,7 +40,6 @@ Renderer::~Renderer()
bool Renderer::initializeCompiler() bool Renderer::initializeCompiler()
{ {
TRACE_EVENT0("gpu", "initializeCompiler");
#if defined(ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES) #if defined(ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES)
// Find a D3DCompiler module that had already been loaded based on a predefined list of versions. // Find a D3DCompiler module that had already been loaded based on a predefined list of versions.
static TCHAR* d3dCompilerNames[] = ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES; static TCHAR* d3dCompilerNames[] = ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES;
...@@ -219,4 +217,4 @@ void glDestroyRenderer(rx::Renderer *renderer) ...@@ -219,4 +217,4 @@ void glDestroyRenderer(rx::Renderer *renderer)
delete renderer; delete renderer;
} }
} }
\ No newline at end of file
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#include "libEGL/Display.h" #include "libEGL/Display.h"
#include "third_party/trace_event/trace_event.h"
// Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros // Can also be enabled by defining FORCE_REF_RAST in the project's predefined macros
#define REF_RAST 0 #define REF_RAST 0
...@@ -186,12 +184,10 @@ EGLint Renderer9::initialize() ...@@ -186,12 +184,10 @@ EGLint Renderer9::initialize()
if (mSoftwareDevice) if (mSoftwareDevice)
{ {
TRACE_EVENT0("gpu", "GetModuleHandle_swiftshader");
mD3d9Module = GetModuleHandle(TEXT("swiftshader_d3d9.dll")); mD3d9Module = GetModuleHandle(TEXT("swiftshader_d3d9.dll"));
} }
else else
{ {
TRACE_EVENT0("gpu", "GetModuleHandle_d3d9");
mD3d9Module = GetModuleHandle(TEXT("d3d9.dll")); mD3d9Module = GetModuleHandle(TEXT("d3d9.dll"));
} }
...@@ -209,14 +205,12 @@ EGLint Renderer9::initialize() ...@@ -209,14 +205,12 @@ EGLint Renderer9::initialize()
// desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available. // desktop. Direct3D9Ex is available in Windows Vista and later if suitable drivers are available.
if (ANGLE_ENABLE_D3D9EX && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex))) if (ANGLE_ENABLE_D3D9EX && Direct3DCreate9ExPtr && SUCCEEDED(Direct3DCreate9ExPtr(D3D_SDK_VERSION, &mD3d9Ex)))
{ {
TRACE_EVENT0("gpu", "D3d9Ex_QueryInterface");
ASSERT(mD3d9Ex); ASSERT(mD3d9Ex);
mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9)); mD3d9Ex->QueryInterface(IID_IDirect3D9, reinterpret_cast<void**>(&mD3d9));
ASSERT(mD3d9); ASSERT(mD3d9);
} }
else else
{ {
TRACE_EVENT0("gpu", "Direct3DCreate9");
mD3d9 = Direct3DCreate9(D3D_SDK_VERSION); mD3d9 = Direct3DCreate9(D3D_SDK_VERSION);
} }
...@@ -234,24 +228,21 @@ EGLint Renderer9::initialize() ...@@ -234,24 +228,21 @@ EGLint Renderer9::initialize()
HRESULT result; HRESULT result;
// Give up on getting device caps after about one second. // Give up on getting device caps after about one second.
for (int i = 0; i < 10; ++i)
{ {
TRACE_EVENT0("gpu", "GetDeviceCaps"); result = mD3d9->GetDeviceCaps(mAdapter, mDeviceType, &mDeviceCaps);
for (int i = 0; i < 10; ++i) if (SUCCEEDED(result))
{ {
result = mD3d9->GetDeviceCaps(mAdapter, mDeviceType, &mDeviceCaps); break;
if (SUCCEEDED(result)) }
{ else if (result == D3DERR_NOTAVAILABLE)
break; {
} Sleep(100); // Give the driver some time to initialize/recover
else if (result == D3DERR_NOTAVAILABLE) }
{ else if (FAILED(result)) // D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY, D3DERR_INVALIDDEVICE, or another error we can't recover from
Sleep(100); // Give the driver some time to initialize/recover {
} ERR("failed to get device caps (0x%x)\n", result);
else if (FAILED(result)) // D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY, D3DERR_INVALIDDEVICE, or another error we can't recover from return EGL_NOT_INITIALIZED;
{
ERR("failed to get device caps (0x%x)\n", result);
return EGL_NOT_INITIALIZED;
}
} }
} }
...@@ -269,10 +260,7 @@ EGLint Renderer9::initialize() ...@@ -269,10 +260,7 @@ EGLint Renderer9::initialize()
return EGL_NOT_INITIALIZED; return EGL_NOT_INITIALIZED;
} }
{ mD3d9->GetAdapterIdentifier(mAdapter, 0, &mAdapterIdentifier);
TRACE_EVENT0("gpu", "GetAdapterIdentifier");
mD3d9->GetAdapterIdentifier(mAdapter, 0, &mAdapterIdentifier);
}
// ATI cards on XP have problems with non-power-of-two textures. // ATI cards on XP have problems with non-power-of-two textures.
mSupportsNonPower2Textures = !(mDeviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) && mSupportsNonPower2Textures = !(mDeviceCaps.TextureCaps & D3DPTEXTURECAPS_POW2) &&
...@@ -313,41 +301,35 @@ EGLint Renderer9::initialize() ...@@ -313,41 +301,35 @@ EGLint Renderer9::initialize()
} }
int max = 0; int max = 0;
for (unsigned int i = 0; i < ArraySize(RenderTargetFormats); ++i)
{ {
TRACE_EVENT0("gpu", "getMultiSampleSupport"); bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1];
for (unsigned int i = 0; i < ArraySize(RenderTargetFormats); ++i) getMultiSampleSupport(RenderTargetFormats[i], multisampleArray);
{ mMultiSampleSupport[RenderTargetFormats[i]] = multisampleArray;
bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1];
getMultiSampleSupport(RenderTargetFormats[i], multisampleArray);
mMultiSampleSupport[RenderTargetFormats[i]] = multisampleArray;
for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j)
{
if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max)
{ {
if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) max = j;
{
max = j;
}
} }
} }
} }
for (unsigned int i = 0; i < ArraySize(DepthStencilFormats); ++i)
{ {
TRACE_EVENT0("gpu", "getMultiSampleSupport2"); if (DepthStencilFormats[i] == D3DFMT_UNKNOWN)
for (unsigned int i = 0; i < ArraySize(DepthStencilFormats); ++i) continue;
{
if (DepthStencilFormats[i] == D3DFMT_UNKNOWN)
continue;
bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1]; bool *multisampleArray = new bool[D3DMULTISAMPLE_16_SAMPLES + 1];
getMultiSampleSupport(DepthStencilFormats[i], multisampleArray); getMultiSampleSupport(DepthStencilFormats[i], multisampleArray);
mMultiSampleSupport[DepthStencilFormats[i]] = multisampleArray; mMultiSampleSupport[DepthStencilFormats[i]] = multisampleArray;
for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j) for (int j = D3DMULTISAMPLE_16_SAMPLES; j >= 0; --j)
{
if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max)
{ {
if (multisampleArray[j] && j != D3DMULTISAMPLE_NONMASKABLE && j > max) max = j;
{
max = j;
}
} }
} }
} }
...@@ -357,18 +339,12 @@ EGLint Renderer9::initialize() ...@@ -357,18 +339,12 @@ EGLint Renderer9::initialize()
static const TCHAR windowName[] = TEXT("AngleHiddenWindow"); static const TCHAR windowName[] = TEXT("AngleHiddenWindow");
static const TCHAR className[] = TEXT("STATIC"); static const TCHAR className[] = TEXT("STATIC");
{ mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL);
TRACE_EVENT0("gpu", "CreateWindowEx");
mDeviceWindow = CreateWindowEx(WS_EX_NOACTIVATE, className, windowName, WS_DISABLED | WS_POPUP, 0, 0, 1, 1, HWND_MESSAGE, NULL, GetModuleHandle(NULL), NULL);
}
D3DPRESENT_PARAMETERS presentParameters = getDefaultPresentParameters(); D3DPRESENT_PARAMETERS presentParameters = getDefaultPresentParameters();
DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE | D3DCREATE_NOWINDOWCHANGES; DWORD behaviorFlags = D3DCREATE_FPU_PRESERVE | D3DCREATE_NOWINDOWCHANGES;
{ result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice);
TRACE_EVENT0("gpu", "D3d9_CreateDevice");
result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &presentParameters, &mDevice);
}
if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY || result == D3DERR_DEVICELOST) if (result == D3DERR_OUTOFVIDEOMEMORY || result == E_OUTOFMEMORY || result == D3DERR_DEVICELOST)
{ {
return EGL_BAD_ALLOC; return EGL_BAD_ALLOC;
...@@ -376,7 +352,6 @@ EGLint Renderer9::initialize() ...@@ -376,7 +352,6 @@ EGLint Renderer9::initialize()
if (FAILED(result)) if (FAILED(result))
{ {
TRACE_EVENT0("gpu", "D3d9_CreateDevice2");
result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParameters, &mDevice); result = mD3d9->CreateDevice(mAdapter, mDeviceType, mDeviceWindow, behaviorFlags | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParameters, &mDevice);
if (FAILED(result)) if (FAILED(result))
...@@ -388,45 +363,35 @@ EGLint Renderer9::initialize() ...@@ -388,45 +363,35 @@ EGLint Renderer9::initialize()
if (mD3d9Ex) if (mD3d9Ex)
{ {
TRACE_EVENT0("gpu", "mDevice_QueryInterface");
result = mDevice->QueryInterface(IID_IDirect3DDevice9Ex, (void**) &mDeviceEx); result = mDevice->QueryInterface(IID_IDirect3DDevice9Ex, (void**) &mDeviceEx);
ASSERT(SUCCEEDED(result)); ASSERT(SUCCEEDED(result));
} }
{ mVertexShaderCache.initialize(mDevice);
TRACE_EVENT0("gpu", "ShaderCache initialize"); mPixelShaderCache.initialize(mDevice);
mVertexShaderCache.initialize(mDevice);
mPixelShaderCache.initialize(mDevice);
}
// Check occlusion query support // Check occlusion query support
IDirect3DQuery9 *occlusionQuery = NULL; IDirect3DQuery9 *occlusionQuery = NULL;
if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, &occlusionQuery)) && occlusionQuery)
{ {
TRACE_EVENT0("gpu", "device_CreateQuery"); occlusionQuery->Release();
if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, &occlusionQuery)) && occlusionQuery) mOcclusionQuerySupport = true;
{ }
occlusionQuery->Release(); else
mOcclusionQuerySupport = true; {
} mOcclusionQuerySupport = false;
else
{
mOcclusionQuerySupport = false;
}
} }
// Check event query support // Check event query support
IDirect3DQuery9 *eventQuery = NULL; IDirect3DQuery9 *eventQuery = NULL;
if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_EVENT, &eventQuery)) && eventQuery)
{ {
TRACE_EVENT0("gpu", "device_CreateQuery2"); eventQuery->Release();
if (SUCCEEDED(mDevice->CreateQuery(D3DQUERYTYPE_EVENT, &eventQuery)) && eventQuery) mEventQuerySupport = true;
{ }
eventQuery->Release(); else
mEventQuerySupport = true; {
} mEventQuerySupport = false;
else
{
mEventQuerySupport = false;
}
} }
D3DDISPLAYMODE currentDisplayMode; D3DDISPLAYMODE currentDisplayMode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment