]> git.cworth.org Git - apitrace-tests/commitdiff
Merge branch 'trim-auto'
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 28 Jan 2013 19:48:41 +0000 (19:48 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 28 Jan 2013 19:48:41 +0000 (19:48 +0000)
21 files changed:
app_driver.py
apps/d3d10/CMakeLists.txt
apps/d3d10/tri.cpp
apps/d3d10/tri.ref.present.png [new file with mode: 0644]
apps/d3d10/tri.ref.txt
apps/d3d10_1/CMakeLists.txt
apps/d3d10_1/tri.cpp
apps/d3d10_1/tri.ref.present.png [new file with mode: 0644]
apps/d3d10_1/tri.ref.txt
apps/d3d10_1/tri_level_9_1.cpp
apps/d3d11/tri.cpp
apps/d3d11/tri.ref.present.png [new file with mode: 0644]
apps/d3d11/tri.ref.txt
apps/d3d11_1/tri.cpp
apps/d3d8/tri.cpp
apps/d3d8/tri.ref.present.png [new file with mode: 0644]
apps/d3d8/tri.ref.txt
apps/d3d9/tri.cpp
apps/d3d9/tri.ref.present.png [new file with mode: 0644]
apps/d3d9/tri.ref.txt
cmake/FindDirectX.cmake

index 0a372fa286c90b234719c0c1c788ce9c7b489ece..0e6cc37c65c5f68ab82b82b4e16cc70f358ebe6e 100755 (executable)
@@ -152,8 +152,9 @@ class AppDriver(Driver):
         
         cmd = [
             options.apitrace, 'trace', 
-            '--api', self.api_trace_map[self.api],
-            '--output', self.trace_file,
+            '-v',
+            '-a', self.api_trace_map[self.api],
+            '-o', self.trace_file,
             '--'
         ] + cmd
         if self.max_frames is not None:
@@ -316,9 +317,9 @@ class AppDriver(Driver):
         from PIL import Image
         state = self.getState(callNo)
         if self.doubleBuffer:
-            attachments = ['GL_BACK', 'GL_BACK_LEFT', 'GL_BACK_RIGHT', 'GL_COLOR_ATTACHMENT0']
+            attachments = ['GL_BACK', 'GL_BACK_LEFT', 'GL_BACK_RIGHT', 'GL_COLOR_ATTACHMENT0', 'RENDER_TARGET_0']
         else:
-            attachments = ['GL_FRONT', 'GL_FRONT_LEFT', 'GL_FRONT_RIGHT', 'GL_COLOR_ATTACHMENT0']
+            attachments = ['GL_FRONT', 'GL_FRONT_LEFT', 'GL_FRONT_RIGHT', 'GL_COLOR_ATTACHMENT0', 'RENDER_TARGET_0']
         imageObj = self.getFramebufferAttachment(state, attachments)
         data = imageObj['__data__']
         stream = StringIO(base64.b64decode(data))
index 75d110b717681da5cdfaa10303f9d93fe9ed9d88..226cd49c6897f4efbb65728e87b88afcdb73c1dd 100644 (file)
@@ -4,6 +4,7 @@ include_directories (
 )
 
 link_libraries (
+    ${DirectX_DXGI_LIBRARY}
     ${DirectX_D3D10_LIBRARY}
 )
 
index 18213427e5a8df6154cd7fd538e482350aaeddb0..c4d9f2b48c09194ff6790eae5c55d9f1e64ea73a 100644 (file)
@@ -38,6 +38,8 @@
 #include "tri_ps_4_0.h"
 
 
+static IDXGIFactory *g_pFactory = NULL;
+static IDXGIAdapter *g_pAdapter = NULL;
 static IDXGISwapChain* g_pSwapChain = NULL;
 static ID3D10Device * g_pDevice = NULL;
 
@@ -95,6 +97,26 @@ main(int argc, char *argv[])
         Flags |= D3D10_CREATE_DEVICE_DEBUG;
     }
 
