From: José Fonseca Date: Wed, 12 Dec 2012 09:30:09 +0000 (+0000) Subject: Add d3d8 scnapshot. Be consistent with swapeffect. X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=commitdiff_plain;h=0ba9c4e22bc917a666b8762b734884e72c142ccf Add d3d8 scnapshot. Be consistent with swapeffect. --- diff --git a/apps/d3d10/tri.cpp b/apps/d3d10/tri.cpp index 1029be9..c4d9f2b 100644 --- a/apps/d3d10/tri.cpp +++ b/apps/d3d10/tri.cpp @@ -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)) { diff --git a/apps/d3d10/tri.ref.present.png b/apps/d3d10/tri.ref.present.png old mode 100755 new mode 100644 diff --git a/apps/d3d10_1/tri.cpp b/apps/d3d10_1/tri.cpp index b9ed7d5..674eaac 100644 --- a/apps/d3d10_1/tri.cpp +++ b/apps/d3d10_1/tri.cpp @@ -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)) { diff --git a/apps/d3d10_1/tri.ref.present.png b/apps/d3d10_1/tri.ref.present.png old mode 100755 new mode 100644 diff --git a/apps/d3d10_1/tri_level_9_1.cpp b/apps/d3d10_1/tri_level_9_1.cpp index 7c1ae0e..76a34f8 100644 --- a/apps/d3d10_1/tri_level_9_1.cpp +++ b/apps/d3d10_1/tri_level_9_1.cpp @@ -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, diff --git a/apps/d3d11/tri.cpp b/apps/d3d11/tri.cpp index a380ca7..2227b81 100644 --- a/apps/d3d11/tri.cpp +++ b/apps/d3d11/tri.cpp @@ -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 old mode 100755 new mode 100644 diff --git a/apps/d3d8/tri.ref.present.png b/apps/d3d8/tri.ref.present.png new file mode 100644 index 0000000..e1ac243 Binary files /dev/null and b/apps/d3d8/tri.ref.present.png differ diff --git a/apps/d3d8/tri.ref.txt b/apps/d3d8/tri.ref.txt index 7a8358c..62b262a 100644 --- a/apps/d3d8/tri.ref.txt +++ b/apps/d3d8/tri.ref.txt @@ -9,6 +9,6 @@ IDirect3DDevice8::SetRenderState(this = , State = D3DRS_CULLMODE, Value IDirect3DDevice8::SetVertexShader(this = , Handle = 66) = D3D_OK IDirect3DDevice8::DrawPrimitiveUP(this = , PrimitiveType = D3DPT_TRIANGLELIST, PrimitiveCount = 1, pVertexStreamZeroData = blob(48), VertexStreamZeroStride = 16) = D3D_OK IDirect3DDevice8::EndScene(this = ) = D3D_OK -IDirect3DDevice8::Present(this = , pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK + IDirect3DDevice8::Present(this = , pSourceRect = NULL, pDestRect = NULL, hDestWindowOverride = NULL, pDirtyRegion = NULL) = D3D_OK IDirect3DDevice8::Release(this = ) = 0 IDirect3D8::Release(this = ) = 0 diff --git a/apps/d3d9/tri.cpp b/apps/d3d9/tri.cpp index 8c3fda7..6cf6284 100644 --- a/apps/d3d9/tri.cpp +++ b/apps/d3d9/tri.cpp @@ -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 old mode 100755 new mode 100644 index f295795..e1ac243 Binary files a/apps/d3d9/tri.ref.present.png and b/apps/d3d9/tri.ref.present.png differ diff --git a/apps/d3d9/tri.ref.txt b/apps/d3d9/tri.ref.txt index de8af24..116995d 100644 --- a/apps/d3d9/tri.ref.txt +++ b/apps/d3d9/tri.ref.txt @@ -1,6 +1,6 @@ Direct3DCreate9(SDKVersion = 32) = IDirect3D9::GetDeviceCaps(this = , Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, pCaps = &) = D3D_OK -IDirect3D9::CreateDevice(this = , Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = , BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 250, BackBufferHeight = 250, BackBufferFormat = D3DFMT_X8R8G8B8, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, MultiSampleQuality = 0, SwapEffect = D3DSWAPEFFECT_FLIP, hDeviceWindow = , Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0, FullScreen_RefreshRateInHz = 0, PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE}, ppReturnedDeviceInterface = &) = D3D_OK +IDirect3D9::CreateDevice(this = , Adapter = D3DADAPTER_DEFAULT, DeviceType = D3DDEVTYPE_HAL, hFocusWindow = , BehaviorFlags = D3DCREATE_HARDWARE_VERTEXPROCESSING, pPresentationParameters = &{BackBufferWidth = 250, BackBufferHeight = 250, BackBufferFormat = D3DFMT_X8R8G8B8, BackBufferCount = 1, MultiSampleType = D3DMULTISAMPLE_NONE, MultiSampleQuality = 0, SwapEffect = D3DSWAPEFFECT_DISCARD, hDeviceWindow = , Windowed = TRUE, EnableAutoDepthStencil = FALSE, AutoDepthStencilFormat = D3DFMT_UNKNOWN, Flags = 0, FullScreen_RefreshRateInHz = 0, PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE}, ppReturnedDeviceInterface = &) = D3D_OK IDirect3DDevice9::Clear(this = , Count = 0, pRects = NULL, Flags = D3DCLEAR_TARGET, Color = 0xff4c194c, Z = 1, Stencil = 0) = D3D_OK IDirect3DDevice9::BeginScene(this = ) = D3D_OK IDirect3DDevice9::SetRenderState(this = , State = D3DRS_LIGHTING, Value = FALSE) = D3D_OK