wined3d: Rename return values from D3D* to WINED3D*.

oldstable
Stefan Dösinger 2006-04-07 12:51:12 +02:00 committed by Alexandre Julliard
parent bff74c1763
commit 9d67b4287e
18 changed files with 478 additions and 444 deletions

View File

@ -68,7 +68,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_QueryInterface(IWineD3DBaseTexture *iface
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -154,7 +154,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
if (This->resource.pool != WINED3DPOOL_MANAGED) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if(LODNew >= This->baseTexture.levels)
@ -170,7 +170,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
if (This->resource.pool != WINED3DPOOL_MANAGED) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
TRACE("(%p) : returning %d\n", This, This->baseTexture.LOD);
@ -189,11 +189,11 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture
if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) {
TRACE("(%p) : returning invalid call\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
This->baseTexture.filterType = FilterType;
TRACE("(%p) :\n", This);
return D3D_OK;
return WINED3D_OK;
}
WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) {
@ -228,7 +228,7 @@ BOOL WINAPI IWineD3DBaseTextureImpl_GetDirty(IWineD3DBaseTexture *iface) {
HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
HRESULT hr = D3D_OK;
HRESULT hr = WINED3D_OK;
UINT textureDimensions;
BOOL isNewTexture = FALSE;
TRACE("(%p) : About to bind texture\n", This);
@ -287,7 +287,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
} else { /* this only happened if we've run out of openGL textures */
WARN("This texture doesn't have an openGL texture assigned to it\n");
hr = D3DERR_INVALIDCALL;
hr = WINED3DERR_INVALIDCALL;
}
LEAVE_GL();
@ -311,13 +311,13 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_UnBindTexture(IWineD3DBaseTexture *iface)
#endif
LEAVE_GL();
return D3D_OK;
return WINED3D_OK;
}
UINT WINAPI IWineD3DBaseTextureImpl_GetTextureDimensions(IWineD3DBaseTexture *iface){
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
FIXME("(%p) : This shouldn't be called\n", This);
return D3D_OK;
return WINED3D_OK;
}
static inline GLenum warpLookupType(WINED3DSAMPLERSTATETYPE Type) {

View File

@ -58,7 +58,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface
|| IsEqualGUID(riid, &IID_IWineD3DTexture)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -270,20 +270,20 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface,
return IWineD3DSurface_GetDesc(This->surfaces[0][Level], pDesc);
}
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, IWineD3DSurface** ppCubeMapSurface) {
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) {
*ppCubeMapSurface = This->surfaces[FaceType][Level];
IWineD3DSurface_AddRef(*ppCubeMapSurface);
hr = D3D_OK;
hr = WINED3D_OK;
}
if (D3D_OK == hr) {
if (WINED3D_OK == hr) {
TRACE("(%p) -> faceType(%d) level(%d) returning surface@%p\n", This, FaceType, Level, This->surfaces[FaceType][Level]);
} else {
WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
@ -293,14 +293,14 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *if
}
HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) {
hr = IWineD3DSurface_LockRect(This->surfaces[FaceType][Level], pLockedRect, pRect, Flags);
}
if (D3D_OK == hr) {
if (WINED3D_OK == hr) {
TRACE("(%p) -> faceType(%d) level(%d) returning memory@%p success(%lu)\n", This, FaceType, Level, pLockedRect->pBits, hr);
} else {
WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
@ -310,14 +310,14 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINE
}
HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level) {
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
if (Level < This->baseTexture.levels && FaceType >= D3DCUBEMAP_FACE_POSITIVE_X && FaceType <= D3DCUBEMAP_FACE_NEGATIVE_Z) {
hr = IWineD3DSurface_UnlockRect(This->surfaces[FaceType][Level]);
}
if (D3D_OK == hr) {
if (WINED3D_OK == hr) {
TRACE("(%p) -> faceType(%d) level(%d) success(%lu)\n", This, FaceType, Level, hr);
} else {
WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
@ -326,7 +326,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WI
}
HRESULT WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
This->baseTexture.dirty = TRUE;
TRACE("(%p) : dirtyfication of faceType(%d) Level (0)\n", This, FaceType);

File diff suppressed because it is too large Load Diff

View File

@ -173,7 +173,7 @@ HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *p
|| IsEqualGUID(riid, &IID_IWineD3DDevice)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
@ -766,7 +766,7 @@ UINT WINAPI IWineD3DImpl_GetAdapterCount (IWineD3D *iface) {
HRESULT WINAPI IWineD3DImpl_RegisterSoftwareDevice(IWineD3D *iface, void* pInitializeFunction) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
FIXME("(%p)->(%p): stub\n", This, pInitializeFunction);
return D3D_OK;
return WINED3D_OK;
}
HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) {
@ -775,7 +775,7 @@ HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) {
if (Adapter >= IWineD3DImpl_GetAdapterCount(iface)) {
return NULL;
}
return D3D_OK;
return WINED3D_OK;
}
/* FIXME: GetAdapterModeCount and EnumAdapterModes currently only returns modes
@ -844,7 +844,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE
if (NULL == pMode ||
Adapter >= IWineD3DImpl_GetAdapterCount(iface) ||
Mode >= IWineD3DImpl_GetAdapterModeCount(iface, Adapter, Format)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (Adapter == 0) { /* Display */
@ -921,12 +921,12 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE
else
{
TRACE_(d3d_caps)("Requested mode out of range %d\n", Mode);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
#else
/* Return one setting of the format requested */
if (Mode > 0) return D3DERR_INVALIDCALL;
if (Mode > 0) return WINED3DERR_INVALIDCALL;
pMode->Width = 800;
pMode->Height = 600;
pMode->RefreshRate = D3DADAPTER_DEFAULT;
@ -940,7 +940,7 @@ HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapter, WINE
FIXME_(d3d_caps)("Adapter not primary display\n");
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter, WINED3DDISPLAYMODE* pMode) {
@ -949,7 +949,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter,
if (NULL == pMode ||
Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (Adapter == 0) { /* Display */
@ -980,7 +980,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT Adapter,
TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", pMode->Width,
pMode->Height, pMode->RefreshRate, debug_d3dformat(pMode->Format));
return D3D_OK;
return WINED3D_OK;
}
static Display * WINAPI IWineD3DImpl_GetAdapterDisplay(IWineD3D *iface, UINT Adapter) {
@ -1004,7 +1004,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter,
TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %lx, pId=%p)\n", This, Adapter, Flags, pIdentifier);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (Adapter == 0) { /* Display - only device supported for now */
@ -1066,7 +1066,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter,
FIXME_(d3d_caps)("Adapter not primary display\n");
}
return D3D_OK;
return WINED3D_OK;
}
static BOOL IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(WineD3D_Context* ctx, GLXFBConfig cfgs, WINED3DFORMAT Format) {
@ -1203,7 +1203,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
WINED3DFORMAT RenderTargetFormat,
WINED3DFORMAT DepthStencilFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
HRESULT hr = D3DERR_NOTAVAILABLE;
HRESULT hr = WINED3DERR_NOTAVAILABLE;
WineD3D_Context* ctx = NULL;
GLXFBConfig* cfgs = NULL;
int nCfgs = 0;
@ -1217,8 +1217,8 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
DepthStencilFormat, debug_d3dformat(DepthStencilFormat));
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
TRACE("(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning D3DERR_INVALIDCALL\n", This, Adapter, IWineD3D_GetAdapterCount(iface));
return D3DERR_INVALIDCALL;
TRACE("(%p) Failed: Atapter (%u) higher than supported adapters (%u) returning WINED3DERR_INVALIDCALL\n", This, Adapter, IWineD3D_GetAdapterCount(iface));
return WINED3DERR_INVALIDCALL;
}
/* TODO: use the real context if it's available */
ctx = WineD3D_CreateFakeGLContext();
@ -1232,7 +1232,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
for (it = 0; it < nCfgs; ++it) {
if (IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(ctx, cfgs[it], RenderTargetFormat)) {
if (IWineD3DImpl_IsGLXFBConfigCompatibleWithDepthFmt(ctx, cfgs[it], DepthStencilFormat)) {
hr = D3D_OK;
hr = WINED3D_OK;
break ;
}
}
@ -1241,13 +1241,13 @@ HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT Adapter
cfgs = NULL;
} else {
/* If there's a corrent context then we cannot create a fake one so pass everything */
hr = D3D_OK;
hr = WINED3D_OK;
}
if (ctx != NULL)
WineD3D_ReleaseFakeGLContext(ctx);
if (hr != D3D_OK)
if (hr != WINED3D_OK)
TRACE_(d3d_caps)("Failed to match stencil format to device\b");
TRACE_(d3d_caps)("(%p) : Returning %lx\n", This, hr);
@ -1269,7 +1269,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Ada
pQualityLevels);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (pQualityLevels != NULL) {
@ -1281,8 +1281,8 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Ada
*pQualityLevels = 1; /* Guess at a value! */
}
if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return D3D_OK;
return D3DERR_NOTAVAILABLE;
if (WINED3DMULTISAMPLE_NONE == MultiSampleType) return WINED3D_OK;
return WINED3DERR_NOTAVAILABLE;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE CheckType,
@ -1298,21 +1298,21 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED
Windowed);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
{
GLXFBConfig* cfgs = NULL;
int nCfgs = 0;
int it;
HRESULT hr = D3DERR_NOTAVAILABLE;
HRESULT hr = WINED3DERR_NOTAVAILABLE;
WineD3D_Context* ctx = WineD3D_CreateFakeGLContext();
if (NULL != ctx) {
cfgs = glXGetFBConfigs(ctx->display, DefaultScreen(ctx->display), &nCfgs);
for (it = 0; it < nCfgs; ++it) {
if (IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(ctx, cfgs[it], DisplayFormat)) {
hr = D3D_OK;
hr = WINED3D_OK;
break ;
}
}
@ -1323,7 +1323,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, WINED
}
}
return D3DERR_NOTAVAILABLE;
return WINED3DERR_NOTAVAILABLE;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
@ -1339,7 +1339,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN
CheckFormat, debug_d3dformat(CheckFormat));
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (GL_SUPPORT(EXT_TEXTURE_COMPRESSION_S3TC)) {
@ -1350,7 +1350,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN
case D3DFMT_DXT4:
case D3DFMT_DXT5:
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
return WINED3D_OK;
default:
break; /* Avoid compiler warnings */
}
@ -1409,13 +1409,13 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WIN
/* Since we do not support these formats right now, don't pretend to. */
TRACE_(d3d_caps)("[FAILED]\n");
return D3DERR_NOTAVAILABLE;
return WINED3DERR_NOTAVAILABLE;
default:
break;
}
TRACE_(d3d_caps)("[OK]\n");
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
@ -1428,7 +1428,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceFormatConversion(IWineD3D *iface, UINT
DeviceType, debug_d3ddevicetype(DeviceType),
SourceFormat, debug_d3dformat(SourceFormat),
TargetFormat, debug_d3dformat(TargetFormat));
return D3D_OK;
return WINED3D_OK;
}
/* Note: d3d8 passes in a pointer to a D3DCAPS8 structure, which is a true
@ -1441,7 +1441,7 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
TRACE_(d3d_caps)("(%p)->(Adptr:%d, DevType: %x, pCaps: %p)\n", This, Adapter, DeviceType, pCaps);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
/* If we don't know the device settings, go query them now */
@ -1737,7 +1737,7 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*pCaps->MaxPixelShader30InstructionSlots = 0;
}
return D3D_OK;
return WINED3D_OK;
}
@ -1754,7 +1754,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
/* Validate the adapter number */
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
/* Create a WineD3DDevice object */
@ -1762,7 +1762,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
*ppReturnedDeviceInterface = (IWineD3DDevice *)object;
TRACE("Created WineD3DDevice object @ %p\n", object);
if (NULL == object) {
return D3DERR_OUTOFVIDEOMEMORY;
return WINED3DERR_OUTOFVIDEOMEMORY;
}
/* Set up initial COM information */
@ -1773,7 +1773,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
object->parent = parent;
/* Set the state up as invalid until the device is fully created */
object->state = D3DERR_DRIVERINTERNALERROR;
object->state = WINED3DERR_DRIVERINTERNALERROR;
TRACE("(%p)->(Adptr:%d, DevType: %x, FocusHwnd: %p, BehFlags: %lx, PresParms: %p, RetDevInt: %p)\n", This, Adapter, DeviceType,
hFocusWindow, BehaviourFlags, pPresentationParameters, ppReturnedDeviceInterface);
@ -1796,7 +1796,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
if (This->dxVersion >= 8) {
TRACE("(%p) : Creating stateblock\n", This);
/* Creating the startup stateBlock - Note Special Case: 0 => Don't fill in yet! */
if (D3D_OK != IWineD3DDevice_CreateStateBlock((IWineD3DDevice *)object,
if (WINED3D_OK != IWineD3DDevice_CreateStateBlock((IWineD3DDevice *)object,
WINED3DSBT_INIT,
(IWineD3DStateBlock **)&object->stateBlock,
NULL) || NULL == object->stateBlock) { /* Note: No parent needed for initial internal stateblock */
@ -1815,7 +1815,7 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
/* Setup the implicit swapchain */
TRACE("Creating implicit swapchain\n");
if (D3D_OK != D3DCB_CreateAdditionalSwapChain((IUnknown *) object->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain) || swapchain == NULL) {
if (WINED3D_OK != D3DCB_CreateAdditionalSwapChain((IUnknown *) object->parent, pPresentationParameters, (IWineD3DSwapChain **)&swapchain) || swapchain == NULL) {
WARN("Failed to create implicit swapchain\n");
goto create_device_error;
}
@ -1873,13 +1873,13 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
}
/* set the state of the device to valid */
object->state = D3D_OK;
object->state = WINED3D_OK;
return D3D_OK;
return WINED3D_OK;
create_device_error:
/* Set the device state to error */
object->state = D3DERR_DRIVERINTERNALERROR;
object->state = WINED3DERR_DRIVERINTERNALERROR;
if (object->updateStateBlock != NULL) {
IWineD3DStateBlock_Release((IWineD3DStateBlock *)object->updateStateBlock);
@ -1907,7 +1907,7 @@ create_device_error:
}
HeapFree(GetProcessHeap(), 0, object);
*ppReturnedDeviceInterface = NULL;
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
@ -1915,7 +1915,7 @@ HRESULT WINAPI IWineD3DImpl_GetParent(IWineD3D *iface, IUnknown **pParent) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
IUnknown_AddRef(This->parent);
*pParent = This->parent;
return D3D_OK;
return WINED3D_OK;
}
/**********************************************************

View File

@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer *iface
|| IsEqualGUID(riid, &IID_IWineD3DIndexBuffer)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -109,12 +109,12 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_Lock(IWineD3DIndexBuffer *iface,
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
TRACE("(%p) : no real locking yet, offset %d, size %d, Flags=%lx\n", This, OffsetToLock, SizeToLock, Flags);
*ppbData = (BYTE *)This->resource.allocatedMemory + OffsetToLock;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface) {
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
TRACE("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *iface, WINED3DINDEXBUFFER_DESC *pDesc) {
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
@ -125,7 +125,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_GetDesc(IWineD3DIndexBuffer *ifac
pDesc->Usage = This->resource.usage;
pDesc->Pool = This->resource.pool;
pDesc->Size = This->resource.size;
return D3D_OK;
return WINED3D_OK;
}
const IWineD3DIndexBufferVtbl IWineD3DIndexBuffer_Vtbl =

View File

@ -56,7 +56,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShader *iface
|| IsEqualGUID(riid, &IID_IWineD3DPixelShader)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -94,7 +94,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetParent(IWineD3DPixelShader *iface, IUn
*parent = This->parent;
IUnknown_AddRef(*parent);
TRACE("(%p) : returning %p\n", This, *parent);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DPixelShaderImpl_GetDevice(IWineD3DPixelShader* iface, IWineD3DDevice **pDevice){
@ -102,7 +102,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetDevice(IWineD3DPixelShader* iface, IWi
IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
*pDevice = (IWineD3DDevice *)This->wineD3DDevice;
TRACE("(%p) returning %p\n", This, *pDevice);
return D3D_OK;
return WINED3D_OK;
}
@ -112,11 +112,11 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* impl, VO
if (NULL == pData) {
*pSizeOfData = This->baseShader.functionLength;
return D3D_OK;
return WINED3D_OK;
}
if (*pSizeOfData < This->baseShader.functionLength) {
*pSizeOfData = This->baseShader.functionLength;
return D3DERR_MOREDATA;
return WINED3DERR_MOREDATA;
}
if (NULL == This->baseShader.function) { /* no function defined */
TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData);
@ -128,7 +128,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* impl, VO
TRACE("(%p) : GetFunction copying to %p\n", This, pData);
memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
}
return D3D_OK;
return WINED3D_OK;
}
/*******************************
@ -1816,8 +1816,8 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *iface, C
}
/* TODO: Some proper return values for failures */
TRACE("(%p) : Returning D3D_OK\n", This);
return D3D_OK;
TRACE("(%p) : Returning WINED3D_OK\n", This);
return WINED3D_OK;
}
const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl =

