Page 5 of 11
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sun Jul 08, 2012 11:05 pm
by Assaf Raman
I have an idea regarding the "Multi-device support".
The idea is not to add support in the OGRE level, but in the d3d11 level - meaning implementing the d3d11 interfaces in a way that will support multi-devices, you will create a "d3d11MultiDevice" instead of the normal 3d3d11 device - and it will create devices on all adapters for you, if you will create resources - it will return its own implementation of the d3d resource and create the resource on all adapters and such, this way we will be able to support multi-devices without any real code change in OGRE, in the end - if we want to use multiple devices - we will always use them all (or part of them - but we can set parameters to control that).
Do you get my idea or do you want me to explain it more?
If you get it, do you like it?
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 09, 2012 8:53 pm
by robert_sasu
I like very much this idea. I like to resolve every problem with the simplest ideas and to simplify them, as in general these are the fastest and best ones.
Can you add some more details on code implementation, what type of methods should I include to the d3d11 interface ?

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 09, 2012 9:00 pm
by Assaf Raman
Active device is a must, you set it before rendering.
The idea is that render commands are sent only to the active device - but resources are loaded to all devices.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 09, 2012 9:01 pm
by Assaf Raman
We still need to figure the active device by the window, and also think about the best way to do RTT.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 09, 2012 9:32 pm
by robert_sasu
Ok, I understand it now

. I need some time to think about the best way to do RTT.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Wed Jul 11, 2012 8:19 am
by Mattan Furst
The way RTT (render-to-texture) and devices work, at least in Direct3D9. is this:
There are 2 pathways to render RTTs. Within calls to update render windows and outside them.
In the first option you call to render a (render target) window. The window sets the active device during the _beginUpdate() function. The window then calls preViewportUpdate to all registered RenderTargetListener. During this function call if you render an RTT the RTT renders only to the active device. When the render target finishes it removes resets the active device to NULL during the _endUpdate() function.
If you render outside the scope of rendering a render window the active device should be NULL. In which case the RTT should render to all devices simultaneously.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Thu Jul 12, 2012 8:25 am
by robert_sasu
Tessellation support is working (here is the first sample):
RTSS cannot generate now Shader Models 5.0, so after the implementation of it there will be more results with working PN-Patches and Detailed Tessellation with Brezier displacement.
Here is another printscreen for MRT (there are no object because the above mentioned issue, but will rewrite the shaders to work):

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Thu Jul 12, 2012 9:54 am
by Assaf Raman
The color on the FPS control - shows we have other issues with the RTSS...
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Thu Jul 12, 2012 10:41 am
by robert_sasu
I think we have some problem with the alpha-blending as there are a lot of black sequences in samples.
Here is an example of Sphere Mapping sample:
I am trying to resolve it, but do not find the problem yet.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Thu Jul 12, 2012 11:04 am
by Assaf Raman
It worked before the summer project - so try to resolve this - as this is a critical thing.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Thu Jul 12, 2012 1:53 pm
by vitek502
Hi guys.
I found some problems and errors in DirectX11 render system.
1. We have problem with texture format - format DXT5 doesn't match DXGI_FORMAT_BC5_UNORM ( OgreD3D11Mappings.cpp case PF_DXT5:return DXGI_FORMAT_BC5_UNORM; ) DXT5 is DXGI_FORMAT_BC3_UNORM. A problem with other format might be possible
http://www.msdn.microsoft.com/en-us/lib ... s.85).aspx
2. Method static void getDefines(vector<D3D10_SHADER_MACRO>::type& defines, const String& definesString) in OgreD3D11HLSLProgram.cpp, always return "" in defines.Name
In the attached files fixed trouble with preprocessor_defines and added support multi constant buffer.
And FSAA not working in my project.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sat Jul 14, 2012 8:56 pm
by CABAListic
I just wanted to draw your attention to a pull request by eugene that contains a couple of bugfixes for the D3D11 rendersystem:
https://bitbucket.org/sinbad/ogre/pull- ... upposed-to
I'm not sure if this is in your project scope, maybe you can check them out. Otherwise I'll leave it to Assaf

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sat Jul 14, 2012 8:59 pm
by Assaf Raman
In the project scope, we talked about it - check the thread.

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sat Jul 14, 2012 10:12 pm
by robert_sasu
After I get rid of the current bug in the D3D11 Render System, then I will merge eugene's code with the current RS. After that I will start implementing the Multi-Device support. This is my 3rd day lost on bugfix, but I still can't resolve the problem. (There is a slightly better result now, but still not what we need). I thought the problem was with alpha-blending support, but I debugged it, so it should be correct.

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Tue Jul 17, 2012 9:45 pm
by robert_sasu
Still working on bugfixes

