Dear All:
Sorry to bother - I just ran into something quite curious in terms of a Wine-specific feature that is certainly not matched in Windows XP and was wondering what its purpose was...
Also, should I use todo_wine to test for this, or is there a better way since this seems something that obviously we're not trying to "make conform" in Wine but rather something that seems to be an intended feature (please correct me if I am incorrect).
Specifically, this is a usage flag for index buffer creation that seems to have been introduced here:
commit 3529560cd7a4f752596e80d4084e9527b348eb22 Author: Stefan Dösinger stefandoesinger@gmx.at Date: Thu Oct 5 17:56:54 2006 +0200
wined3d: Add WINED3DUSAGE_OVERLAY.
diff --git a/dlls/d3d9/indexbuffer.c b/dlls/d3d9/indexbuffer.c index fc85357..269552a 100644 --- a/dlls/d3d9/indexbuffer.c +++ b/dlls/d3d9/indexbuffer.c @@ -175,7 +175,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, object->lpVtbl = &Direct3DIndexBuffer9_Vtbl; object->ref = 1; TRACE("Calling wined3d create index buffer\n"); - hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object); + hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage & WINED3DUSAGE_MASK, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object); if (hrc != D3D_OK) {
/* free up object */
Thank you Misha
Am 09.07.2010 um 03:21 schrieb Misha Koshelev:
wined3d: Add WINED3DUSAGE_OVERLAY.
This was added for overlay surfaces that only exist in ddraw. The mask is to make sure d3d9 apps don't accidentally pass this flag to wined3d. I don't think a test is needed, unless we find a windows app that tries to use this flag and expects a certain outcome.
d3d9 gained support for overlay surfaces in windows 7, so maybe we can migrate wined3d's overlay support to use the d3d9 way and adjust ddraw.dll to use it.
On Fri, 2010-07-09 at 11:31 +0200, Stefan Dösinger wrote:
Am 09.07.2010 um 03:21 schrieb Misha Koshelev:
wined3d: Add WINED3DUSAGE_OVERLAY.
This was added for overlay surfaces that only exist in ddraw. The mask is to make sure d3d9 apps don't accidentally pass this flag to wined3d. I don't think a test is needed, unless we find a windows app that tries to use this flag and expects a certain outcome.
d3d9 gained support for overlay surfaces in windows 7, so maybe we can migrate wined3d's overlay support to use the d3d9 way and adjust ddraw.dll to use it.
Thanks. I will have to process this. But just to clarify: 1) I am actually testing something else (index buffer description in mesh object):
See my patch here please http://github.com/misha680/wine/commit/d182054430ea4976744b49d3d74f1f04039ff...
Just to be thorough I am testing usage flag as well and that is why I noticed the discrepancy.
The patch that implements is here: http://github.com/misha680/wine/commit/519f38e9996892f7be47b5fc2332c3a807df4...
You can see that the usage is still a todo_wine.
I will leave it like this, but if you think there's a better way please let me know.
d3d9 gained support for overlay surfaces in windows 7, so maybe we can migrate wined3d's overlay support to use the d3d9 way and adjust ddraw.dll to use it.
2) I am going to have to re-read this later to understand it, but I will keep this on a back-burner as something perhaps to do after:
http://bugs.winehq.org/show_bug.cgi?id=22918
Misha
p.s. I have updated my Wiki page to reflect my current direction http://wiki.winehq.org/MishaKoshelev
I am sorry I've completely gone anti-general format - instead of one TODO list I have three (CURRENT = _will do_, FUTURE??? = ideas that may or may not do, PAST = already done). If this is really a big problem I will change back but I like doing one thing at a time while having potential future ideas to work on (thanks Dan and Stefan, well and everyone else).