View File

@ -42,7 +42,7 @@ HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID rii
|| IsEqualGUID(riid, &IID_IWineD3DQuery)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -76,7 +76,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetParent(IWineD3DQuery *iface, IUnknown** pare
*parent= (IUnknown*) parent;
IUnknown_AddRef(*parent);
TRACE("(%p) : returning %p\n", This, *parent);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice **pDevice){
@ -84,7 +84,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice
IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
*pDevice = (IWineD3DDevice *)This->wineD3DDevice;
TRACE("(%p) returning %p\n", This, *pDevice);
return D3D_OK;
return WINED3D_OK;
}
@ -238,7 +238,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWOR
};
/*dwGetDataFlags = 0 || D3DGETDATA_FLUSH
D3DGETDATA_FLUSH may return D3DERR_DEVICELOST if the device is lost
D3DGETDATA_FLUSH may return WINED3DERR_DEVICELOST if the device is lost
*/
FIXME("(%p) : stub\n", This);
return S_OK; /* S_OK if the query data is available*/
@ -314,7 +314,7 @@ WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){
HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags){
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
FIXME("(%p) : stub\n", This);
return D3D_OK; /* can be D3DERR_INVALIDCALL. */
return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
}

View File

@ -37,7 +37,7 @@ HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFI
|| IsEqualGUID(riid, &IID_IWineD3DResource)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -84,7 +84,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetDevice(IWineD3DResource *iface, IWineD3DD
TRACE("(%p) : returning %p\n", This, This->resource.wineD3DDevice);
*ppDevice = (IWineD3DDevice *) This->resource.wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return D3D_OK;
return WINED3D_OK;
}
static PrivateData** IWineD3DResourceImpl_FindPrivateData(IWineD3DResourceImpl *This,
@ -130,7 +130,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG
/* link it in */
(*data)->next = This->resource.privateData;
This->resource.privateData = *data;
return D3D_OK;
return WINED3D_OK;
} else {
/* I don't actually know how windows handles this case. The only
@ -141,7 +141,7 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
@ -150,7 +150,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG
TRACE("(%p) : %p %p %p\n", This, refguid, pData, pSizeOfData);
data = IWineD3DResourceImpl_FindPrivateData(This, refguid);
if (*data == NULL) return D3DERR_NOTFOUND;
if (*data == NULL) return WINED3DERR_NOTFOUND;
#if 0 /* This may not be right. */
@ -160,7 +160,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG
#endif
if (*pSizeOfData < (*data)->size) {
*pSizeOfData = (*data)->size;
return D3DERR_MOREDATA;
return WINED3DERR_MOREDATA;
}
if ((*data)->flags & D3DSPD_IUNKNOWN) {
@ -171,7 +171,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG
memcpy(pData, (*data)->ptr.data, (*data)->size);
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REFGUID refguid) {
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
@ -180,7 +180,7 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF
TRACE("(%p) : %p\n", This, refguid);
/* TODO: move this code off into a linked list class */
data = IWineD3DResourceImpl_FindPrivateData(This, refguid);
if (*data == NULL) return D3DERR_NOTFOUND;
if (*data == NULL) return WINED3DERR_NOTFOUND;
*data = (*data)->next;
@ -194,7 +194,7 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF
HeapFree(GetProcessHeap(), 0, *data);
return D3D_OK;
return WINED3D_OK;
}
/* Priority support is not implemented yet */
@ -225,7 +225,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetParent(IWineD3DResource *iface, IUnknown
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
IUnknown_AddRef(This->resource.parent);
*pParent = This->resource.parent;
return D3D_OK;
return WINED3D_OK;
}

View File

@ -38,7 +38,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R
|| IsEqualGUID(riid, &IID_IWineD3DStateBlock)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -111,7 +111,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_GetParent(IWineD3DStateBlock *iface, IUnkn
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
IUnknown_AddRef(This->parent);
*pParent = This->parent;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWineD3DDevice** ppDevice){
@ -120,7 +120,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWine
*ppDevice = (IWineD3DDevice*)This->wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return D3D_OK;
return WINED3D_OK;
}
@ -370,7 +370,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface){
TRACE("(%p) : Updated state block %p ------------------^\n", targetStateBlock, This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface){
@ -581,7 +581,7 @@ should really perform a delta so that only the changes get updated*/
memcpy(&((IWineD3DDeviceImpl*)pDevice)->stateBlock->changed, &This->changed, sizeof(((IWineD3DDeviceImpl*)pDevice)->stateBlock->changed));
TRACE("(%p) : Applied state block %p ------------------^\n", This, pDevice);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* iface) {
@ -852,7 +852,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock*
This->wineD3DDevice->currentPalette = 0;
TRACE("-----------------------> Device defaults now set up...\n");
return D3D_OK;
return WINED3D_OK;
}
/**********************************************************

View File

@ -45,7 +45,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID
|| IsEqualGUID(riid, &IID_IWineD3DSurface)) {
IUnknown_AddRef((IUnknown*)iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -114,7 +114,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DBaseTexture *baseTexture = NULL;
TRACE("(%p)Checking to see if the container is a base texture\n", This);
if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == D3D_OK) {
if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
TRACE("Passing to conatiner\n");
IWineD3DBaseTexture_PreLoad(baseTexture);
IWineD3DBaseTexture_Release(baseTexture);
@ -193,7 +193,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetContainerParent(IWineD3DSurface* iface, IU
*ppContainerParent = NULL;
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_GetContainer(IWineD3DSurface* iface, REFIID riid, void** ppContainer) {
@ -234,7 +234,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFAC
if(pDesc->MultiSampleQuality != NULL) *(pDesc->MultiSampleQuality) = This->currentDesc.MultiSampleQuality;
if(pDesc->Width != NULL) *(pDesc->Width) = This->currentDesc.Width;
if(pDesc->Height != NULL) *(pDesc->Height) = This->currentDesc.Height;
return D3D_OK;
return WINED3D_OK;
}
void WINAPI IWineD3DSurfaceImpl_SetGlTextureDesc(IWineD3DSurface *iface, UINT textureName, int target) {
@ -282,7 +282,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE
texture regions, and since the destination is an unlockable region we need
to tolerate this */
TRACE("Warning: trying to lock unlockable surf@%p\n", This);
/*return D3DERR_INVALIDCALL; */
/*return WINED3DERR_INVALIDCALL; */
}
if (This->resource.usage & WINED3DUSAGE_RENDERTARGET) {
@ -642,7 +642,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE
IWineD3DSurface_AddDirtyRect(iface, &This->lockedRect);
/** Dirtify Container if needed */
if (D3D_OK == IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture) && pBaseTexture != NULL) {
if (WINED3D_OK == IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&pBaseTexture) && pBaseTexture != NULL) {
TRACE("Making container dirty\n");
IWineD3DBaseTexture_SetDirty(pBaseTexture, TRUE);
IWineD3DBaseTexture_Release(pBaseTexture);
@ -654,7 +654,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE
TRACE("returning memory@%p, pitch(%d) dirtyfied(%d)\n", pLockedRect->pBits, pLockedRect->Pitch, This->Dirty);
This->locked = TRUE;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
@ -666,7 +666,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
if (FALSE == This->locked) {
WARN("trying to Unlock an unlocked surf@%p\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (WINED3DUSAGE_RENDERTARGET & This->resource.usage) {
@ -912,19 +912,19 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
unlock_end:
This->locked = FALSE;
memset(&This->lockedRect, 0, sizeof(RECT));
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
FIXME("No support for GetDC yet for surface %p\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
HRESULT WINAPI IWineD3DSurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
FIXME("No support for ReleaseDC yet for surface %p\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
/* ******************************************************
@ -935,11 +935,11 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
if (This->inTexture) {
TRACE("Surface already in texture\n");
return D3D_OK;
return WINED3D_OK;
}
if (This->Dirty == FALSE) {
TRACE("surface isn't dirty\n");
return D3D_OK;
return WINED3D_OK;
}
This->Dirty = FALSE;
@ -954,7 +954,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
if (This->resource.pool == WINED3DPOOL_SCRATCH || This->resource.pool == WINED3DPOOL_SYSTEMMEM)
{
FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (This->inPBuffer) {
@ -990,7 +990,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
This->inTexture = TRUE;
}
LEAVE_GL();
return D3D_OK;
return WINED3D_OK;
}
if ((This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8) &&
@ -1042,7 +1042,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
LEAVE_GL();
return D3D_OK;
return WINED3D_OK;
}
/* TODO: Compressed non-power 2 support */
@ -1186,7 +1186,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) {
}
return D3D_OK;
return WINED3D_OK;
}
#include <errno.h>
@ -1277,7 +1277,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const ch
f = fopen(filename, "w+");
if (NULL == f) {
ERR("opening of %s failed with: %s\n", filename, strerror(errno));
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
/* Save the dat out to a TGA file because 1: it's an easy raw format, 2: it supports an alpha chanel*/
TRACE("(%p) opened %s with format %s\n", This, filename, debug_d3dformat(This->resource.format));
@ -1328,7 +1328,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SaveSnapshot(IWineD3DSurface *iface, const ch
IWineD3DSwapChain_Release(swapChain);
}
HeapFree(GetProcessHeap(), 0, allocatedMemory);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface) {
@ -1340,7 +1340,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface) {
This->dirtyRect.bottom = 0;
TRACE("(%p) : Dirty?%d, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Dirty, This->dirtyRect.left,
This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
return D3D_OK;
return WINED3D_OK;
}
/**
@ -1364,12 +1364,12 @@ extern HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, C
TRACE("(%p) : Dirty?%d, Rect:(%ld,%ld,%ld,%ld)\n", This, This->Dirty, This->dirtyRect.left,
This->dirtyRect.top, This->dirtyRect.right, This->dirtyRect.bottom);
/* if the container is a basetexture then mark it dirty. */
if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == D3D_OK) {
if (IWineD3DSurface_GetContainer(iface, &IID_IWineD3DBaseTexture, (void **)&baseTexture) == WINED3D_OK) {
TRACE("Passing to conatiner\n");
IWineD3DBaseTexture_SetDirty(baseTexture, TRUE);
IWineD3DBaseTexture_Release(baseTexture);
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container) {
@ -1382,7 +1382,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3D
TRACE("Setting container to %p from %p\n", container, This->container);
This->container = container;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
@ -1390,7 +1390,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORM
if (This->resource.format != WINED3DFMT_UNKNOWN) {
FIXME("(%p) : The foramt of the surface must be WINED3DFORMAT_UNKNOWN\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
TRACE("(%p) : Setting texture foramt to (%d,%s)\n", This, format, debug_d3dformat(format));
@ -1433,7 +1433,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORM
TRACE("(%p) : Size %d, pow2Size %d, bytesPerPixel %d, glFormat %d, glFotmatInternal %d, glType %d\n", This, This->resource.size, This->pow2Size, This->bytesPerPixel, This->glDescription.glFormat, This->glDescription.glFormatInternal, This->glDescription.glType);
return D3D_OK;
return WINED3D_OK;
}
/* TODO: replace this function with context management routines */
@ -1442,7 +1442,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetPBufferState(IWineD3DSurface *iface, BOOL
This->inPBuffer = inPBuffer;
This->inTexture = inTexture;
return D3D_OK;
return WINED3D_OK;
}
const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =

View File

@ -75,7 +75,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, RE
return E_NOINTERFACE;
}
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -126,7 +126,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetParent(IWineD3DSwapChain *iface, IUnknow
*ppParent = This->parent;
IUnknown_AddRef(*ppParent);
TRACE("(%p) returning %p\n", This , *ppParent);
return D3D_OK;
return WINED3D_OK;
}
/*IWineD3DSwapChain parts follow: */
@ -183,7 +183,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC
if (NULL == This->visInfo) {
ERR("cannot really get XVisual\n");
LEAVE_GL();
return D3DERR_NOTAVAILABLE;
return WINED3DERR_NOTAVAILABLE;
}
/* Now we have problems? well not really we just need to know what the implicit context is */
/* now destroy the old context and create a new one (we should really copy the buffers over, and do the whole make current thing! */
@ -233,7 +233,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC
checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);");
/* If this swapchain is currently the active context then make this swapchain active */
if(IWineD3DSurface_GetContainer(This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == D3D_OK){
if(IWineD3DSurface_GetContainer(This->wineD3DDevice->renderTarget, &IID_IWineD3DSwapChain, (void **)&tmp) == WINED3D_OK){
if(tmp != (IUnknown *)This){
glXMakeCurrent(This->display, currentDrawable, currentContext);
checkGLcall("glXMakeCurrent");
@ -327,7 +327,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC
}
TRACE("returning\n");
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, IWineD3DSurface *pDestSurface) {
@ -360,7 +360,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface
glDescription->glType,
(void *)IWineD3DSurface_GetData(pDestSurface));
LEAVE_GL();
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) {
@ -372,12 +372,12 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UIN
if (iBackBuffer > This->presentParms.BackBufferCount - 1) {
FIXME("Only one backBuffer currently supported\n");
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
/* Note inc ref on returned surface */
IWineD3DSurface_AddRef(*ppBackBuffer);
return D3D_OK;
return WINED3D_OK;
}
@ -391,7 +391,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, W
FIXME("(%p) : stub (once)\n", This);
showFixmes = FALSE;
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode) {
@ -419,7 +419,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WI
TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate,
pMode->Format, debug_d3dformat(pMode->Format));
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice**ppDevice) {
@ -431,7 +431,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3
on the IDirect3DDevice9 interface. */
IWineD3DDevice_AddRef(*ppDevice);
TRACE("(%p) : returning %p\n", This, *ppDevice);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) {
@ -450,7 +450,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *ifa
*pPresentationParameters->Flags = This->presentParms.Flags;
*pPresentationParameters->FullScreen_RefreshRateInHz = This->presentParms.FullScreen_RefreshRateInHz;
*pPresentationParameters->PresentationInterval = This->presentParms.PresentationInterval;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp){
@ -461,7 +461,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWOR
hDC = GetDC(This->win_handle);
SetDeviceGammaRamp(hDC, (LPVOID)pRamp);
ReleaseDC(This->win_handle, hDC);
return D3D_OK;
return WINED3D_OK;
}
@ -473,7 +473,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINE
hDC = GetDC(This->win_handle);
GetDeviceGammaRamp(hDC, pRamp);
ReleaseDC(This->win_handle, hDC);
return D3D_OK;
return WINED3D_OK;
}

View File

@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface, REFIID
|| IsEqualGUID(riid, &IID_IWineD3DTexture)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -253,20 +253,20 @@ HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, UINT Lev
return IWineD3DSurface_GetDesc(This->surfaces[Level], pDesc);
}
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface, UINT Level, IWineD3DSurface** ppSurfaceLevel) {
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
if (Level < This->baseTexture.levels) {
*ppSurfaceLevel = This->surfaces[Level];
IWineD3DSurface_AddRef((IWineD3DSurface*) This->surfaces[Level]);
hr = D3D_OK;
hr = WINED3D_OK;
TRACE("(%p) : returning %p for level %d\n", This, *ppSurfaceLevel, Level);
}
if (D3D_OK != hr) {
if (WINED3D_OK != hr) {
WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
*ppSurfaceLevel = NULL; /* Just to be on the safe side.. */
}
@ -276,12 +276,12 @@ HRESULT WINAPI IWineD3DTextureImpl_GetSurfaceLevel(IWineD3DTexture *iface, UINT
HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, UINT Level, WINED3DLOCKED_RECT *pLockedRect,
CONST RECT *pRect, DWORD Flags) {
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
if (Level < This->baseTexture.levels) {
hr = IWineD3DSurface_LockRect(This->surfaces[Level], pLockedRect, pRect, Flags);
}
if (D3D_OK == hr) {
if (WINED3D_OK == hr) {
TRACE("(%p) Level (%d) success\n", This, Level);
} else {
WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
@ -292,12 +292,12 @@ HRESULT WINAPI IWineD3DTextureImpl_LockRect(IWineD3DTexture *iface, UINT Level,
HRESULT WINAPI IWineD3DTextureImpl_UnlockRect(IWineD3DTexture *iface, UINT Level) {
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
HRESULT hr = D3DERR_INVALIDCALL;
HRESULT hr = WINED3DERR_INVALIDCALL;
if (Level < This->baseTexture.levels) {
hr = IWineD3DSurface_UnlockRect(This->surfaces[Level]);
}
if ( D3D_OK == hr) {
if ( WINED3D_OK == hr) {
TRACE("(%p) Level (%d) success\n", This, Level);
} else {
WARN("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);

View File

@ -39,7 +39,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuffer *ifa
|| IsEqualGUID(riid, &IID_IWineD3DVertexBuffer)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -109,12 +109,12 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface
TRACE("(%p) : returning memory of %p (base:%p,offset:%u)\n", This, This->resource.allocatedMemory + OffsetToLock, This->resource.allocatedMemory, OffsetToLock);
/* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */
*ppbData = This->resource.allocatedMemory + OffsetToLock;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
TRACE("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *iface, WINED3DVERTEXBUFFER_DESC *pDesc) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
@ -126,7 +126,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_GetDesc(IWineD3DVertexBuffer *if
pDesc->Pool = This->resource.pool;
pDesc->Size = This->resource.size;
pDesc->FVF = This->fvf;
return D3D_OK;
return WINED3D_OK;
}
const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl =
@ -158,5 +158,5 @@ BYTE* WINAPI IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWO
}
HRESULT WINAPI IWineD3DVertexBufferImpl_ReleaseMemory(IWineD3DVertexBuffer* iface) {
return D3D_OK;
return WINED3D_OK;
}

View File

@ -356,7 +356,7 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
memcpy(This->pDeclarationWine, convToW, nTokens * sizeof(WINED3DVERTEXELEMENT));
/* returns */
return D3D_OK;
return WINED3D_OK;
}
static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDeclaration* iface, const D3DVERTEXELEMENT9* pDecl) {
@ -371,7 +371,7 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec
if (This->declaration9NumElements == 128) {
FIXME("?(%p) Error parsing vertex declaration\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
@ -388,7 +388,7 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec
This->declarationWNumElements = This->declaration9NumElements;
return D3D_OK;
return WINED3D_OK;
}
/* *******************************************
@ -403,7 +403,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVertexDeclar
|| IsEqualGUID(riid, &IID_IWineD3DVertexDeclaration)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -439,7 +439,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetParent(IWineD3DVertexDeclaration
*parent= This->parent;
IUnknown_AddRef(*parent);
TRACE("(%p) : returning %p\n", This, *parent);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration *iface, IWineD3DDevice** ppDevice) {
@ -449,14 +449,14 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration
*ppDevice = (IWineD3DDevice *) This->wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return D3D_OK;
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration8(IWineD3DVertexDeclaration* iface, DWORD* pData, DWORD* pSizeOfData) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
if (NULL == pData) {
*pSizeOfData = This->declaration8Length;
return D3D_OK;
return WINED3D_OK;
}
/* The Incredibles and Teenage Mutant Ninja Turtles require this in d3d9 for NumElements == 0,
@ -465,17 +465,17 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration8(IWineD3DVert
TRACE("(%p) : Requested the vertex declaration without specefying the size of the return buffer\n", This);
*pSizeOfData = This->declaration8Length;
memcpy(pData, This->pDeclaration8, This->declaration8Length);
return D3D_OK;
return WINED3D_OK;
}
if (*pSizeOfData < This->declaration8Length) {
FIXME("(%p) : Returning D3DERR_MOREDATA numElements %ld expected %ld\n", iface, *pSizeOfData, This->declaration8Length);
FIXME("(%p) : Returning WINED3DERR_MOREDATA numElements %ld expected %ld\n", iface, *pSizeOfData, This->declaration8Length);
*pSizeOfData = This->declaration8Length;
return D3DERR_MOREDATA;
return WINED3DERR_MOREDATA;
}
TRACE("(%p) : GetVertexDeclaration8 copying to %p\n", This, pData);
memcpy(pData, This->pDeclaration8, This->declaration8Length);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration9(IWineD3DVertexDeclaration* iface, D3DVERTEXELEMENT9* pData, DWORD* pNumElements) {
@ -488,18 +488,18 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration9(IWineD3DVertexDecla
/* Passing a NULL pData is used to just retrieve the number of elements */
if (!pData) {
TRACE("NULL pData passed. Returning D3D_OK.\n");
return D3D_OK;
TRACE("NULL pData passed. Returning WINED3D_OK.\n");
return WINED3D_OK;
}
TRACE("Copying %p to %p\n", This->pDeclaration9, pData);
memcpy(pData, This->pDeclaration9, This->declaration9NumElements * sizeof(*pData));
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclaration *iface, VOID *pData, DWORD *pSize) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
HRESULT hr = D3D_OK;
HRESULT hr = WINED3D_OK;
TRACE("(%p) : d3d version %d r\n", This, ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion);
switch (((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion) {
@ -518,7 +518,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDeclaration(IWineD3DVertexDeclar
HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVertexDeclaration *iface, VOID *pDecl) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
HRESULT hr = D3D_OK;
HRESULT hr = WINED3D_OK;
TRACE("(%p) : d3d version %d\n", This, ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion);
switch (((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion) {

View File

@ -1964,64 +1964,64 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_ExecuteSW(IWineD3DVertexShader* iface, W
TRACE_VSVECTOR(output->oT[0]);
TRACE_VSVECTOR(output->oT[1]);
#endif
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantF(IWineD3DVertexShader *iface, UINT StartRegister, CONST FLOAT *pConstantData, UINT Vector4fCount) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantF(IWineD3DVertexShader *iface, UINT StartRegister, FLOAT *pConstantData, UINT Vector4fCount) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantI(IWineD3DVertexShader *iface, UINT StartRegister, CONST int *pConstantData, UINT Vector4iCount) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
if (StartRegister + Vector4iCount > WINED3D_VSHADER_MAX_CONSTANTS) {
ERR("(%p) : SetVertexShaderConstantI C[%u] invalid\n", This, StartRegister);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (NULL == pConstantData) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantI(IWineD3DVertexShader *iface, UINT StartRegister, int *pConstantData, UINT Vector4iCount) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
TRACE("(%p) : C[%u] count=%u\n", This, StartRegister, Vector4iCount);
if (StartRegister + Vector4iCount > WINED3D_VSHADER_MAX_CONSTANTS) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (NULL == pConstantData) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_SetConstantB(IWineD3DVertexShader *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
if (StartRegister + BoolCount > WINED3D_VSHADER_MAX_CONSTANTS) {
ERR("(%p) : SetVertexShaderConstantB C[%u] invalid\n", This, StartRegister);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
if (NULL == pConstantData) {
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_GetConstantB(IWineD3DVertexShader *iface, UINT StartRegister, BOOL *pConstantData, UINT BoolCount) {
IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl *)iface;
FIXME("(%p) : stub\n", This);
return D3D_OK;
return WINED3D_OK;
}
#endif
@ -2039,7 +2039,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShader *ifa
|| IsEqualGUID(riid, &IID_IWineD3DVertexShader)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -2072,7 +2072,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *iface, I
*parent = This->parent;
IUnknown_AddRef(*parent);
TRACE("(%p) : returning %p\n", This, *parent);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_GetDevice(IWineD3DVertexShader* iface, IWineD3DDevice **pDevice){
@ -2080,7 +2080,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetDevice(IWineD3DVertexShader* iface, I
IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
*pDevice = (IWineD3DDevice *)This->wineD3DDevice;
TRACE("(%p) returning %p\n", This, *pDevice);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, VOID* pData, UINT* pSizeOfData) {
@ -2089,11 +2089,11 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl,
if (NULL == pData) {
*pSizeOfData = This->baseShader.functionLength;
return D3D_OK;
return WINED3D_OK;
}
if (*pSizeOfData < This->baseShader.functionLength) {
*pSizeOfData = This->baseShader.functionLength;
return D3DERR_MOREDATA;
return WINED3DERR_MOREDATA;
}
if (NULL == This->baseShader.function) { /* no function defined */
TRACE("(%p) : GetFunction no User Function defined using NULL to %p\n", This, pData);
@ -2105,7 +2105,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl,
TRACE("(%p) : GetFunction copying to %p\n", This, pData);
memcpy(pData, This->baseShader.function, This->baseShader.functionLength);
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader *iface, CONST DWORD *pFunction) {
@ -2206,7 +2206,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader *iface,
} else {
This->baseShader.function = NULL;
}
return D3D_OK;
return WINED3D_OK;
}
const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl =

View File

@ -38,7 +38,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, REFIID r
|| IsEqualGUID(riid, &IID_IWineD3DVolume)){
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -123,7 +123,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_GetContainerParent(IWineD3DVolume *iface, IUnk
*ppContainerParent = NULL;
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_GetContainer(IWineD3DVolume *iface, REFIID riid, void** ppContainer) {
@ -156,7 +156,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLUME_D
*(pDesc->Width) = This->currentDesc.Width;
*(pDesc->Height) = This->currentDesc.Height;
*(pDesc->Depth) = This->currentDesc.Depth;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
@ -217,19 +217,19 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DLOCKED_B
This->locked = TRUE;
TRACE("returning memory@%p rpitch(%d) spitch(%d)\n", pLockedVolume->pBits, pLockedVolume->RowPitch, pLockedVolume->SlicePitch);
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) {
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
if (FALSE == This->locked) {
ERR("trying to lock unlocked volume@%p\n", This);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
TRACE("(%p) : unlocking volume\n", This);
This->locked = FALSE;
memset(&This->lockedBox, 0, sizeof(RECT));
return D3D_OK;
return WINED3D_OK;
}
/* Internal use functions follow : */
@ -243,7 +243,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_CleanDirtyBox(IWineD3DVolume *iface) {
This->lockedBox.Right = 0;
This->lockedBox.Bottom = 0;
This->lockedBox.Back = 0;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST D3DBOX* pDirtyBox) {
@ -264,7 +264,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST D3DBO
This->lockedBox.Bottom = This->currentDesc.Height;
This->lockedBox.Back = This->currentDesc.Depth;
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBase* container) {
@ -277,7 +277,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBa
TRACE("Setting container to %p from %p\n", container, This->container);
This->container = container;
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_level) {
@ -306,7 +306,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_LoadTexture(IWineD3DVolume *iface, GLenum gl_l
D3DFmt2GLType(myDevice, This->currentDesc.Format),
This->resource.allocatedMemory);
checkGLcall("glTexImage3D");
return D3D_OK;
return WINED3D_OK;
}

View File

@ -40,7 +40,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *i
|| IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) {
IUnknown_AddRef(iface);
*ppobj = This;
return D3D_OK;
return WINED3D_OK;
}
return E_NOINTERFACE;
}
@ -214,7 +214,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *ifa
} else {
FIXME("(%p) Level (%d)\n", This, Level);
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *iface, UINT Level, IWineD3DVolume** ppVolumeLevel) {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
@ -224,9 +224,9 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *i
TRACE("(%p) -> level(%d) returning volume@%p\n", This, Level, *ppVolumeLevel);
} else {
FIXME("(%p) Level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
return D3D_OK;
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, UINT Level, WINED3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) {
@ -239,7 +239,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, U
} else {
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
return hr;
}
@ -254,7 +254,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture *iface,
} else {
FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
return D3DERR_INVALIDCALL;
return WINED3DERR_INVALIDCALL;
}
return hr;
}

View File

@ -37,6 +37,40 @@
* PLEASE USE wine/wined3d_gl.h INSTEAD
*/
/*****************************************************************************
* #defines and error codes
*/
#define _FACWINED3D 0x876
#define MAKE_WINED3DHRESULT( code ) MAKE_HRESULT( 1, _FACWINED3D, code )
#define MAKE_WINED3DSTATUS( code ) MAKE_HRESULT( 0, _FACWINED3D, code )
/*****************************************************************************
* Direct3D Errors
*/
#define WINED3D_OK S_OK
#define WINED3DERR_WRONGTEXTUREFORMAT MAKE_WINED3DHRESULT(2072)
#define WINED3DERR_UNSUPPORTEDCOLOROPERATION MAKE_WINED3DHRESULT(2073)
#define WINED3DERR_UNSUPPORTEDCOLORARG MAKE_WINED3DHRESULT(2074)
#define WINED3DERR_UNSUPPORTEDALPHAOPERATION MAKE_WINED3DHRESULT(2075)
#define WINED3DERR_UNSUPPORTEDALPHAARG MAKE_WINED3DHRESULT(2076)
#define WINED3DERR_TOOMANYOPERATIONS MAKE_WINED3DHRESULT(2077)
#define WINED3DERR_CONFLICTINGTEXTUREFILTER MAKE_WINED3DHRESULT(2078)
#define WINED3DERR_UNSUPPORTEDFACTORVALUE MAKE_WINED3DHRESULT(2079)
#define WINED3DERR_CONFLICTINGRENDERSTATE MAKE_WINED3DHRESULT(2081)
#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_WINED3DHRESULT(2082)
#define WINED3DERR_CONFLICTINGTEXTUREPALETTE MAKE_WINED3DHRESULT(2086)
#define WINED3DERR_DRIVERINTERNALERROR MAKE_WINED3DHRESULT(2087)
#define WINED3DERR_NOTFOUND MAKE_WINED3DHRESULT(2150)
#define WINED3DERR_MOREDATA MAKE_WINED3DHRESULT(2151)
#define WINED3DERR_DEVICELOST MAKE_WINED3DHRESULT(2152)
#define WINED3DERR_DEVICENOTRESET MAKE_WINED3DHRESULT(2153)
#define WINED3DERR_NOTAVAILABLE MAKE_WINED3DHRESULT(2154)
#define WINED3DERR_OUTOFVIDEOMEMORY MAKE_WINED3DHRESULT(380)
#define WINED3DERR_INVALIDDEVICE MAKE_WINED3DHRESULT(2155)
#define WINED3DERR_INVALIDCALL MAKE_WINED3DHRESULT(2156)
#define WINED3DERR_DRIVERINVALIDCALL MAKE_WINED3DHRESULT(2157)
#define WINED3DERR_WASSTILLDRAWING MAKE_WINED3DHRESULT(540)
#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)
/*****************************************************************************
* Predeclare the interfaces