4 * Copyright 2005 Oliver Stieber
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "d3d8_private.h"
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(d3d8
);
29 HRESULT WINAPI
D3D8GetSWInfo(void) {
30 FIXME("(void): stub\n");
34 void WINAPI
DebugSetMute(void) {
38 IDirect3D8
* WINAPI DECLSPEC_HOTPATCH
Direct3DCreate8(UINT sdk_version
)
42 TRACE("sdk_version %#x.\n", sdk_version
);
44 if (!(object
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, sizeof(*object
))))
46 ERR("Failed to allocate d3d8 object memory.\n");
50 if (!d3d8_init(object
))
52 WARN("Failed to initialize d3d8.\n");
53 HeapFree(GetProcessHeap(), 0, object
);
57 TRACE("Created d3d8 object %p.\n", object
);
59 return &object
->IDirect3D8_iface
;
62 /* At process attach */
63 BOOL WINAPI
DllMain(HINSTANCE hInstDLL
, DWORD fdwReason
, LPVOID lpv
)
65 TRACE("fdwReason=%d\n", fdwReason
);
66 if (fdwReason
== DLL_PROCESS_ATTACH
)
67 DisableThreadLibraryCalls(hInstDLL
);
72 /***********************************************************************
73 * ValidateVertexShader (D3D8.@)
75 * I've seen reserved1 and reserved2 always passed as 0's
76 * bool seems always passed as 0 or 1, but other values work as well...
79 HRESULT WINAPI
ValidateVertexShader(DWORD
* vertexshader
, DWORD
* reserved1
, DWORD
* reserved2
, BOOL
bool, DWORD
* toto
)
84 if (TRACE_ON(d3d8
) || !warned
) {
85 FIXME("(%p %p %p %d %p): stub\n", vertexshader
, reserved1
, reserved2
, bool, toto
);
92 if (reserved1
|| reserved2
)
95 switch(*vertexshader
) {
101 WARN("Invalid shader version token %#x.\n", *vertexshader
);
108 /***********************************************************************
109 * ValidatePixelShader (D3D8.@)
114 HRESULT WINAPI
ValidatePixelShader(DWORD
* pixelshader
, DWORD
* reserved1
, BOOL
bool, DWORD
* toto
)
119 if (TRACE_ON(d3d8
) || !warned
) {
120 FIXME("(%p %p %d %p): stub\n", pixelshader
, reserved1
, bool, toto
);
130 switch(*pixelshader
) {
139 WARN("Invalid shader version token %#x.\n", *pixelshader
);