2017-09-01 20:19 GMT+02:00 Paul Gofman gofmanp@gmail.com:
+static void test_effect_null_shader(void) +{
- D3DPRESENT_PARAMETERS present_parameters = {0};
- IDirect3DDevice9 *device;
- ID3DXEffect *effect;
- D3DXPASS_DESC desc;
- IDirect3D9 *d3d;
- D3DXHANDLE pass;
- ULONG refcount;
- HWND window;
- HRESULT hr;
- /* Creating a fresh device because the existing device can have invalid render states
from previous tests. If IDirect3DDevice9_ValidateDevice() returns certain error codes,
native ValidateTechnique() fails. */
We generally want to be sure that each test is independent from the others so creating a separate device for each test function is a good idea regardless.
Your point about ValidateDevice() is very interesting though, actually it makes a lot of sense and it probably means that ValidateTechnique() should delegate a good chunk of its work to ValidateDevice() (not surprising but somehow I forgot about it). It would be interesting to extend the d3d9 ValidateDevice() tests at some point.