Add d3d8 scnapshot. Be consistent with swapeffect.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 12 Dec 2012 09:30:09 +0000 (09:30 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 12 Dec 2012 09:30:09 +0000 (09:30 +0000)
12 files changed:
apps/d3d10/tri.cpp
apps/d3d10/tri.ref.present.png [changed mode: 0755->0644]
apps/d3d10_1/tri.cpp
apps/d3d10_1/tri.ref.present.png [changed mode: 0755->0644]
apps/d3d10_1/tri_level_9_1.cpp
apps/d3d11/tri.cpp
apps/d3d11/tri.ref.present.png [changed mode: 0755->0644]
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 [changed mode: 0755->0644]
apps/d3d9/tri.ref.txt

index 1029be91906f95fe618c5735b53dde3f4f020cef..c4d9f2b48c09194ff6790eae5c55d9f1e64ea73a 100644 (file)
@@ -130,6 +130,7 @@ main(int argc, char *argv[])
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     hr = g_pFactory->CreateSwapChain(g_pDevice, &SwapChainDesc, &g_pSwapChain);
     if (FAILED(hr)) {
old mode 100755 (executable)
new mode 100644 (file)
index b9ed7d52cefa50d18000cb1f147502426ec08156..674eaacc453f1fd0293f2f8e23718ae31e7b4548 100644 (file)
@@ -131,6 +131,7 @@ main(int argc, char *argv[])
     SwapChainDesc.BufferCount = 2;
     SwapChainDesc.OutputWindow = hWnd;
     SwapChainDesc.Windowed = true;
+    SwapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
 
     hr = g_pFactory->CreateSwapChain(g_pDevice, &SwapChainDesc, &g_pSwapChain);
     if (FAILED(hr)) {
old mode 100755 (executable)
new mode 100644 (file)
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,
old mode 100755 (executable)
new mode 100644 (file)
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 7a8358c40ca0a3854f62c0e109521b43124b7f5a..62b262a02161111c6c982e3558e0d5a857669321 100644 (file)
@@ -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 {
old mode 100755 (executable)
new mode 100644 (file)
index f295795..e1ac243
Binary files a/apps/d3d9/tri.ref.present.png and b/apps/d3d9/tri.ref.present.png differ
index de8af241552541736052c7f20be444478d98493d..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