[5/6] ddraw: fix palette copying when destination palette is NULL
alexd4 at inbox.lv
Tue Jan 1 19:16:13 CST 2008
OK, thanks a lot. Regarding vertex structure - I'm afraid I can't reuse struct
vertex/nvertex, because I need a very specific format for this test
(D3DFVF_XYZRHW | D3DFVF_DIFFUSE). I could probably reuse sVertexT from fogtest,
but then I'll also have to set specular, that I don't really need. I looks
easier to declare a custom format that has just what I need.
I'll make changes according to other suggestions.
I've ran into some issues while trying to write a test for the old D3D
TEXTUREMAPBLEND state AVP1 game uses. I hope you can help me a bit with it.
The problem is, interfaces at least as recent as DX7 seem to be refusing this
state (I can't make it work on XP). So I probably have to use something older.
Unfortunately, so far I had no luck in creating interfaces that are older than
IDirect3DDevice7, but less painful to use than the very first IDirect3DDevice: I
don't have any DX6 docs and all working examples I can find including AVP1 use
either IDirect3DDevice or something from DX7 or later, and trivial modifications
to examples with IDirect3DDevice I've made fail on XP, usually on the step when
I create IDirect3DDevice3 or something like that. So grudgingly I settled for
IDirect3DDevice and I even have an almost complete test. But it's longer that it
could be with DrawPrimitive calls, because of all that executebuffer horror.
So the question is, is it ok if I submit it like this? From a certain point of
view, there can even be benefits from using IDirect3DDevice, as it may also test
some functions and codepaths not covered by other tests. Or do I have to
continue to look for ways to write it with newer interfaces so that to make it
more compact by getting rid of executebuffer? And, also, where to put it?
ddraw/tests/visual.c seems mostly IDirect3DDevice7-centric, so, perhaps, visual
tests involving earlier interfaces should go in a separate file? Or put it into
visual.c and simply ignore / release DX7 interfaces?
Stefan Dösinger wrote:
> It is likely that Alexandre was waiting for an OK from me or Henri. He is the
> only committer, but when someone he doesn't know sends a patch he usually
> waits for the OK from someone who is maintaining the part of Wine. I think I
> forgot to send an OK mail to the test when you submitted it.
> A few minor suggestions for the test:
> * The vertex structure should be declared somewhere else already, as part of
> the lighting test I think. You can reuse that instead of redeclaring it.
> * You don't have to AND the color if 0xffffff, getPixelColor should do that
> * You don't have to set the render states unless you need a different setting
> than the previous tests leave behind
> * The "if(hr == D3D_OK)" after BeginScene should be changed
> to "if(SUCCEEDED(hr))"
More information about the wine-devel