+    hr = CreateDXGIFactory(IID_IDXGIFactory, (void**)(&g_pFactory) );
+    if (FAILED(hr)) {
+        return 1;
+    }
+
+    hr = g_pFactory->EnumAdapters(0, &g_pAdapter);
+    if (FAILED(hr)) {
+        return 1;
+    }
+
+    hr = D3D10CreateDevice(g_pAdapter,
+                           D3D10_DRIVER_TYPE_HARDWARE,
+                           NULL,
+                           Flags,
+                           D3D10_SDK_VERSION,
+                           &g_pDevice);
+    if (FAILED(hr)) {
+        return 1;
+    }
+
     DXGI_SWAP_CHAIN_DESC SwapChainDesc;
     ZeroMemory(&SwapChainDesc, sizeof SwapChainDesc);
     SwapChainDesc.BufferDesc.Width = WindowWidth;
@@ -108,15 +130,9 @@ main(int argc, char *argv[])
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
-    hr = D3D10CreateDeviceAndSwapChain(NULL,
-                                       D3D10_DRIVER_TYPE_HARDWARE,
-                                       NULL,
-                                       Flags,
-                                       D3D10_SDK_VERSION,
-                                       &SwapChainDesc,
-                                       &g_pSwapChain,
-                                       &g_pDevice);
+    hr = g_pFactory->CreateSwapChain(g_pDevice, &SwapChainDesc, &g_pSwapChain);
     if (FAILED(hr)) {
         return 1;
     }
diff --git a/apps/d3d10/tri.ref.present.png b/apps/d3d10/tri.ref.present.png
new file mode 100644 (file)
index 0000000..aa290e4
Binary files /dev/null and b/apps/d3d10/tri.ref.present.png differ
index e5d73561981692efe884add78928187d974714ff..95f8f1e4a91f0c2d589fbb691544e25f3558899e 100644 (file)
@@ -1,4 +1,7 @@
-D3D10CreateDeviceAndSwapChain(pAdapter = NULL, DriverType = D3D10_DRIVER_TYPE_HARDWARE, Software = NULL, Flags = <>, SDKVersion = 29, pSwapChainDesc = &{BufferDesc = {Width = 250, Height = 250, RefreshRate = {Numerator = 60, Denominator = 1}, Format = DXGI_FORMAT_R8G8B8A8_UNORM, ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, Scaling = DXGI_MODE_SCALING_UNSPECIFIED}, SampleDesc = {Count = 1, Quality = 0}, BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT, BufferCount = 2, OutputWindow = <hWnd>, Windowed = TRUE, SwapEffect = DXGI_SWAP_EFFECT_DISCARD, Flags = 0x0}, ppSwapChain = &<pSwapChain>, ppDevice = &<pDevice>) = S_OK
+CreateDXGIFactory(riid = {Data1 = 2071029484, Data2 = 8647, Data3 = 17582, Data4 = {178, 26, 201, 174, 50, 26, 227, 105}}, ppFactory = &<pFactory>) = S_OK
+IDXGIFactory::EnumAdapters(this = <pFactory>, Adapter = 0, ppAdapter = &<pAdapter>) = S_OK
+D3D10CreateDevice(pAdapter = <pAdapter>, DriverType = D3D10_DRIVER_TYPE_HARDWARE, Software = NULL, Flags = <>, SDKVersion = 29, ppDevice = &<pDevice>) = S_OK
+IDXGIFactory::CreateSwapChain(this = <pFactory>, pDevice = <pDevice>, pDesc = &{BufferDesc = {Width = 250, Height = 250, RefreshRate = {Numerator = 60, Denominator = 1}, Format = DXGI_FORMAT_R8G8B8A8_UNORM, ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, Scaling = DXGI_MODE_SCALING_UNSPECIFIED}, SampleDesc = {Count = 1, Quality = 0}, BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT, BufferCount = 2, OutputWindow = <hWnd>, Windowed = TRUE, SwapEffect = DXGI_SWAP_EFFECT_DISCARD, Flags = 0x0}, ppSwapChain = &<pSwapChain>) = S_OK
 IDXGISwapChain::GetBuffer(this = <pSwapChain>, Buffer = 0, riid = {Data1 = 2608745476, Data2 = 13356, Data3 = 16646, Data4 = {161, 159, 79, 39, 4, 246, 137, 240}}, ppSurface = &<pSurface>) = S_OK
 ID3D10Device::CreateRenderTargetView(this = <pDevice>, pResource = <pSurface>, pDesc = &{Format = DXGI_FORMAT_R8G8B8A8_UNORM, ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D, Texture2D = {MipSlice = 0}}, ppRTView = &<pRenderTargetView>) = S_OK
 ID3D10Texture2D::Release(this = <pSurface>) = 0
