Finally, a DirectX 10 video driver for Irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

i didn't though about using pix ill give it a go
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

Even after using pix and everythings i could i stilll cannot get it to wrk properly with the FVF how ever i got the driver to work with 1.8 in the past. so maybe i could port it to 1.8 and someone who understand the FVF could help it be ported over.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Nadro »

This is the best idea I think. Currently I'm busy with another things, so I can't help.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

I finally took the time to port this to the 1.8 trunk again

both of these are limited to visual studio 2010 as it's the compiler i use and until this driver is completed i won't add suport for others so if you are using an other compiler you will need to add create your own project file and add the files manualy (or correct those of the existing native irrlicht projects)

irrlicht 1.8 .patch file uploaded :http://www.mediafire.com/download.php?t9ebhen7t44brbf
To use this you have to use the 1.8 trunk fromt the svn
then you need to download the dx SDK
apply the patch
run the sln nb11 (i could not patch all solutions)
correct the includes and lib folders in the project to those from your sdk instalation
compile the dx11 effect framework located at "Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11" and add it's include and lib folders in the irrlicht project


Irrlicht 1.8 DX11 rar archive: http://www.mediafire.com/?isgphd9mjm7g4zm
To us this you need to download the dx SDK
Uncompress the files
run the sln nb11 (i could not patch all solutions)
correct the includes and lib folders in the project to those from your sdk instalation
compile the dx11 effect framework located at "Microsoft DirectX SDK (June 2010)\Samples\C++\Effects11" and correct the include and lib folders in the irrlicht project

Some aditional notes on known bug and kinks

geometry shaders won't be able to work at thier full potential because they willl only be able to output standar vertex and no custom format unless there is a work around somewhere or the irrlicht interphase get updated to accomodate this i also think that this is the part of the interphase i screwed when i was getting it to the FVF

I updated the shader parameter interphase to better handle matrix array and to simply handle ints

2d is still broken like hell it's bad idea to use it if you are at any risk of getting epilepsy crysis

normal mapped material looks like it need a rework ill look to it

Skybox and skydome are broken, i have no idea why skybox were broken in the original but skydrome was not broken so ill have a look to it
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Mel »

What happens with the 2D drawing?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

no idea it was broken even back when evans was building the driver so ill have to digg deep into the driver to find out unless some one already saw this.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Mel »

Can't you draw directly triangle lists on the DierctX10 driver? Not meshbuffers, just a list of vertices and triangles? with an orthogonal drawing setup, shouldn't be hard...
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

i don't think it's possible because the dx10 driver upload everything to a hardware buffer befor drawing the hardware buffer if you wan you could download it and give it a go caus right now i'm trying to figure out irrlicht's shader creation interphase to see if i missed something or if geometry shader are effectively limited on DX
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by hybrid »

I hope that geometry shaders and 2d rendering are not related in the driver!? But anyway, creating a 2d rectangle on the fly and uploading this to the hw buffer shouldn't be a problem. We do this also for opengl-es
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

They are not currently but hell that could be an interesting way to render 2d element especialy for batched image drawing
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Mel »

Lazy ass question (sorry :lol: )... what is necesary to compile this driver?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

directx sdk and you need to compile the effect framework11 i described the work you need to do depending on wich package you download


Idealy you would need visual studio 2010 or higher and open the Irrlicht11.0.sln as i didnot put the changes back in every solution
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

Odd limitation i just found out the use of the "#include" directive is not working because we have to write our own include handeler but mine is failing to work properly

Code: Select all

 
class IncludeFX :public ID3DInclude 
{ 
    irr::io::IReadFile* Include;
    irr::c8* retInclude;
    irr::io::IFileSystem* FileSystem;
    UINT mBytes;
public:
    IncludeFX(irr::io::IFileSystem* fileSystem)
    {
        FileSystem = fileSystem;
    }
 
public:
    virtual HRESULT __stdcall Close(THIS_ LPCVOID pData)    
    {        
        Include->drop(); 
        delete retInclude;
        return S_OK;
    }    
public:
    virtual HRESULT __stdcall Open(THIS_ D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes)
    {        
        Include = FileSystem->createAndOpenFile(pFileName);
        if (!Include)
        {
            irr::os::Printer::log("Could not open Include shader program file",
                pFileName, irr::ELL_WARNING);
            return S_FALSE;
            
        }
        mBytes = Include->getSize();
        pBytes = &mBytes;
        retInclude = new irr::c8[mBytes+1];
            Include->read(retInclude, mBytes);
            retInclude[mBytes] = 0;
        ppData = (LPCVOID *)retInclude;
        return S_OK;
    }
};

if any one has experience with the thing and could explain me why it's failing that would be apeciated


I also Implemented backward compatibilitie with dx9 shader code so it's possible to write shader that will compile in dx9 and dx10
to use it you set the target shader model under sm 4.0 it will automaticaly compile the shader in compatibilitie mode the only notable diference is that it requite to set up the texture sampler in shader( since it's igniored in irrlicht dx9)

I might upload an new version as soon as i hunt a small bug down.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by sio2 »

Granyte wrote:Odd limitation i just found out the use of the "#include" directive is not working because we have to write our own include handeler but mine is failing to work properly

if any one has experience with the thing and could explain me why it's failing that would be apeciated

<CODE SNIPPED>

I also Implemented backward compatibilitie with dx9 shader code so it's possible to write shader that will compile in dx9 and dx10
to use it you set the target shader model under sm 4.0 it will automaticaly compile the shader in compatibilitie mode the only notable diference is that it requite to set up the texture sampler in shader( since it's igniored in irrlicht dx9)

I might upload an new version as soon as i hunt a small bug down.
Isn't the priority to fix the 2D stuff? Seems majorly flawed for general use if there's no GUI support IMHO. BTW I have the GUI working acceptably in my version of the code - I sat down with a debug build and debugged it.

Also, unless I've missed something in your post, you don't seem to mention why your include handler doesn't work. More information would be useful. If the working folder set correctly BTW?

Not quite sure about the "write shader that will compile in dx9 and dx10". Won't the compile for SM3 fail as soon as someuse uses SM4/5 features such as gather, etc?
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Finally, a DirectX 10 video driver for Irrlicht

Post by Granyte »

yes if you use these features it wiill faill but you can't use these feature when the shaders compile in compatibilitie mode anyway.

For the include handeler that's exactly the point i have no idea why it's not working and there is not example about how to do this anywhere on the web and the code compile but fails to build suitable shader code.


Yes fixing 2d drawing will be the next priority when i'm done with an other bug that i have yet to track down that cause the dx11 driver to crash when setting matrix to a shader and the odd about that one is that it does not happen with any of the samples only with a custom project.
EDIT material typeparam2 is not properly transmitted in the driver or something mess with the value
edit Onsetmaterial of the callback was never called issue fixed

also froma first look at what is happening in 2d i'd say 2d batched draw calls is not doing it's job but i have not yet disected the code and if you have already fixed it you couldhelp me fix it faster?
Post Reply