Hi,
What is the status on Shader support for DX9 in the latest WINE cvs, and the future projections of support in this area?
I am working on a transition project, and am curious how far off support for this is in the WINE project, and perhaps where work needs to be done. Are there any people organizing this effort here?
-- Coleman Kane
There's some initial shader stuff in wine but not sure how well it works. I don't know what the status on it is as we haven't heard anything from the guy who was working on this. He was also working on moving the d3d8 code over to wined3d. If you have time to help out, all help is usefull :) One of the usefull things to do before starting to hack on shaders is to finish the d3d8/d3d9 merge as both can then share the same shader code.
Roderick
On Tuesday 31 January 2006 20:37, Coleman Kane wrote:
Hi,
What is the status on Shader support for DX9 in the latest WINE cvs, and the future projections of support in this area?
I am working on a transition project, and am curious how far off support for this is in the WINE project, and perhaps where work needs to be done. Are there any people organizing this effort here?
-- Coleman Kane
On Tue, 2006-01-31 at 21:26 +0100, Roderick Colenbrander wrote:
There's some initial shader stuff in wine but not sure how well it works. I don't know what the status on it is as we haven't heard anything from the guy who was working on this. He was also working on moving the d3d8 code over to wined3d. If you have time to help out, all help is usefull :) One of the usefull things to do before starting to hack on shaders is to finish the d3d8/d3d9 merge as both can then share the same shader code.
Roderick
On Tuesday 31 January 2006 20:37, Coleman Kane wrote:
Hi,
What is the status on Shader support for DX9 in the latest WINE cvs, and the future projections of support in this area?
I am working on a transition project, and am curious how far off support for this is in the WINE project, and perhaps where work needs to be done. Are there any people organizing this effort here?
-- Coleman Kane
Is there a TODO or similar documentation on D3D8 & 9 for Wine? I don't necessarily have much background in DirectX. Last time I used it was when DirectX 3.0 was brand spanking new and was all the rave. I'm willing to work, but don't know where to start and am limited on time available to search for it. If someone has already begun some organization of this, like a hit-list or something, that would be quite helpful.
Also, does anybody know what the status is compared to WineX/Cedega? Do they have a more fully featured shader implementation? What's there status/policy on porting back to Wine?
Any work that I do will fall right back in the Wine repo.
-- Coleman Kane
Is there a TODO or similar documentation on D3D8 & 9 for Wine? I don't necessarily have much background in DirectX. Last time I used it was when DirectX 3.0 was brand spanking new and was all the rave. I'm willing to work, but don't know where to start and am limited on time available to search for it. If someone has already begun some organization of this, like a hit-list or something, that would be quite helpful.
There's no todo list right now. Right now the best approach would be to finish the d3d8 to wined3d move so that both d3d8 and d3d9 share the same core. Then remaining bugs should be fixed so that more games work. After that performance tweaks should be added and more features like shaders.
Also, does anybody know what the status is compared to WineX/Cedega? Do they have a more fully featured shader implementation? What's there status/policy on porting back to Wine?
A long time ago WineX/Cedega separated from Wine. In the beginning when Wine was X11 licensed they sometimes ported stuff back to Wine but these days they don't do that anymore. Wine's implementation of Direct3D is quite good but compared to cedega performance isn't optimal and our shader support is very basic but modern games like Halflife2 and others work.
Roderick
Roderick Colenbrander <thunderbird2k <at> gmx.net> writes:
Is there a TODO or similar documentation on D3D8 & 9 for Wine? I don't necessarily have much background in DirectX. Last time I used it was when DirectX 3.0 was brand spanking new and was all the rave. I'm willing to work, but don't know where to start and am limited on time available to search for it. If someone has already begun some organization of this, like a hit-list or something, that would be quite helpful.
There's no todo list right now. Right now the best approach would be to finish the d3d8 to wined3d move so that both d3d8 and d3d9 share the same core. Then remaining bugs should be fixed so that more games work. After that performance tweaks should be added and more features like shaders.
Here is a (probably outdated) link:
http://wiki.winehq.org/DirectX-ToDo
There should be a couple other related pages if you do a quick search the wiki for wined3d, directx, d3d etc. I'm a bit familiar with the wined3d stuff, but unfortunately I haven't looked at the shader stuff enough to be able to tell you what the status is. I find it is usually easiest to work on wined3d if you have some easy-to-run test cases that can help pinpoint problems faster since wined3d is non-trivial code.
Stephen was working on porting d3d7 and ddraw to wined3d, but last I heard he is busy with exams or such. Haven't heard from Oliver in a while on this list. I currently have an unsubmitted patch which gets rid of all the glX dependencies in ddraw/d3d7/d3d8/d3d9 and wined3d and uses wgl directly... not a performance improvement or anything but would improve encapsulation of all the respective libraries and reduce duplicated code in wined3d and opengl32.
Regards, Aric
Hi all,
Shaders (in wined3d) support is almost complete (minor some bugs) for : - vs 2.1 for Vertex Shader - ps 1.3 for pixel Shader
Oliver have successfully merged d3d8 code into wined3d but software emulatlion for VS seems broken
Anyway we don't have the code to support GLSL (or NV_shader) who is needed for some advanced shaders instructions (essentially loops) that cannot be done with ARB_fragment_program.
For todo List: http://wiki.winehq.org/DirectX-ToDo (and check TODOs in code)
For comparison with Cedega our DirectX implementation support is most complete (but with more bugs) but not really optimized (example: we haven't yet added support for HW vertex buffers and index buffers)
Adding VS 3.0 support on wine can improve a lot of new games (as HL2).
Sorry for the late response, i'm really busy now (i'm moving)
Regards, Raphael
Hi,
Here is a (probably outdated) link:
In my eyes this list is quite up to date.
Out of curiosity, does anyone know what happened to Oliver? I haven't heard from him since quite a long time :(
As for my ddraw/d3d7 work: I have ddraw working fine(but not Opengl accellerated), and D3D rendering is working basically. However, I am still stuck on IWineD3DSurface::GetDC / IWineD3DSurface::ReleaseDC, and they are show stoppers for d3d7 games.
On 2/1/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
Hi,
Here is a (probably outdated) link:
In my eyes this list is quite up to date.
I need to update the [DirectSound] section to reflect that full duplex support has been added. Other than that I'm not aware of anything that's terribly out of date.
Feel free to update, correct or even extend the page if your aware of something that's in need of change. Or send the needed changes to me and ill update the page.
Cheers,
Tom
Stefan Dösinger wrote:
However, I am still stuck on IWineD3DSurface::GetDC / IWineD3DSurface::ReleaseDC, and they are show stoppers for d3d7 games.
Here's the relevant post. http://article.gmane.org/gmane.comp.emulators.wine.devel/38533/
Unfortunately I'm of no use wrt. that, but thought I'd provide the pointer and maybe someone else can help or comment.
OTOH, if you (Stefan) or the other DirectX guys need moral support or a new DirectX game to play with, let me know ;-).
(PS. Also searched the archives looking for other IWineD3DSurface::GetDC related stuff. There's this: http://article.gmane.org/gmane.comp.emulators.wine.devel/32994/, but it's of course pretty irrelevant to the question Stefan's asking in the other archive link..)
On 01/02/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
As for my ddraw/d3d7 work: I have ddraw working fine(but not Opengl accellerated), and D3D rendering is working basically. However, I am still stuck on IWineD3DSurface::GetDC / IWineD3DSurface::ReleaseDC, and they are show stoppers for d3d7 games.
Have you got a diff against a current tree anywhere? I can't promise I'll be of any help, but I wouldn't mind taking a look sometime when I can find the time. A small test program might be usefull as well.
Hi,
Have you got a diff against a current tree anywhere? I can't promise I'll be of any help, but I wouldn't mind taking a look sometime when I can find the time. A small test program might be usefull as well.
I have a test program, and I can provide a diff with my d3d7 tomorrow. However, I think it will be better for you if I just provide a diff with my GetDC and a D3D9 test app, instead of the whole ddraw / d3d7 patch.
I'll send this things tomorrow.
Stefan
Have you got a diff against a current tree anywhere? I can't promise I'll be of any help, but I wouldn't mind taking a look sometime when I can find the time. A small test program might be usefull as well.
I have attached a diff with my getDC implementation against the current tree, and a test application. The GetDC is taken from ddraw, and it's explained in http://article.gmane.org/gmane.comp.emulators.wine.devel/38533/ The problem of this code is that it crashes with a heap corruption sooner or later :(
The test program can be compiled with winelib, you only have to place a image.bmp file into it's folder with the size 640x480 and 24 bit color depth. It should show the image after loading. I wasn't able to run this program on a windows machine, because I didn't have access to one, but I think it should work.
If you have any ideas why GetDC fails, please tell me
Stefan
On 03/02/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
If you have any ideas why GetDC fails, please tell me
trace:d3d_surface:IWineD3DSurfaceImpl_LockRect returning memory <at> 0x7dfa0020,
pitch(4096) dirtyfied(1)
First chance exception: page fault on read access to 0x7dfa0000 in 32-bit code
(0x7ff99374). Note the addresses there.
- This->dib.DIBsection = DIB_CreateDIBSection(ddc, b_info, usage,
&(This->dib.bitmap_data), 0, (DWORD) lock.pBits, lock.Pitch); I'm not sure you can do that like that. lock.pBits is allocated with HeapAlloc, and it looks like DIB_CreateDIBSection expects memory allocated with VirtualAlloc, judging by a quick look at the code and the commit comment here: http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=8b9f33851a5cfde1f812... Perhaps someone a bit more familiar with that code could comment on that.
Hi,
I'm not sure you can do that like that. lock.pBits is allocated with HeapAlloc, and it looks like DIB_CreateDIBSection expects memory allocated with VirtualAlloc, judging by a quick look at the code and the commit comment here:
You could be right with this: I've checked in ddraw, and it allocates the surface memory with VirtualAlloc. I'll look at this
What is the relevant difference between HeapAlloc and VirtualAlloc? I've read the msdn pages, and I couldn't find anything that would make a crucial difference for a bitmap.
Stefan
On 09/02/06, Stefan Dösinger stefandoesinger@gmx.at wrote:
What is the relevant difference between HeapAlloc and VirtualAlloc? I've read the msdn pages, and I couldn't find anything that would make a crucial difference for a bitmap.
VirtualAlloc allocates / reserves entire pages. 0x7dfa0000 is probably the base address of the page for 0x7dfa0020.
On Tuesday 31 January 2006 21:26, Roderick Colenbrander wrote:
There's some initial shader stuff in wine but not sure how well it works. I don't know what the status on it is as we haven't heard anything from the guy who was working on this. He was also working on moving the d3d8 code over to wined3d. If you have time to help out, all help is usefull :) One of the usefull things to do before starting to hack on shaders is to finish the d3d8/d3d9 merge as both can then share the same shader code.
I have experimented a bit with oliver's d3d8 code. Initially I tried to merge portions of it in d3d8 but after some time it seemed to be too difficult as lots of parts need big changes. In the end I used his whole d3d8 dll (the patch for the d3d8 itself looked quite clean) I then added a few changes to the current wined3d to get it working and it works quite well. I tried lots of d3d8 demos from codesamples.com and most work except for the ones which use shaders. Roughly the same for the demos from the dx8.1 sdk except some of those fail because they can't detect some hw features (hw bumpmapping..) or they crash because of our buggy dmusic.dll. I don't have much games here, I tried the demo of warcraft 3 and it working (although with drawing errors) but performance looked a lot faster (the drawing errors contribute for a small portion to the performance improvement I think).
I made a patch against wine 0.9.7 which can be found here: http://roderick.student.utwente.nl/d3d8.tar.gz. The patch contains small diffs of all files and a file containing all diffs in one file. All people who want to work on d3d8 can use this as a starting point.
It might even be a good idea to merge this patch into cvs although it will break things. Basicly it exposes bugs in wined3d which need to be fixed.
Roderick