(format != D3DFMT_NULL);
HRESULT hr;
+ DBG("This=%p, pParams=%p initResource=%p Type=%d format=%d Pool=%d Usage=%d\n",
+ This, pParams, initResource, Type, format, Pool, Usage);
+
user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)) ||
Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
user_assert(!(Usage & D3DUSAGE_DYNAMIC) ||
{
DWORD old = This->lod;
+ DBG("This=%p LODNew=%d\n", This, LODNew);
+
user_assert(This->base.pool == D3DPOOL_MANAGED, 0);
This->lod = MIN2(LODNew, This->base.info.last_level);
DWORD WINAPI
NineBaseTexture9_GetLOD( struct NineBaseTexture9 *This )
{
+ DBG("This=%p\n", This);
+
return This->lod;
}
DWORD WINAPI
NineBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This )
{
+ DBG("This=%p\n", This);
+
if (This->base.usage & D3DUSAGE_AUTOGENMIPMAP)
return 1;
return This->base.info.last_level + 1;
NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This,
D3DTEXTUREFILTERTYPE FilterType )
{
+ DBG("This=%p FilterType=%d\n", This, FilterType);
+
if (!(This->base.usage & D3DUSAGE_AUTOGENMIPMAP))
return D3D_OK;
user_assert(FilterType != D3DTEXF_NONE, D3DERR_INVALIDCALL);
D3DTEXTUREFILTERTYPE WINAPI
NineBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This )
{
+ DBG("This=%p\n", This);
+
return This->mipfilter;
}
struct pipe_sampler_view templ;
uint8_t swizzle[4];
+ DBG("This=%p sRGB=%d\n", This, sRGB);
+
if (unlikely(!resource)) {
if (unlikely(This->format == D3DFMT_NULL))
return D3D_OK;
void WINAPI
NineBaseTexture9_PreLoad( struct NineBaseTexture9 *This )
{
+ DBG("This=%p\n", This);
+
if (This->dirty && This->base.pool == D3DPOOL_MANAGED)
NineBaseTexture9_UploadSelf(This);
}
D3DSURFACE_DESC sfdesc;
HRESULT hr;
+ DBG("This=%p pParams=%p EdgeLength=%u Levels=%u Usage=%d "
+ "Format=%d Pool=%d pSharedHandle=%p\n",
+ This, pParams, EdgeLength, Levels, Usage,
+ Format, Pool, pSharedHandle);
+
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
(Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
UINT Level,
D3DSURFACE_DESC *pDesc )
{
+ DBG("This=%p Level=%u pDesc=%p\n", This, Level, pDesc);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
D3DERR_INVALIDCALL);
{
const unsigned s = Level * 6 + FaceType;
+ DBG("This=%p FaceType=%d Level=%u ppCubeMapSurface=%p\n",
+ This, FaceType, Level, ppCubeMapSurface);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
D3DERR_INVALIDCALL);
{
const unsigned s = Level * 6 + FaceType;
+ DBG("This=%p FaceType=%d Level=%u pLockedRect=%p pRect=%p Flags=%d\n",
+ This, FaceType, Level, pLockedRect, pRect, Flags);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
D3DERR_INVALIDCALL);
{
const unsigned s = Level * 6 + FaceType;
+ DBG("This=%p FaceType=%d Level=%u\n", This, FaceType, Level);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(FaceType < 6, D3DERR_INVALIDCALL);
D3DCUBEMAP_FACES FaceType,
const RECT *pDirtyRect )
{
+ DBG("This=%p FaceType=%d pDirtyRect=%p\n", This, FaceType, pDirtyRect);
+
user_assert(FaceType < 6, D3DERR_INVALIDCALL);
if (This->base.base.pool != D3DPOOL_MANAGED) {
{
struct NineSurface9 *refSurf = NULL;
+ DBG("This=%p is_reset=%d\n", This, (int) is_reset);
+
assert(!This->is_recording);
nine_state_set_defaults(&This->state, &This->caps, is_reset);
{
struct pipe_context *pipe = This->pipe;
+ DBG("This=%p mask=%u\n", This, mask);
+
if (mask & 0x1) {
struct pipe_constant_buffer cb;
cb.buffer_offset = 0;
{
unsigned i;
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
+
+ DBG("This=%p pParams=%p pScreen=%p pCreationParameters=%p pCaps=%p pPresentationParameters=%p "
+ "pD3D9=%p pPresentationGroup=%p pCTX=%p ex=%d pFullscreenDisplayMode=%p\n",
+ This, pParams, pScreen, pCreationParameters, pCaps, pPresentationParameters, pD3D9,
+ pPresentationGroup, pCTX, (int) ex, pFullscreenDisplayMode);
+
if (FAILED(hr)) { return hr; }
list_inithead(&This->update_textures);
{
struct NineSwapChain9 *swap = This->swapchains[0];
+ DBG("This=%p X=%d Y=%d Flags=%d\n", This, X, Y, Flags);
+
This->cursor.pos.x = X;
This->cursor.pos.y = Y;
BOOL bShow )
{
BOOL old = This->cursor.visible;
+
+ DBG("This=%p bShow=%d\n", This, (int) bShow);
+
This->cursor.visible = bShow && (This->cursor.hotspot.x != -1);
if (!This->cursor.software)
ID3DPresent_SetCursor(This->swapchains[0]->present, NULL, NULL, bShow);
ID3DPresent *present;
HRESULT hr;
+ DBG("This=%p pPresentationParameters=%p pSwapChain=%p\n",
+ This, pPresentationParameters, pSwapChain);
+
user_assert(pPresentationParameters, D3DERR_INVALIDCALL);
hr = ID3DPresentGroup_CreateAdditionalPresent(This->present, pPresentationParameters, &present);
unsigned i;
HRESULT hr;
+ DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p pDirtyRegion=%p\n",
+ This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
+
/* XXX is this right? */
for (i = 0; i < This->nswapchains; ++i) {
hr = NineSwapChain9_Present(This->swapchains[i], pSourceRect, pDestRect,
{
struct nine_state *state = This->update;
D3DMATRIX *M = nine_state_access_transform(state, State, TRUE);
+
+ DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix);
+
user_assert(M, D3DERR_INVALIDCALL);
*M = *pMatrix;
struct nine_state *state = This->update;
D3DMATRIX T;
D3DMATRIX *M = nine_state_access_transform(state, State, TRUE);
+
+ DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix);
+
user_assert(M, D3DERR_INVALIDCALL);
nine_d3d_matrix_matrix_mul(&T, pMatrix, M);
HRESULT hr;
unsigned buffer_offset, buffer_size;
+ DBG("This=%p SrcStartIndex=%u DestIndex=%u VertexCount=%u "
+ "pDestBuffer=%p pVertexDecl=%p Flags=%d\n",
+ This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer,
+ pVertexDecl, Flags);
+
if (!screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS))
STUB(D3DERR_INVALIDCALL);
{
struct NineVertexDeclaration9 *vdecl;
+ DBG("This=%p pVertexElements=%p ppDecl=%p\n",
+ This, pVertexElements, ppDecl);
+
HRESULT hr = NineVertexDeclaration9_new(This, pVertexElements, &vdecl);
if (SUCCEEDED(hr))
*ppDecl = (IDirect3DVertexDeclaration9 *)vdecl;
struct NineVertexShader9 *vs;
HRESULT hr;
+ DBG("This=%p pFunction=%p ppShader=%p\n", This, pFunction, ppShader);
+
hr = NineVertexShader9_new(This, &vs, pFunction, NULL);
if (FAILED(hr))
return hr;
struct NineVertexBuffer9 *pVBuf9 = NineVertexBuffer9(pStreamData);
const unsigned i = StreamNumber;
+ DBG("This=%p StreamNumber=%u pStreamData=%p OffsetInBytes=%u Stride=%u\n",
+ This, StreamNumber, pStreamData, OffsetInBytes, Stride);
+
user_assert(StreamNumber < This->caps.MaxStreams, D3DERR_INVALIDCALL);
user_assert(Stride <= This->caps.MaxStreamStride, D3DERR_INVALIDCALL);
{
struct nine_state *state = This->update;
+ DBG("This=%p pIndexData=%p\n", This, pIndexData);
+
if (likely(!This->is_recording))
if (state->idxbuf == NineIndexBuffer9(pIndexData))
return D3D_OK;
struct NinePixelShader9 *ps;
HRESULT hr;
+ DBG("This=%p pFunction=%p ppShader=%p\n", This, pFunction, ppShader);
+
hr = NinePixelShader9_new(This, &ps, pFunction, NULL);
if (FAILED(hr))
return hr;
struct NineQuery9 *query;
HRESULT hr;
+ DBG("This=%p Type=%d ppQuery=%p\n", This, Type, ppQuery);
+
if (!ppQuery)
return nine_is_query_supported(Type);
ID3DPresentGroup *pPresentationGroup,
struct d3dadapter9_context *pCTX )
{
+ DBG("This=%p pParams=%p pScreen=%p pCreationParameters=%p pCaps=%p "
+ "pPresentationParameters=%p pFullscreenDisplayMode=%p "
+ "pD3D9Ex=%p pPresentationGroup=%p pCTX=%p\n",
+ This, pParams, pScreen, pCreationParameters, pCaps,
+ pPresentationParameters, pFullscreenDisplayMode,
+ pD3D9Ex, pPresentationGroup, pCTX);
+
return NineDevice9_ctor(&This->base, pParams,
pScreen, pCreationParameters, pCaps,
pPresentationParameters,
unsigned i;
HRESULT hr;
+ DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p "
+ "pDirtyRegion=%p dwFlags=%d\n",
+ This, pSourceRect, pDestRect, hDestWindowOverride,
+ pDirtyRegion, dwFlags);
+
for (i = 0; i < This->base.nswapchains; i++) {
hr = NineSwapChain9_Present(This->base.swapchains[i], pSourceRect, pDestRect,
hDestWindowOverride, pDirtyRegion, dwFlags);
{
struct NineSwapChain9Ex *swapchain;
+ DBG("This=%p iSwapChain=%u pMode=%p pRotation=%p\n",
+ This, iSwapChain, pMode, pRotation);
+
user_assert(iSwapChain < This->base.nswapchains, D3DERR_INVALIDCALL);
swapchain = NineSwapChain9Ex(This->base.swapchains[iSwapChain]);
{
unsigned i = 0;
+ DBG("This=%p riid=%p ppvObject=%p\n", This, riid, ppvObject);
+
if (!ppvObject) return E_POINTER;
do {
struct nine_shader_info info;
HRESULT hr;
+ DBG("This=%p pParams=%p pFunction=%p cso=%p\n", This, pParams, pFunction, cso);
+
hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr))
return hr;
void *pData,
UINT *pSizeOfData )
{
+ DBG("This=%p pData=%p pSizeOfData=%p\n", This, pData, pSizeOfData);
+
user_assert(pSizeOfData, D3DERR_INVALIDCALL);
if (!pData) {
const unsigned ptype = d3dquerytype_to_pipe_query(Type);
HRESULT hr;
+ DBG("This=%p pParams=%p Type=%d\n", This, pParams, Type);
+
hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr))
return hr;
{
struct pipe_context *pipe = This->base.device->pipe;
+ DBG("This=%p dwIssueFlags=%d\n", This, dwIssueFlags);
+
user_assert((dwIssueFlags == D3DISSUE_BEGIN && !This->instant) ||
(dwIssueFlags == 0) ||
(dwIssueFlags == D3DISSUE_END), D3DERR_INVALIDCALL);
union pipe_query_result presult;
union nine_query_result nresult;
+ DBG("This=%p pData=%p dwSize=%d dwGetDataFlags=%d\n",
+ This, pData, dwSize, dwGetDataFlags);
+
user_assert(This->state != NINE_QUERY_STATE_RUNNING, D3DERR_INVALIDCALL);
user_assert(dwSize == 0 || pData, D3DERR_INVALIDCALL);
user_assert(dwGetDataFlags == 0 ||
struct pipe_screen *screen;
HRESULT hr;
+ DBG("This=%p pParams=%p initResource=%p Allocate=%d "
+ "Type=%d Pool=%d Usage=%d\n",
+ This, pParams, initResource, (int) Allocate,
+ Type, Pool, Usage);
+
+ DBG("This=%p pParams=%p initResource=%p Allocate=%d Type=%d Pool=%d usage=%d\n",
+ This, pParams, initResource, Allocate, Type, Pool, Usage);
+
hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr))
return hr;
DWORD PriorityNew )
{
DWORD prev = This->priority;
+
+ DBG("This=%p, PriorityNew=%d\n", This, PriorityNew);
+
This->priority = PriorityNew;
return prev;
}
enum nine_stateblock_type type )
{
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
+
+ DBG("This=%p pParams=%p type=%d\n", This, pParams, type);
+
if (FAILED(hr))
return hr;
float area[2];
struct u_rect rect, cover_a, cover_b;
+ DBG("This=%p box=%p\n", This, box);
+
if (!box) {
This->dirty_rects[0].x0 = 0;
This->dirty_rects[0].y0 = 0;
uint8_t *p_dst;
const uint8_t *p_src;
+ DBG("This=%p From=%p pDestPoint=%p pSourceRect=%p\n",
+ This, From, pDestPoint, pSourceRect);
+
user_assert(This->desc.Format == From->desc.Format, D3DERR_INVALIDCALL);
dst_box.x = pDestPoint ? pDestPoint->x : 0;
uint8_t *ptr;
unsigned i;
+ DBG("This=%p\n", This);
+
assert(This->base.pool == D3DPOOL_MANAGED);
if (!NineSurface9_IsDirty(This))
HRESULT hr = present(This, pSourceRect, pDestRect,
hDestWindowOverride, pDirtyRegion, dwFlags);
+ DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p "
+ "pDirtyRegion=%p dwFlags=%d\n",
+ This, pSourceRect, pDestRect, hDestWindowOverride,
+ pDirtyRegion,dwFlags);
+
if (hr == D3DERR_WASSTILLDRAWING)
return hr;
HWND hFocusWindow,
D3DDISPLAYMODEEX *mode )
{
+ DBG("This=%p pParams=%p implicit=%d pPresent=%p pPresentationParameters=%p "
+ "pCTX=%p hFocusWindow=%p mode=%p",
+ This, pParams, (int) implicit, pPresent, pPresentationParameters, pCTX, hFocusWindow, mode);
+
return NineSwapChain9_ctor(&This->base, pParams, implicit, pPresent,
pPresentationParameters, pCTX, hFocusWindow, mode);
}
const RECT *pRect,
DWORD Flags )
{
+ DBG("This=%p Level=%u pLockedRect=%p pRect=%p Flags=%d\n",
+ This, Level, pLockedRect, pRect, Flags);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
D3DERR_INVALIDCALL);
NineTexture9_UnlockRect( struct NineTexture9 *This,
UINT Level )
{
+ DBG("This=%p Level=%u\n", This, Level);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
return NineSurface9_UnlockRect(This->surfaces[Level]);
const D3DCAPS9 *caps;
unsigned i;
+ DBG("This=%p pParams=%p pElements=%p\n", This, pParams, pElements);
+
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr)) { return hr; }
void *src_map;
void *dst_map;
+ DBG("This=%p pDstBuf=%p DestIndex=%u VertexCount=%u pSrcBuf=%p so=%p\n",
+ This, pDstBuf, DestIndex, VertexCount, pSrcBuf, so);
+
transkey.output_stride = 0;
for (i = 0; i < This->nelems; ++i) {
enum pipe_format format;
HRESULT hr;
unsigned i;
+ DBG("This=%p pParams=%p pFunction=%p cso=%p\n",
+ This, pParams, pFunction, cso);
+
hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr))
return hr;
uint8_t *p_dst;
const uint8_t *p_src;
+ DBG("This=%p From=%p dstx=%u dsty=%u dstz=%u pSrcBox=%p\n",
+ This, From, dstx, dsty, dstz, pSrcBox);
+
user_assert(This->desc.Format == From->desc.Format, D3DERR_INVALIDCALL);
dst_box.x = dstx;
struct pheader *header;
const void *user_data = pData;
+ DBG("This=%p refguid=%p pData=%p SizeOfData=%d Flags=%d\n",
+ This, refguid, pData, SizeOfData, Flags);
+
if (Flags & D3DSPD_IUNKNOWN)
user_assert(SizeOfData == sizeof(IUnknown *), D3DERR_INVALIDCALL);
{
struct pheader *header;
+ DBG("This=%p refguid=%p\n", This, refguid);
+
header = util_hash_table_get(This->pdata, refguid);
if (!header) { return D3DERR_NOTFOUND; }
D3DVOLUME_DESC voldesc;
HRESULT hr;
+ DBG("This=%p pParams=%p Width=%u Height=%u Depth=%u Levels=%u "
+ "Usage=%d Format=%d Pool=%d pSharedHandle=%p\n",
+ This, pParams, Width, Height, Depth, Levels,
+ Usage, Format, Pool, pSharedHandle);
+
/* An IDirect3DVolume9 cannot be bound as a render target can it ? */
user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)),
D3DERR_INVALIDCALL);
const D3DBOX *pBox,
DWORD Flags )
{
+ DBG("This=%p Level=%u pLockedVolume=%p pBox=%p Flags=%d\n",
+ This, Level, pLockedVolume, pBox, Flags);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
D3DERR_INVALIDCALL);
NineVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This,
UINT Level )
{
+ DBG("This=%p Level=%u\n", This, Level);
+
user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL);
return NineVolume9_UnlockBox(This->volumes[Level]);
NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This,
const D3DBOX *pDirtyBox )
{
+ DBG("This=%p pDirtybox=%p\n", This, pDirtyBox);
+
if (This->base.base.pool != D3DPOOL_MANAGED) {
if (This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP)
This->base.dirty_mip = TRUE;