[GSoC 2012] Complete the DirectX 11 render system

Threads related to Google Summer of Code
Post Reply
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Sun Jul 08, 2012 11:05 pm

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?
0 x
Watch out for my OGRE related tweets here.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Mon Jul 09, 2012 8:53 pm

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 ? :)
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Mon Jul 09, 2012 9:00 pm

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.
0 x
Watch out for my OGRE related tweets here.

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Mon Jul 09, 2012 9:01 pm

We still need to figure the active device by the window, and also think about the best way to do RTT.
0 x
Watch out for my OGRE related tweets here.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Mon Jul 09, 2012 9:32 pm

Ok, I understand it now :). I need some time to think about the best way to do RTT.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Mattan Furst
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 260
Joined: Tue Jan 01, 2008 11:28 am
Location: Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Mattan Furst » Wed Jul 11, 2012 8:19 am

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.
0 x
it's turtles all the way down

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Thu Jul 12, 2012 8:25 am

Tessellation support is working (here is the first sample):
Image

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):
Image
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Thu Jul 12, 2012 9:54 am

The color on the FPS control - shows we have other issues with the RTSS...
0 x
Watch out for my OGRE related tweets here.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Thu Jul 12, 2012 10:41 am

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:
Image

I am trying to resolve it, but do not find the problem yet.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Thu Jul 12, 2012 11:04 am

It worked before the summer project - so try to resolve this - as this is a critical thing.
0 x
Watch out for my OGRE related tweets here.

vitek502
Gnoblar
Posts: 3
Joined: Wed Nov 10, 2010 10:45 am
Location: Minsk, Belarus

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by vitek502 » Thu Jul 12, 2012 1:53 pm

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.
Attachments
Source.zip
(32.29 KiB) Downloaded 73 times
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by CABAListic » Sat Jul 14, 2012 8:56 pm

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 :)
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Assaf Raman » Sat Jul 14, 2012 8:59 pm

In the project scope, we talked about it - check the thread. :D
0 x
Watch out for my OGRE related tweets here.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Sat Jul 14, 2012 10:12 pm

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.
Image
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Tue Jul 17, 2012 9:45 pm

Still working on bugfixes :( ..
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Sat Jul 21, 2012 10:58 am

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.
Image
Image
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by duststorm » Sat Jul 21, 2012 11:22 am

Nice work! :) Good that the debugging is over, so you can work on new things again.
0 x
Developer @ MakeHuman.org

User avatar
Mattan Furst
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 260
Joined: Tue Jan 01, 2008 11:28 am
Location: Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Mattan Furst » Mon Jul 23, 2012 6:16 am

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.
0 x
it's turtles all the way down

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Mon Jul 23, 2012 9:27 am

I haven't read that wiki page about patching with tortoiseHG.

Is there any way I can fix this problem with the repository ?
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Mattan Furst
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 260
Joined: Tue Jan 01, 2008 11:28 am
Location: Israel

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Mattan Furst » Mon Jul 23, 2012 9:33 am

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).
0 x
it's turtles all the way down

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Mon Jul 23, 2012 9:48 am

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.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by PhilipLB » Mon Jul 23, 2012 10:08 am

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:

Code: Select all

[extensions]
hgext.win32text=
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...
Last edited by PhilipLB on Tue Jul 24, 2012 10:29 pm, edited 1 time in total.
0 x
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Tue Jul 24, 2012 10:28 pm

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.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Eugene
OGRE Team Member
OGRE Team Member
Posts: 183
Joined: Mon Mar 24, 2008 4:54 pm
Location: Odessa, Ukraine

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by Eugene » Wed Jul 25, 2012 4:08 pm

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.
0 x

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2012] Complete the DirectX 11 render system

Post by robert_sasu » Wed Jul 25, 2012 10:24 pm

I am doing manually the merging so I change the actual conflicts :), there are also a lot of changes in my branch too.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

Post Reply