@@ -100,7 +103,7 @@ ID3D10Device::CreateRasterizerState(this = <pDevice>, pRasterizerDesc = &{FillMo
 ID3D10Device::RSSetState(this = <pDevice>, pRasterizerState = <pRasterizerState>)
 ID3D10Device::IASetPrimitiveTopology(this = <pDevice>, Topology = D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP)
 ID3D10Device::Draw(this = <pDevice>, VertexCount = 3, StartVertexLocation = 0)
-IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
+<present> IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
 ID3D10Device::IASetVertexBuffers(this = <pDevice>, StartSlot = 0, NumBuffers = 1, ppVertexBuffers = &NULL, pStrides = &0, pOffsets = &0)
 ID3D10Buffer::Release(this = <pVertexBuffer>) = 0
 ID3D10Device::OMSetRenderTargets(this = <pDevice>, NumViews = 0, ppRenderTargetViews = NULL, pDepthStencilView = NULL)
index 83455bc0f0b0295cead0bccb1ffe6212c9be980e..ccd3dbc5c8f46a75988d1a46105454b6682660a8 100644 (file)
@@ -4,6 +4,7 @@ include_directories (
 )
 
 link_libraries (
+    ${DirectX_DXGI_LIBRARY}
     ${DirectX_D3D10_1_LIBRARY}
 )
 
index 4aed3508ad693edc8cee319efc3a28a13b8fefc3..674eaacc453f1fd0293f2f8e23718ae31e7b4548 100644 (file)
 #include "tri_ps_4_0.h"
 
 
+static IDXGIFactory1 *g_pFactory = NULL;
+static IDXGIAdapter *g_pAdapter = NULL;
 static IDXGISwapChain* g_pSwapChain = NULL;
 static ID3D10Device1 * g_pDevice = NULL;
 
 
-int main(int argc, char *argv[]){
+int
+main(int argc, char *argv[])
+{
     HRESULT hr;
 
     HINSTANCE hInstance = GetModuleHandle(NULL);
@@ -93,6 +97,27 @@ int main(int argc, char *argv[]){
         Flags |= D3D10_CREATE_DEVICE_DEBUG;
     }
 
+    hr = CreateDXGIFactory1(IID_IDXGIFactory1, (void**)(&g_pFactory) );
+    if (FAILED(hr)) {
+        return 1;
+    }
+
+    hr = g_pFactory->EnumAdapters(0, &g_pAdapter);
+    if (FAILED(hr)) {
+        return 1;
+    }
+
+    hr = D3D10CreateDevice1(g_pAdapter,
+                            D3D10_DRIVER_TYPE_HARDWARE,
+                            NULL,
+                            Flags,
+                            D3D10_FEATURE_LEVEL_10_0,
+                            D3D10_1_SDK_VERSION,
+                            &g_pDevice);
+    if (FAILED(hr)) {
+        return 1;
+    }
+
     DXGI_SWAP_CHAIN_DESC SwapChainDesc;
     ZeroMemory(&SwapChainDesc, sizeof SwapChainDesc);
     SwapChainDesc.BufferDesc.Width = WindowWidth;
@@ -106,16 +131,9 @@ int main(int argc, char *argv[]){
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
-    hr = D3D10CreateDeviceAndSwapChain1(NULL,
-                                        D3D10_DRIVER_TYPE_HARDWARE,
-                                        NULL,
-                                        Flags,
-                                        D3D10_FEATURE_LEVEL_10_0,
-                                        D3D10_1_SDK_VERSION,
-                                        &SwapChainDesc,
-                                        &g_pSwapChain,
-                                        &g_pDevice);
+    hr = g_pFactory->CreateSwapChain(g_pDevice, &SwapChainDesc, &g_pSwapChain);
     if (FAILED(hr)) {
         return 1;
     }
diff --git a/apps/d3d10_1/tri.ref.present.png b/apps/d3d10_1/tri.ref.present.png
new file mode 100644 (file)
index 0000000..aa290e4
Binary files /dev/null and b/apps/d3d10_1/tri.ref.present.png differ
index 35fcd88b745c09ccd7aee4ac93acc86f552ecaad..65344fa7a93ae134bfed689e1bd454f74725fef2 100644 (file)
@@ -1,4 +1,7 @@
-D3D10CreateDeviceAndSwapChain1(pAdapter = NULL, DriverType = D3D10_DRIVER_TYPE_HARDWARE, Software = NULL, Flags = <>, HardwareLevel = D3D10_FEATURE_LEVEL_10_0, SDKVersion = 32, pSwapChainDesc = &{BufferDesc = {Width = 250, Height = 250, RefreshRate = {Numerator = 60, Denominator = 1}, Format = DXGI_FORMAT_R8G8B8A8_UNORM, ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, Scaling = DXGI_MODE_SCALING_UNSPECIFIED}, SampleDesc = {Count = 1, Quality = 0}, BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT, BufferCount = 2, OutputWindow = <hWnd>, Windowed = TRUE, SwapEffect = DXGI_SWAP_EFFECT_DISCARD, Flags = 0x0}, ppSwapChain = &<pSwapChain>, ppDevice = &<pDevice>) = S_OK
+CreateDXGIFactory1(riid = {Data1 = 1997188728, Data2 = 62063, Data3 = 19898, Data4 = {168, 41, 37, 60, 131, 209, 179, 135}}, ppFactory = &<pFactory>) = S_OK
+IDXGIFactory1::EnumAdapters(this = <pFactory>, Adapter = 0, ppAdapter = &<pAdapter>) = S_OK
+D3D10CreateDevice1(pAdapter = <pAdapter>, DriverType = D3D10_DRIVER_TYPE_HARDWARE, Software = NULL, Flags = <>, HardwareLevel = D3D10_FEATURE_LEVEL_10_0, SDKVersion = 32, ppDevice = &<pDevice>) = S_OK
+IDXGIFactory1::CreateSwapChain(this = <pFactory>, pDevice = <pDevice>, pDesc = &{BufferDesc = {Width = 250, Height = 250, RefreshRate = {Numerator = 60, Denominator = 1}, Format = DXGI_FORMAT_R8G8B8A8_UNORM, ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, Scaling = DXGI_MODE_SCALING_UNSPECIFIED}, SampleDesc = {Count = 1, Quality = 0}, BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT, BufferCount = 2, OutputWindow = <hWnd>, Windowed = TRUE, SwapEffect = DXGI_SWAP_EFFECT_DISCARD, Flags = 0x0}, ppSwapChain = &<pSwapChain>) = S_OK
 IDXGISwapChain::GetBuffer(this = <pSwapChain>, Buffer = 0, riid = {Data1 = 2608745476, Data2 = 13356, Data3 = 16646, Data4 = {161, 159, 79, 39, 4, 246, 137, 240}}, ppSurface = &<pSurface>) = S_OK
 ID3D10Device1::CreateRenderTargetView(this = <pDevice>, pResource = <pSurface>, pDesc = &{Format = DXGI_FORMAT_R8G8B8A8_UNORM, ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D, Texture2D = {MipSlice = 0}}, ppRTView = &<pRenderTargetView>) = S_OK
 ID3D10Texture2D::Release(this = <pSurface>) = 0
@@ -100,7 +103,7 @@ ID3D10Device1::CreateRasterizerState(this = <pDevice>, pRasterizerDesc = &{FillM
 ID3D10Device1::RSSetState(this = <pDevice>, pRasterizerState = <pRasterizerState>)
 ID3D10Device1::IASetPrimitiveTopology(this = <pDevice>, Topology = D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP)
 ID3D10Device1::Draw(this = <pDevice>, VertexCount = 3, StartVertexLocation = 0)
-IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
+<present> IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
 ID3D10Device1::IASetVertexBuffers(this = <pDevice>, StartSlot = 0, NumBuffers = 1, ppVertexBuffers = &NULL, pStrides = &0, pOffsets = &0)
 ID3D10Buffer::Release(this = <pVertexBuffer>) = 0
 ID3D10Device1::OMSetRenderTargets(this = <pDevice>, NumViews = 0, ppRenderTargetViews = NULL, pDepthStencilView = NULL)
index 7c1ae0e1067b4f96c55e4f597ab1da557938b219..76a34f82b1072f7198e02e3a3f1ce842fa65cae0 100644 (file)
@@ -106,6 +106,7 @@ int main(int argc, char *argv[]){
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     hr = D3D10CreateDeviceAndSwapChain1(NULL,
                                         D3D10_DRIVER_TYPE_HARDWARE,
index a380ca7c7b4581a0cc5be554ea1cc3cb25b7a6ca..2227b811667c9a2087b4fbca4cbb76b704dd4b22 100644 (file)
@@ -43,7 +43,9 @@ static ID3D11Device * g_pDevice = NULL;
 static ID3D11DeviceContext * g_pDeviceContext = NULL;
 
 
-int main(int argc, char *argv[]){
+int
+main(int argc, char *argv[])
+{
     HRESULT hr;
 
     HINSTANCE hInstance = GetModuleHandle(NULL);
@@ -107,6 +109,7 @@ int main(int argc, char *argv[]){
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     static const D3D_FEATURE_LEVEL FeatureLevels[] = {
         D3D_FEATURE_LEVEL_11_0,
diff --git a/apps/d3d11/tri.ref.present.png b/apps/d3d11/tri.ref.present.png
new file mode 100644 (file)
index 0000000..aa290e4
Binary files /dev/null and b/apps/d3d11/tri.ref.present.png differ
index f16d16fd14eab90edbe13273167b611cd63bfe4d..7d969b948fdbcfd58d92a0a1e0c3fc704ccbd70d 100644 (file)
@@ -97,8 +97,7 @@ ID3D11Device::CreateRasterizerState(this = <pDevice>, pRasterizerDesc = &{FillMo
 ID3D11DeviceContext::RSSetState(this = <pDeviceContext>, pRasterizerState = <pRasterizerState>)
 ID3D11DeviceContext::IASetPrimitiveTopology(this = <pDeviceContext>, Topology = D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP)
 ID3D11DeviceContext::Draw(this = <pDeviceContext>, VertexCount = 3, StartVertexLocation = 0)
-IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
-
+<present> IDXGISwapChain::Present(this = <pSwapChain>, SyncInterval = 0, Flags = 0x0) = S_OK
 ID3D11DeviceContext::IASetVertexBuffers(this = <pDeviceContext>, StartSlot = 0, NumBuffers = 1, ppVertexBuffers = &NULL, pStrides = &0, pOffsets = &0)
 ID3D11Buffer::Release(this = <pVertexBuffer>) = 0
 ID3D11DeviceContext::OMSetRenderTargets(this = <pDeviceContext>, NumViews = 0, ppRenderTargetViews = NULL, pDepthStencilView = NULL)
index f86ab7c2b46168902c79d2dd763c8357cdd23c67..ff297ed69e78d4c912817b741009a23fdbfc4dee 100644 (file)
@@ -149,7 +149,12 @@ int main(int argc, char *argv[]){
     if (FAILED(hr)) {
         return 1;
     }
-    hr = g_pDevice1->CreateRenderTargetView(pBackBuffer, NULL, &pRenderTargetView);
+    D3D11_RENDER_TARGET_VIEW_DESC RenderTargetViewDesc;
+    ZeroMemory(&RenderTargetViewDesc, sizeof RenderTargetViewDesc);
+    RenderTargetViewDesc.Format = SwapChainDesc.BufferDesc.Format;
+    RenderTargetViewDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
+    RenderTargetViewDesc.Texture2D.MipSlice = 0;
+    hr = g_pDevice1->CreateRenderTargetView(pBackBuffer, &RenderTargetViewDesc, &pRenderTargetView);
     if (FAILED(hr)) {
         return 1;
     }
index 156d0c5e800d8ded9f252a0dd1a769870d06a887..d0665a682cec9e45a64226dcbc72b6a8466fb70e 100644 (file)
@@ -100,26 +100,25 @@ int main(int argc, char *argv[])
        dwBehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
     }
 
+    D3DDISPLAYMODE Mode;
+    hr = g_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &Mode);
+    if (FAILED(hr)) {
+        return 1;
+    }
+
     ZeroMemory(&g_PresentationParameters, sizeof g_PresentationParameters);
     g_PresentationParameters.Windowed = Windowed;
-    if (!Windowed) {
+    if (Windowed) {
         g_PresentationParameters.BackBufferWidth = WindowWidth;
         g_PresentationParameters.BackBufferHeight = WindowHeight;
+    } else {
+        g_PresentationParameters.BackBufferWidth = Mode.Width;
+        g_PresentationParameters.BackBufferHeight = Mode.Height;
     }
+    g_PresentationParameters.BackBufferFormat = Mode.Format;
     g_PresentationParameters.BackBufferCount = 1;
     g_PresentationParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
-    if (Windowed) {
-        // Must matche the format of the current display mode
-        D3DDISPLAYMODE Mode;
-        hr = g_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &Mode);
-        if (FAILED(hr)) {
-            g_pD3D->Release();
-            g_pD3D = NULL;
-            return 1;
-        }
-        g_PresentationParameters.BackBufferFormat = Mode.Format;
-    } else {
-        g_PresentationParameters.BackBufferFormat = D3DFMT_X8R8G8B8;
+    if (!Windowed) {
         g_PresentationParameters.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
     }
     g_PresentationParameters.hDeviceWindow = hWnd;
diff --git a/apps/d3d8/tri.ref.present.png b/apps/d3d8/tri.ref.present.png
new file mode 100644 (file)
index 0000000..e1ac243
Binary files /dev/null and b/apps/d3d8/tri.ref.present.png differ
index e1dae45b85d10cd0beac2ffae9b00654da63f5fe..62b262a02161111c6c982e3558e0d5a857669321 100644 (file)
@@ -1,7 +1,7 @@
 Direct3DCreate8(SDKVersion = 220) = <pD3D>
 IDirect3D8::GetDeviceCaps(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, pCaps = &<Caps>) = D3D_OK
 IDirect3D8::GetAdapterDisplayMode(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, pMode = &{Width = 1440, Height = 900, RefreshRate = 60, Format = D3DFMT_X8R8G8B8}) = D3D_OK
-IDirect3D8::CreateDevice(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = <hWnd>, BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 0, BackBufferHeight = 0, BackBufferFormat = D3DFMT_X8R8G8B8, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, SwapEffect = D3DSWAPEFFECT_DISCARD, hDeviceWindow = <hWnd>, Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0x0, FullScreen_RefreshRateInHz = 0, FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT}, ppReturnedDeviceInterface = &<pDevice>) = D3D_OK
+IDirect3D8::CreateDevice(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = <hWnd>, BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 250, BackBufferHeight = 250, BackBufferFormat = <BackBufferFormat>, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, SwapEffect = D3DSWAPEFFECT_DISCARD, hDeviceWindow = <hWnd>, Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0x0, FullScreen_RefreshRateInHz = 0, FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT}, ppReturnedDeviceInterface = &<pDevice>) = D3D_OK
 IDirect3DDevice8::Clear(this = <pDevice>, Count = 0, pRects = NULL, Flags = D3DCLEAR_TARGET, Color = 0xff4c194c, Z = 1, Stencil = 0) = D3D_OK
 IDirect3DDevice8::BeginScene(this = <pDevice>) = D3D_OK
 IDirect3DDevice8::SetRenderState(this = <pDevice>, State = D3DRS_LIGHTING, Value = FALSE) = D3D_OK
@@ -9,6 +9,6 @@ IDirect3DDevice8::SetRenderState(this = <pDevice>, State = D3DRS_CULLMODE, Value
 IDirect3DDevice8::SetVertexShader(this = <pDevice>, Handle = 66) = D3D_OK
 IDirect3DDevice8::DrawPrimitiveUP(this = <pDevice>, PrimitiveType = D3DPT_TRIANGLELIST, PrimitiveCount = 1, pVertexStreamZeroData = blob(48), VertexStreamZeroStride = 16) = D3D_OK
 IDirect3DDevice8::EndScene(this = <pDevice>) = D3D_OK
-IDirect3DDevice8::Present(this = <pDevice>, pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK
+<present> IDirect3DDevice8::Present(this = <pDevice>, pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK
 IDirect3DDevice8::Release(this = <pDevice>) = 0
 IDirect3D8::Release(this = <pD3D>) = 0
index 8c3fda7baa76e6ae7151837a85903a24ba7afc19..6cf6284a22d6d551f6270556b315e0beb5c1c144 100644 (file)
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
         g_PresentationParameters.BackBufferHeight = WindowHeight;
     }
     g_PresentationParameters.BackBufferCount = 1;
-    g_PresentationParameters.SwapEffect = D3DSWAPEFFECT_FLIP;
+    g_PresentationParameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
     if (!Windowed) {
         g_PresentationParameters.BackBufferFormat = D3DFMT_X8R8G8B8;
     } else {
diff --git a/apps/d3d9/tri.ref.present.png b/apps/d3d9/tri.ref.present.png
new file mode 100644 (file)
index 0000000..e1ac243
Binary files /dev/null and b/apps/d3d9/tri.ref.present.png differ
index fe0ee166e3172a3a1823d0a43e87f05082810374..116995d8a6042bcb5b4fa6792d1f625f1aef8def 100644 (file)
@@ -1,6 +1,6 @@
 Direct3DCreate9(SDKVersion = 32) = <pD3D>
 IDirect3D9::GetDeviceCaps(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, pCaps = &<Caps>) = D3D_OK
-IDirect3D9::CreateDevice(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = <hWnd>, BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 250, BackBufferHeight = 250, BackBufferFormat = D3DFMT_X8R8G8B8, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, MultiSampleQuality = 0, SwapEffect = D3DSWAPEFFECT_FLIP, hDeviceWindow = <hWnd>, Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0, FullScreen_RefreshRateInHz = 0, PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE}, ppReturnedDeviceInterface = &<pDevice>) = D3D_OK
+IDirect3D9::CreateDevice(this = <pD3D>, Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = <hWnd>, BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 250, BackBufferHeight = 250, BackBufferFormat = D3DFMT_X8R8G8B8, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, MultiSampleQuality = 0, SwapEffect = D3DSWAPEFFECT_DISCARD, hDeviceWindow = <hWnd>, Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0, FullScreen_RefreshRateInHz = 0, PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE}, ppReturnedDeviceInterface = &<pDevice>) = D3D_OK
 IDirect3DDevice9::Clear(this = <pDevice>, Count = 0, pRects = NULL, Flags = D3DCLEAR_TARGET, Color = 0xff4c194c, Z = 1, Stencil = 0) = D3D_OK
 IDirect3DDevice9::BeginScene(this = <pDevice>) = D3D_OK
 IDirect3DDevice9::SetRenderState(this = <pDevice>, State = D3DRS_LIGHTING, Value = FALSE) = D3D_OK
@@ -8,6 +8,6 @@ IDirect3DDevice9::SetRenderState(this = <pDevice>, State = D3DRS_CULLMODE, Value
 IDirect3DDevice9::SetFVF(this = <pDevice>, FVF = D3DFVF_XYZ | D3DFVF_DIFFUSE) = D3D_OK
 IDirect3DDevice9::DrawPrimitiveUP(this = <pDevice>, PrimitiveType = D3DPT_TRIANGLELIST, PrimitiveCount = 1, pVertexStreamZeroData = blob(48), VertexStreamZeroStride = 16) = D3D_OK
 IDirect3DDevice9::EndScene(this = <pDevice>) = D3D_OK
-IDirect3DDevice9::Present(this = <pDevice>, pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK
+<present> IDirect3DDevice9::Present(this = <pDevice>, pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK
 IDirect3DDevice9::Release(this = <pDevice>) = 0
 IDirect3D9::Release(this = <pD3D>) = 0
index cbbe4f134506e6f4c2d7a3e52b1c1f8a8f37c77a..6eb684e3182f2fe12c3f2282ef04aa41fab32734 100644 (file)
@@ -138,6 +138,11 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
        endif ()
 
 
+       find_library (DirectX_DXGI_LIBRARY dxgi
+               PATHS ${DirectX_LIB_SEARCH_PATH}
+               DOC "The directory where dxgi resides")
+
+
        find_path (DirectX_D3D10_INCLUDE_DIR d3d10.h
                PATHS ${DirectX_INC_SEARCH_PATH}
                DOC "The directory where d3d10.h resides")