Open indygit opened 8 years ago
Hi, Marek:
For creating textures, render targets and depth/stencil buffer, app calls the CreateTexture2D API and then the runtime calls 2 DDIs:
Vertex/index/constant buffers work similarly, but they go through CreateBuffer API.
Thanks, Indy, 1/28/2016
0: kd> kn
00 0014dae0 7568f858 rosumd!RosUmdDeviceDdi::DdiCalcPrivateResourceSize
01 (Inline) -------- d3d11!CDevice::CalcPrivateResourceSize+0x82
02 0014dae0 7568ac12 d3d11!CDevice::GetLayeredChildSize+0x60c
03 (Inline) -------- d3d11!CBridgeImpl<ID3D11LayeredDevice,ID3D11LayeredDevice,CLayeredObject
1: kd> kn
00 0014e5d0 7569beb4 rosumd!RosUmdDeviceDdi::DdiCreateResource
01 0014e5d0 7569ba2c d3d11!CResource
From: Indy Zhu Sent: Friday, January 29, 2016 11:28 AM To: Marek Kedzierski marekkedzierski@interia.pl; Bart House bhouse@microsoft.com; Hideyuki Nagase hideyukn@microsoft.com; Jordan Rhee jordanrh@microsoft.com; Jeff Wickenheiser jeffwick@microsoft.com Subject: RE: Would you be interested in working on tiled texture support ?
Hi, Marek:
We are working on the symbols issue, it is important for development, I will notify you when there is a conclusion.
You have a good plan in general, but I want to start with a smaller scope at the beginning.
Can you please take a look at RosUmdResource::CalculateMemoryLayout() ?
At the start of the tiling support work, I would suggest we start with texture with these characteristics:
This avoids the complexity of supporting :
I think the 1st place to utilize the tiling support is for initializing the texture with app supplied initial data. Can you please take a look at this commit: https://github.com/Microsoft/graphics-driver-samples/commit/f5773a0b7123b59788a28d6b1923694d9ef9cf13
I suggest you use the Cubetests and its R8G8B8A8 texture for starting the tiling work, so that we can easily compare rendering result of linear and tiled texture.
One of our goals for the VC4 driver is to render D2D content (for Windows shell/UI), have you used D2D ? Besides the common R8G8B8A8 format, D2D uses DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_A8_UNORM, DXGI_FORMAT_R8G8_UNORM in its rendering (of text/font for example). After the work for tiled R8G8B8A8 texture is done, can you please make sure we can create and sample from texture of those formats correctly ? I suggest you build a new test with Cubetests as the starting point.
And then as you planned, please move onto ResourceCopy().
Jordan is building the Raspberry into a full driver, meaning it will drive the display/monitor. For that reason, we have to make fullscreen render target/primary unlockable, meaning we can no long map it in user mode. So please keep in mind that at some point we also need tiling support code in KMD’s RosKmdRapAdapter::ProcessRenderBuffer() for the ResourceCopy case. That is used to copy render target unlockable from UM into a staging resource, which can then be Map()-ed by app.
Please let me know if you have any question. I hope you can have a bigger picture view of the project besides the technical details.
Thanks, Indy, 1/29/2016
From: Marek Kedzierski [mailto:marekkedzierski@interia.pl] Sent: Thursday, January 28, 2016 3:29 PM To: Indy Zhu indyz@microsoft.com; Bart House bhouse@microsoft.com; Hideyuki Nagase hideyukn@microsoft.com; Jordan Rhee jordanrh@microsoft.com Subject: RE: Would you be interested in working on tiled texture support ?
I forgotten to add, that this is a general sketch, I've started working on the code so I expect to have more questions soon:-)
Marek
Od: "Marek Kedzierski" marekkedzierski@interia.pl Do: "Indy Zhu" indyz@microsoft.com; Wysłane: 0:19 Piątek 2016-01-29 Temat: RE: Would you be interested in working on tiled texture support ? Indy,
I swear some of the missing symbols (like those from dxgkrnel) were available on sever about two months ago.
Version command:
Windows 10 Kernel Version 10586 MP (4 procs) Free ARM (NT) Thumb-2
Built by: 10586.63.armfre.th2_release.160104-1513
Machine Name:
Kernel base = 0x81052000 PsLoadedModuleList = 0x8123b8d8
Debug session time: Thu Jan 28 16:50:47.432 2016 (UTC + 1:00)
System Uptime: 0 days 0:53:01.515
Remote KD: KdSrv:Server=@{
Thanks for stack frames , yestarday I've already figured out the flow (at least I think:-)) through intensive debugging.
The general sketch for tiles support looks like this:
Please correct the places where I'm wrong - then I'll put the sketch on github as commentary.
Cheers,
Marek
Indy, after filling memory with right tiled format, how to inform HW that it has to deal with RosHwLayout::Tiled? Cheers, Marek
You will need to specify texture data type at texture config parameter 0/1 (TYPE/TYPE4), see hardware spec page 42/43. Currently it's set to 16 (RGBA32R) which is linear format. Once you can swizzle texture, then non-Raster format, such as 0 (RGBA8888) or 1 (RGBX8888) can be used for tiled texture.
Thanks!
All, Short status update:
I did tiled textures support (m_usage of D3D10_DDI_USAGE_DEFAULT, m_bindFlags has only D3D10_DDI_BIND_SHADER_RESOURCE bit/RGBA8888) for T type texture as Indy suggested. I will create pool request soon. I used CubeTests - I did tests on special prepared images of size 64x64 with markers, because they really helped me to figure out what is the real layout of subtiles and tiles). Right now I'm making sure everything works - I'm moving to bigger textures.
Cheers,
Marek
Thanks Marek. We are looking forward to your pull request.