..
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sat Jul 21, 2012 10:58 am
by robert_sasu
After a few days of debugging, finally this phase is over. I had some problems with flags in texture. Now, all the results are proper and good

.
Later today, I will start to merge evandromillian's code to the current render system, and after that to work on Multi-Device support.

Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Sat Jul 21, 2012 11:22 am
by duststorm
Nice work!

Good that the debugging is over, so you can work on new things again.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 23, 2012 6:16 am
by Mattan Furst
Hello Robert_sasu
I attempted today to add a bug fix to your branch. When doing so I was prompted to change the entire file in the commit process even though I only changed 1 line. This is usually an indication that check-ins have been made without setting the the mercurial extension "hgext.win32text" as part of the tortoiseHG setup (As instructed on page
http://www.ogre3d.org/tikiwiki/Getting+ ... TortoiseHG).
Regardless of me wanting to fix something in the code this might be problematic when you attempt to merge the code with Ogre's trunk, or in this case when Assaf Raman will.
Please check with Assaf.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 23, 2012 9:27 am
by robert_sasu
I haven't read that wiki page about patching with tortoiseHG.
Is there any way I can fix this problem with the repository ?
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 23, 2012 9:33 am
by Mattan Furst
I'm not sure. talk to philipLB. he did it a philipLB a bit after he started his project. I think you may need to check out all the files you changed and check them back in.
In any case you might want to wait for Assaf. It might not be problematic for the final merge I'm not sure (he's currently in vacation. He'll be back in 2 days).
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 23, 2012 9:48 am
by robert_sasu
Ok, then I will wait for Assaf to come back and to discuss this problem. Until then I will work on merging evandromillian's work of WindowsRT support.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Mon Jul 23, 2012 10:08 am
by PhilipLB
Hi,
was it linebreaks which caused the problems?
Maybe this is what happens: You checked in code with Windows linebreaks, Mattan changed something small and has activated the TortoiseHG plugin. Now the plugin touches about every line by converting the Windows linebreaks to Unix ones.
I'd activate this plugin for your Ogre repository (only this one, because there might be other projects not requiring this) by going to the repositories TortoiseHG workbench -> File -> Settings -> <yourName> repository settings -> Edit File. Here, add this lines:
or just "hgext.win32text=" in a new line in the [extensions] section if it already exists.
Now I guess you might re-commit everything you did which is a bit ugly, but needed to change the existing linebreaks.
This is all just a bit of a guess, but might be the case...
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Tue Jul 24, 2012 10:28 pm
by robert_sasu
I was working today on merging Eugene's work with the current RS system and have done some minor things on the multi-device support.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Wed Jul 25, 2012 4:08 pm
by Eugene
robert_sasu wrote:I was working today on merging Eugene's work with the current RS system and have done some minor things on the multi-device support.
Hello, Robert. Current version of WinRT patches (see
https://bitbucket.org/eugene_gff/ogre-winrt) is based on much later revision (July 18) than your work is (Jun 7), so if you merge it than part of the work should be rolled back and than needs to be done again when you will merge with the trunk. Therefore it`s probably easier to merge with trunk and than with head of winrt branch than doing it your way.
Re: [GSoC 2012] Complete the DirectX 11 render system
Posted: Wed Jul 25, 2012 10:24 pm
by robert_sasu
I am doing manually the merging so I change the actual conflicts

, there are also a lot of changes in my branch too.