26 #include "wine/port.h" 57 0, 0, {(
DWORD_PTR)(__FILE__
": wined3d_cs")}
67 0, 0, {(
DWORD_PTR)(__FILE__
": wined3d_wndproc_cs")}
104 ERR(
"Failed to allocate wined3d object memory.\n");
114 WARN(
"Failed to initialize wined3d object, hr %#x.\n",
hr);
119 TRACE(
"Created wined3d object %p.\n",
object);
161 ERR(
"Failed to allocate context TLS index, err %#x.\n",
err);
182 ERR(
"Failed to register window class 'WineD3D_OpenGL'!\n");
186 ERR(
"Failed to free context TLS index, err %#x.\n",
err);
204 if ((
p =
strrchr( appname,
'/' ))) appname =
p + 1;
205 if ((
p =
strrchr( appname,
'\\' ))) appname =
p + 1;
206 strcat( appname,
"\\Direct3D" );
207 TRACE(
"appname = [%s]\n", appname);
208 if (
RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0;
219 ERR_(winediag)(
"Setting maximum allowed wined3d GL version to %u.%u.\n",
220 tmpvalue >> 16, tmpvalue & 0xffff);
228 ERR_(winediag)(
"The GLSL shader backend has been disabled. You get to keep all the pieces if it breaks.\n");
229 TRACE(
"Use of GL Shading Language disabled\n");
238 int pci_device_id = tmpvalue;
241 if(pci_device_id > 0xffff)
243 ERR(
"Invalid value for VideoPciDeviceID. The value should be smaller or equal to 65535 or 0xffff\n");
247 TRACE(
"Using PCI Device ID %04x\n", pci_device_id);
253 int pci_vendor_id = tmpvalue;
256 if(pci_vendor_id > 0xffff)
258 ERR(
"Invalid value for VideoPciVendorID. The value should be smaller or equal to 65535 or 0xffff\n");
262 TRACE(
"Using PCI Vendor ID %04x\n", pci_vendor_id);
269 if(TmpVideoMemorySize > 0)
272 TRACE(
"Use %iMiB = 0x%s bytes for emulated_textureram\n",
277 ERR(
"VideoMemorySize is %i but must be >0\n", TmpVideoMemorySize);
284 ERR(
"Failed to allocate logo path memory.\n");
291 ERR_(winediag)(
"Forcing sample count to %u. This may not be compatible with all applications.\n",
296 ERR_(winediag)(
"\"StrictDrawOrdering\" is deprecated, please use \"csmt\" instead.\n");
297 TRACE(
"Enforcing strict draw ordering.\n");
303 TRACE(
"Checking relative addressing indices in float constants.\n");
321 TRACE(
"Disabling 3D support.\n");
342 ERR(
"Failed to free context TLS index, err %#x.\n",
err);
416 ERR(
"Window %p is not registered with wined3d.\n",
window);
421 unicode =
entry->unicode;
441 WARN(
"Window %p is already registered with wined3d.\n",
window);
449 ERR(
"Failed to grow table.\n");
480 ERR(
"Window %p is not registered with wined3d.\n",
window);
491 WARN(
"Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n",
505 WARN(
"Not unregistering window %p, window proc %#lx doesn't match wined3d window proc %p.\n",
540 ERR(
"Failed to clear current context.\n");
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam, LPARAM lparam)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
struct wined3d_adapter adapters[1]
coclass MSXML2::XSLTemplate40 object
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
#define HKEY_CURRENT_USER
BOOL wined3d_dxtn_init(void)
unsigned int sample_count
void WINAPI wined3d_mutex_lock(void)
void CDECL wined3d_strictdrawing_set(int value)
void context_set_tls_idx(DWORD idx)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
DWORD WINAPI GetLastError(VOID)
#define DLL_PROCESS_ATTACH
#define GetWindowLongPtrW
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
struct wined3d_device * device
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
#define DLL_THREAD_DETACH
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE, _In_ LPCSTR)
static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
static void * heap_alloc(size_t len)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static CRITICAL_SECTION_DEBUG wined3d_cs_debug
struct wined3d *CDECL wined3d_create(DWORD flags)
static struct wined3d_wndproc_table wndproc_table
WINE_DECLARE_DEBUG_CHANNEL(winediag)
static CRITICAL_SECTION_DEBUG wined3d_wndproc_cs_debug
#define WINED3D_OPENGL_WINDOW_CLASS_NAME
void wined3d_unregister_window(HWND window)
static UINT WPARAM LPARAM lparam
BOOL strict_draw_ordering
static DWORD get_config_key_dword(HKEY defkey, HKEY appkey, const char *name, DWORD *value)
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define ERROR_FILE_NOT_FOUND
#define DLL_PROCESS_DETACH
#define GetWindowLongPtrA
BOOL WINAPI TlsFree(IN DWORD Index)
static struct wined3d_wndproc * wined3d_find_wndproc(HWND window)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
unsigned int cs_multithreaded
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
unsigned short pci_vendor_id
#define success(from, fromstr, to, tostr)
static DWORD wined3d_context_tls_idx
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static CRITICAL_SECTION wined3d_cs
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
static void wined3d_wndproc_mutex_lock(void)
BOOL wined3d_register_window(HWND window, struct wined3d_device *device)
#define MAKEDWORD_VERSION(maj, min)
struct wined3d_wndproc * entries
#define memcpy(s1, s2, n)
#define SetWindowLongPtrA
int offscreen_rendering_mode
unsigned short pci_device_id
DWORD WINAPI TlsAlloc(VOID)
#define TLS_OUT_OF_INDEXES
GLsizei const GLfloat * value
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static IHTMLWindow2 * window
LIST_ENTRY ProcessLocksList
HRESULT wined3d_init(struct wined3d *wined3d, DWORD flags)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
BOOL check_float_constants
static CRITICAL_SECTION wined3d_wndproc_cs
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
WINE_DEFAULT_DEBUG_CHANNEL(d3d)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOL context_set_current(struct wined3d_context *ctx)
unsigned int multisample_textures
static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, char *buffer, DWORD size)
UINT64 emulated_textureram
void wined3d_dxtn_free(void)
#define FIELD_OFFSET(t, f)
static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
DWORD context_get_tls_idx(void)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static void wined3d_wndproc_mutex_unlock(void)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
int strcmp(const char *String1, const char *String2)
#define SetWindowLongPtrW
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
GLuint GLuint GLsizei GLenum type
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
unsigned long long UINT64
void WINAPI wined3d_mutex_unlock(void)
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define RegCloseKey(hKey)
static UINT WPARAM wparam
static BOOL heap_free(void *mem)