~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/d3d8/d3d8_main.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Direct3D 8
  3  *
  4  * Copyright 2005 Oliver Stieber
  5  *
  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.
 10  *
 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.
 15  *
 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
 19  *
 20  */
 21 
 22 #include "config.h"
 23 #include "initguid.h"
 24 #include "d3d8_private.h"
 25 #include "wine/debug.h"
 26 
 27 WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
 28 
 29 HRESULT WINAPI D3D8GetSWInfo(void) {
 30     FIXME("(void): stub\n");
 31     return 0;
 32 }
 33 
 34 void WINAPI DebugSetMute(void) {
 35     /* nothing to do */
 36 }
 37 
 38 IDirect3D8* WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT SDKVersion) {
 39     IDirect3D8Impl* object;
 40     TRACE("SDKVersion = %x\n", SDKVersion);
 41 
 42     wined3d_mutex_lock();
 43 
 44     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D8Impl));
 45 
 46     object->IDirect3D8_iface.lpVtbl = &Direct3D8_Vtbl;
 47     object->ref = 1;
 48     object->WineD3D = wined3d_create(8, &object->IDirect3D8_iface);
 49 
 50     TRACE("Created Direct3D object @ %p, WineObj @ %p\n", object, object->WineD3D);
 51 
 52     wined3d_mutex_unlock();
 53 
 54     if (!object->WineD3D)
 55     {
 56         HeapFree( GetProcessHeap(), 0, object );
 57         object = NULL;
 58     }
 59     return &object->IDirect3D8_iface;
 60 }
 61 
 62 /* At process attach */
 63 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 64 {
 65     TRACE("fdwReason=%d\n", fdwReason);
 66     if (fdwReason == DLL_PROCESS_ATTACH)
 67         DisableThreadLibraryCalls(hInstDLL);
 68 
 69     return TRUE;
 70 }
 71 
 72 /***********************************************************************
 73  *              ValidateVertexShader (D3D8.@)
 74  *
 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...
 77  * toto       result?
 78  */
 79 HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD* reserved2, BOOL bool, DWORD* toto)
 80 {
 81   HRESULT ret;
 82   static BOOL warned;
 83 
 84   if (TRACE_ON(d3d8) || !warned) {
 85       FIXME("(%p %p %p %d %p): stub\n", vertexshader, reserved1, reserved2, bool, toto);
 86       warned = TRUE;
 87   }
 88 
 89   if (!vertexshader)
 90       return E_FAIL;
 91 
 92   if (reserved1 || reserved2)
 93       return E_FAIL;
 94 
 95   switch(*vertexshader) {
 96         case 0xFFFE0101:
 97         case 0xFFFE0100:
 98             ret=S_OK;
 99             break;
100         default:
101             WARN("Invalid shader version token %#x.\n", *vertexshader);
102             ret=E_FAIL;
103         }
104 
105   return ret;
106 }
107 
108 /***********************************************************************
109  *              ValidatePixelShader (D3D8.@)
110  *
111  * PARAMS
112  * toto       result?
113  */
114 HRESULT WINAPI ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL bool, DWORD* toto)
115 {
116   HRESULT ret;
117   static BOOL warned;
118 
119   if (TRACE_ON(d3d8) || !warned) {
120       FIXME("(%p %p %d %p): stub\n", pixelshader, reserved1, bool, toto);
121       warned = TRUE;
122   }
123 
124   if (!pixelshader)
125       return E_FAIL;
126 
127   if (reserved1)
128       return E_FAIL;
129 
130   switch(*pixelshader) {
131         case 0xFFFF0100:
132         case 0xFFFF0101:
133         case 0xFFFF0102:
134         case 0xFFFF0103:
135         case 0xFFFF0104:
136             ret=S_OK;
137             break;
138         default:
139             WARN("Invalid shader version token %#x.\n", *pixelshader);
140             ret=E_FAIL;
141         }
142   return ret;
143 }
144 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.