Skip to content

Commit 86fd92c

Browse files
sraman4malayaku
authored andcommitted
ZC v1095 : Performance optimization in UMD w.r.t texture 2d
1 parent 8bcff09 commit 86fd92c

File tree

4 files changed

+23
-33
lines changed

4 files changed

+23
-33
lines changed

DVServerKMD/DVServerKMD.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServerKMD /tr http://timest
110110
Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServerKMD /tr http://timestamp.digicert.com /td sha256 $(OutDir)DVServerKMD\DVServerKMD.sys
111111
certmgr -del -c -n "DVServerKMD" -s PrivateCertStore</Command>
112112
</PostBuildEvent>
113+
<DriverSign>
114+
<FileDigestAlgorithm>sha1</FileDigestAlgorithm>
115+
</DriverSign>
113116
</ItemDefinitionGroup>
114117
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
115118
<ClCompile>
@@ -132,6 +135,9 @@ Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServerKMD /tr http://timest
132135
Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServerKMD /tr http://timestamp.digicert.com /td sha256 $(OutDir)DVServerKMD\DVServerKMD.sys
133136
certmgr -del -c -n "DVServerKMD" -s PrivateCertStore</Command>
134137
</PostBuildEvent>
138+
<DriverSign>
139+
<FileDigestAlgorithm>sha1</FileDigestAlgorithm>
140+
</DriverSign>
135141
</ItemDefinitionGroup>
136142
<ItemGroup>
137143
<FilesToPackage Include="$(TargetPath)" />

DVServerUMD/DVServer/DVServer.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServer /tr http://timestamp
265265
Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServer /tr http://timestamp.digicert.com /td sha256 $(OutDir)DVServer\DVServer.dll
266266
certmgr -del -c -n "DVServer" -s PrivateCertStore</Command>
267267
</PostBuildEvent>
268+
<DriverSign>
269+
<FileDigestAlgorithm>sha1</FileDigestAlgorithm>
270+
</DriverSign>
268271
</ItemDefinitionGroup>
269272
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
270273
<ClCompile>
@@ -293,6 +296,9 @@ Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServer /tr http://timestamp
293296
Signtool sign /v /fd sha256 /s PrivateCertStore /n DVServer /tr http://timestamp.digicert.com /td sha256 $(OutDir)DVServer\DVServer.dll
294297
certmgr -del -c -n "DVServer" -s PrivateCertStore</Command>
295298
</PostBuildEvent>
299+
<DriverSign>
300+
<FileDigestAlgorithm>sha1</FileDigestAlgorithm>
301+
</DriverSign>
296302
</ItemDefinitionGroup>
297303
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
298304
<ClCompile>

DVServerUMD/DVServer/Driver.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,11 @@ void SwapChainProcessor::cleanup_resources()
588588
CloseHandle(m_GPUResourceMutex);
589589
}
590590

591+
if ((m_destimage != NULL) && (m_Device != NULL)) {
592+
m_Device->DeviceContext->Unmap(m_destimage, 0);
593+
m_destimage->Release();
594+
}
595+
591596
#ifdef DVSERVER_HWDCURSOR
592597
// ****** Cursor Resources ******
593598
if (devHandle_cursor != INVALID_HANDLE_VALUE)
@@ -874,13 +879,13 @@ int SwapChainProcessor::GetFrameData(std::shared_ptr<Direct3DDevice> dvserver_de
874879
ERR("Failed Staging Buffer invalid configurations\n");
875880
return DVSERVERUMD_FAILURE;
876881
}
877-
}
878882

879-
/* Create Texture2D with the staging descriptor parameters */
880-
dvserver_device->Device->CreateTexture2D(&m_staging_desc, NULL, &m_destimage);
881-
if (m_destimage == NULL) {
882-
ERR("Failed Staging Buffer CreateTexture2D is NULL\n");
883-
return DVSERVERUMD_FAILURE;
883+
/* Create Texture2D with the staging descriptor parameters */
884+
dvserver_device->Device->CreateTexture2D(&m_staging_desc, NULL, &m_destimage);
885+
if (m_destimage == NULL) {
886+
ERR("Failed Staging Buffer CreateTexture2D is NULL\n");
887+
return DVSERVERUMD_FAILURE;
888+
}
884889
}
885890

886891
WaitForSingleObject(m_GPUResourceMutex, INFINITE);
@@ -948,8 +953,6 @@ int SwapChainProcessor::GetFrameData(std::shared_ptr<Direct3DDevice> dvserver_de
948953
return DVSERVERUMD_FAILURE;
949954
}
950955

951-
dvserver_device->DeviceContext->Unmap(m_destimage, 0);
952-
m_destimage->Release();
953956
return DVSERVERUMD_SUCCESS;
954957
}
955958

Readme.txt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,6 @@ use the below command to get the display port name for that particular board
5757
3.1) In services.msc, we need to check if QEMU Guest Agent in running state
5858
3.2) Open Device Manager --> under system devices --> VirtIO Serial Driver should showup
5959

60-
-----------------------------------------------------------
61-
##### DVServer Unit Level Testing (ULT) Application #####
62-
-----------------------------------------------------------
63-
- DVServerULT will imitate DVServerUMD which will talk to DVServerKMD through realtime IOCTL & run below tests.
64-
- Basically, it will help to isolate any complex issues on the DVServerKMD
65-
- ULT is an user mode application, this will test the VirtIO GPU pipeline. The ULT will directly interact with KMD via IoCTL's and send the solid color image frame address.
66-
- Apart from this, it can get the supported QEMU EDID and displays all the supported modes
67-
68-
IMPORTANT NOTE : This is a parallel UMD component (like DVServerUMD), so we should never attempt to run this ULT when the DVServerUMD is streaming the display frame buffer address
69-
70-
Steps to avoid DVServerUMD:
71-
1. Install ZC with above method
72-
2. Go to Device manager -->Display Adapter -->DVServerUMD Device & disable
73-
3. Screen freeze will be expected & try to reboot the VM from QEMU windows
74-
4. After reboot, ZC will be disabled
75-
5. Now we can run DVServerULT.exe as mentioned below.
76-
77-
How to Use:
78-
[CMD] .\DVServerULT.exe <testcase name>
79-
Entering the tescase number as a command line arguement is optional. If no arguement is provided, the list of test cases will be displayed.
80-
edidinfo --> Will display the QEMU supported resolutions and EDID info
81-
solidframe --> this will perform "Static Frame Test". From list of resolutions, select the resolution for which the static color frame is to be generated and displayed on QEMU
82-
multicolor --> this will perform "Multicolor Frames Test". From list of resolutions, select the resolution for which the multi color frame to be generated and displayed on QEMU
83-
multipattern --> this will perform "Multicolor Multiresolution Frames Test". For all the resolutions, multicolor frames are to be generated displayed in a continuous loop on QEMU
84-
8560
-----------------------------------------------------------
8661
##### Steps to capture and decode the ETL trace #####
8762
-----------------------------------------------------------

0 commit comments

Comments
 (0)