Changeset 94469 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video
- Timestamp:
- Apr 5, 2022 2:21:09 PM (3 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/Makefile.kmk
r93115 r94469 21 21 PROGRAMS += VBoxGaD3DTest 22 22 VBoxGaD3DTest_TEMPLATE = VBOXR3STATIC 23 VBoxGaD3DTest_SDKS = ReorderCompilerIncs $(VBOX_WINDDK)24 23 VBoxGaD3DTest_DEFS = D3DTEST_STANDALONE 25 24 VBoxGaD3DTest_LIBS = d3d9.lib … … 38 37 39 38 PROGRAMS += VBoxD3D11 40 VBoxD3D11_TEMPLATE = VBoxR3StaticNonPedantic 41 VBoxD3D11_SDKS = WINDDK80 42 VBoxD3D11_CXXFLAGS += -wd4458 -wd4838 -wd5029 -wd5039 39 VBoxD3D11_TEMPLATE = VBOXR3STATIC 40 VBoxD3D11_CXXFLAGS += -wd4458 -wd4668 -wd4838 -wd5029 -wd5039 43 41 VBoxD3D11_LIBS = d3d11.lib 44 42 VBoxD3D11_SOURCES = \ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/d3d11main.cpp
r93115 r94469 403 403 LARGE_INTEGER PerfFreq; 404 404 QueryPerformanceFrequency(&PerfFreq); 405 float const PerfPeriod = 1.0f / PerfFreq.QuadPart; /* Period in seconds. */405 float const PerfPeriod = 1.0f / (float)PerfFreq.QuadPart; /* Period in seconds. */ 406 406 407 407 LARGE_INTEGER PrevTS; … … 451 451 452 452 /* Time in seconds since the previous render step. */ 453 float dt = fFirst ? 0.0f : ( CurrTS.QuadPart - PrevTS.QuadPart) * PerfPeriod;453 float dt = fFirst ? 0.0f : (float)(CurrTS.QuadPart - PrevTS.QuadPart) * PerfPeriod; 454 454 if (mpRender) 455 455 { … … 513 513 if (elapsed > 1.0f) 514 514 { 515 float msPerFrame = elapsed * 1000.0f / cFrames;515 float msPerFrame = elapsed * 1000.0f / (float)cFrames; 516 516 char sz[256]; 517 517 _snprintf(sz, sizeof(sz), "D3D11 Test FPS %d Frame Time %fms", cFrames, msPerFrame); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/d3d11render.cpp
r93115 r94469 134 134 #endif 135 135 136 static const BYTEg_vs_color[] =136 static BYTE const g_vs_color[] = 137 137 { 138 138 68, 88, 66, 67, 109, 138, 105, 83, 86, 190, 83, 125, 72, 102, 194, 136, 46, 69, … … 201 201 #endif 202 202 203 static const BYTEg_ps_color[] =203 static BYTE const g_ps_color[] = 204 204 { 205 205 68, 88, 66, 67, 206, 120, 117, 238, 118, 127, 10, 87, 80, 75, 114, 198, 95, 2, … … 268 268 ID3D11DeviceContext *pImmediateContext = pDP->ImmediateContext(); 269 269 270 HRESULT hr = S_OK;271 272 270 FLOAT aColor[4] = { 1.0f, 1.0f, 1.0f, 1.0f }; 273 271 pImmediateContext->ClearRenderTargetView(pDP->RenderTargetView(), aColor); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/d3d9main.cpp
r93115 r94469 300 300 LARGE_INTEGER PerfFreq; 301 301 QueryPerformanceFrequency(&PerfFreq); 302 float const PerfPeriod = 1.0f / PerfFreq.QuadPart; /* Period in seconds. */302 float const PerfPeriod = 1.0f / (float)PerfFreq.QuadPart; /* Period in seconds. */ 303 303 304 304 LARGE_INTEGER PrevTS; … … 348 348 349 349 /* Time in seconds since the previous render step. */ 350 float dt = fFirst ? 0.0f : ( CurrTS.QuadPart - PrevTS.QuadPart) * PerfPeriod;350 float dt = fFirst ? 0.0f : (float)(CurrTS.QuadPart - PrevTS.QuadPart) * PerfPeriod; 351 351 if (mpRender) 352 352 { … … 362 362 if (elapsed > 1.0f) 363 363 { 364 float msPerFrame = elapsed * 1000.0f / cFrames;364 float msPerFrame = elapsed * 1000.0f / (float)cFrames; 365 365 char sz[256]; 366 366 _snprintf(sz, sizeof(sz), "D3D9 Test FPS %d Frame Time %fms", cFrames, msPerFrame); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/gallium/test/d3d9render.cpp
r93115 r94469 168 168 static Vertex aVertices[] = 169 169 { 170 { -0.5f, -0.5f, 0.9f},171 { 0.0f, 0.5f, 0.9f},172 { 0.5f, -0.5f, 0.9f},170 { {-0.5f, -0.5f, 0.9f } }, 171 { { 0.0f, 0.5f, 0.9f } }, 172 { { 0.5f, -0.5f, 0.9f } }, 173 173 }; 174 174 … … 389 389 static Vertex aVertices[] = 390 390 { 391 { -0.5f, -0.5f, 0.5f, D3DCOLOR_XRGB( 0, 0, 255), },392 { 0.5f, -0.5f, 0.5f, D3DCOLOR_XRGB( 0, 255, 0), },393 { 0.0f, 0.5f, 0.5f, D3DCOLOR_XRGB(255, 0, 0), },391 { { -0.5f, -0.5f, 0.5f }, D3DCOLOR_XRGB( 0, 0, 255), }, 392 { { 0.5f, -0.5f, 0.5f }, D3DCOLOR_XRGB( 0, 255, 0), }, 393 { { 0.0f, 0.5f, 0.5f }, D3DCOLOR_XRGB(255, 0, 0), }, 394 394 }; 395 395 … … 661 661 static VertexGeometry aVerticesGeometry[] = 662 662 { 663 { -0.5f, -0.5f, 0.5f},664 { 0.5f, -0.5f, 0.5f},665 { 0.0f, 0.5f, 0.5f},663 { { -0.5f, -0.5f, 0.5f } }, 664 { { 0.5f, -0.5f, 0.5f } }, 665 { { 0.0f, 0.5f, 0.5f } }, 666 666 }; 667 667 … … 830 830 static Vertex aVertices[] = 831 831 { 832 { -1.0f, -1.0f, 0.0f},833 { 1.0f, -1.0f, 0.0f},834 { 0.0f, 1.0f, 0.0f},832 { { -1.0f, -1.0f, 0.0f } }, 833 { { 1.0f, -1.0f, 0.0f } }, 834 { { 0.0f, 1.0f, 0.0f } }, 835 835 }; 836 836 … … 882 882 /* Set color of the triangle. */ 883 883 float aColor[4]; 884 aColor[0] = 1.0f * ( (color >> 16) & 0xff) / 255.0f;885 aColor[1] = 1.0f * ( (color >> 8) & 0xff) / 255.0f;886 aColor[2] = 1.0f * ( (color ) & 0xff) / 255.0f;884 aColor[0] = 1.0f * (float)((color >> 16) & 0xff) / 255.0f; 885 aColor[1] = 1.0f * (float)((color >> 8) & 0xff) / 255.0f; 886 aColor[2] = 1.0f * (float)((color ) & 0xff) / 255.0f; 887 887 aColor[3] = 1.0f; 888 888 HTEST(pDevice->SetVertexShaderConstantF(4, &aColor[0], 1)); … … 1026 1026 static Vertex aVertices[] = 1027 1027 { 1028 { -0.5f, -0.5f, 0.5f, D3DCOLOR_XRGB( 0, 0, 255), },1029 { 0.5f, -0.5f, 0.5f, D3DCOLOR_XRGB( 0, 255, 0), },1030 { 0.0f, 0.5f, 0.5f, D3DCOLOR_XRGB(255, 0, 0), },1028 { { -0.5f, -0.5f, 0.5f }, D3DCOLOR_XRGB( 0, 0, 255), }, 1029 { { 0.5f, -0.5f, 0.5f }, D3DCOLOR_XRGB( 0, 255, 0), }, 1030 { { 0.0f, 0.5f, 0.5f }, D3DCOLOR_XRGB(255, 0, 0), }, 1031 1031 }; 1032 1032 … … 1314 1314 static Vertex aVertices[] = 1315 1315 { 1316 { -1.0f, -1.0f, 0.0f, 0.0f, 1.0f},1317 { 1.0f, -1.0f, 0.0f, 1.0f, 1.0f},1318 { -1.0f, 1.0f, 0.0f, 0.0f, 0.0f},1319 1320 { -1.0f, 1.0f, 0.0f, 0.0f, 0.0f},1321 { 1.0f, -1.0f, 0.0f, 1.0f, 1.0f},1322 { 1.0f, 1.0f, 0.0f, 1.0f, 0.0f},1316 { { -1.0f, -1.0f, 0.0f }, 0.0f, 1.0f}, 1317 { { 1.0f, -1.0f, 0.0f }, 1.0f, 1.0f}, 1318 { { -1.0f, 1.0f, 0.0f }, 0.0f, 0.0f}, 1319 1320 { { -1.0f, 1.0f, 0.0f }, 0.0f, 0.0f}, 1321 { { 1.0f, -1.0f, 0.0f }, 1.0f, 1.0f}, 1322 { { 1.0f, 1.0f, 0.0f }, 1.0f, 0.0f}, 1323 1323 }; 1324 1324
Note:
See TracChangeset
for help on using the changeset viewer.