Skip to content

Commit 50a1d3d

Browse files
committed
add Device11X methods to wrap list
1 parent 21127c3 commit 50a1d3d

File tree

5 files changed

+291
-18
lines changed

5 files changed

+291
-18
lines changed

addon/com_wrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ IDirect3D9 * wrap_CreateObj(IDirect3D9 * origObj)
123123
return (IDirect3D9*)ret;
124124
}
125125

126-
ID3D11Device* wrap_CreateDevice11(ID3D11Device* origDev)
126+
ID3D11Device5* wrap_CreateDevice11(ID3D11Device5* origDev)
127127
{
128128
wrapped_com_obj * ret = (wrapped_com_obj*)malloc(sizeof(wrapped_com_obj));
129129

130130
ret->vtable = (com_vtable*)&g_main_vtable[METH_DEV11_QueryInterface];
131131
ret->orig_dev11 = origDev;
132132

133-
return (ID3D11Device*)ret;
133+
return (ID3D11Device5*)ret;
134134
}
135135

136136
IDXGISwapChain* wrap_CreateSwapchain(IDXGISwapChain* origSwc)

addon/com_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ typedef struct wrapped_com_obj {
1212
union {
1313
IDirect3D9* orig_obj;
1414
IDirect3DDevice9* orig_dev;
15-
ID3D11Device* orig_dev11;
15+
ID3D11Device5* orig_dev11;
1616
IDXGISwapChain* orig_swc;
1717
};
1818
} wrapped_com_obj;
@@ -90,7 +90,7 @@ typedef enum vtable_wrap_mode {
9090

9191
IDirect3DDevice9* wrap_CreateDevice(IDirect3DDevice9* origDev);
9292
IDirect3D9* wrap_CreateObj(IDirect3D9* origObj);
93-
ID3D11Device* wrap_CreateDevice11(ID3D11Device* origDev);
93+
ID3D11Device5* wrap_CreateDevice11(ID3D11Device5* origDev);
9494
IDXGISwapChain* wrap_CreateSwapchain(IDXGISwapChain* origSwc);
9595

9696
typedef struct wrap_event_data {

addon/com_wrapper_dev11_methods.inc

Lines changed: 273 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ WRAPPED_METH_DECL_(ULONG, WRAP_METH_NAME)(WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_
4545
/* [annotation] */
4646
const D3D11_TEXTURE3D_DESC *v1,
4747
/* [annotation] */
48-
_In_reads_opt_(_Inexpressible_(pDesc->MipLevels)) const D3D11_SUBRESOURCE_DATA *v2,
48+
const D3D11_SUBRESOURCE_DATA *v2,
4949
/* [annotation] */
5050
ID3D11Texture3D **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
5151
#undef WRAP_METH_NAME
@@ -284,15 +284,15 @@ WRAPPED_METH_DECL_(ULONG, WRAP_METH_NAME)(WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_
284284
/* [annotation] */
285285
UINT *v3,
286286
/* [annotation] */
287-
_Out_writes_opt_(*pNameLength) LPSTR v4,
287+
LPSTR v4,
288288
/* [annotation] */
289289
UINT *v5,
290290
/* [annotation] */
291-
_Out_writes_opt_(*pUnitsLength) LPSTR v6,
291+
LPSTR v6,
292292
/* [annotation] */
293-
UINT *v7,
293+
UINT *v7,
294294
/* [annotation] */
295-
_Out_writes_opt_(*pDescriptionLength) LPSTR v8,
295+
LPSTR v8,
296296
/* [annotation] */
297297
UINT *v9) WRAP_CALLTHRU_V9 CUSTOM_ENDLINE_DEF
298298
#undef WRAP_METH_NAME
@@ -308,9 +308,9 @@ WRAPPED_METH_DECL_(ULONG, WRAP_METH_NAME)(WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_
308308
/* [annotation] */
309309
REFGUID v1,
310310
/* [annotation] */
311-
_Inout_ UINT *v2,
311+
UINT *v2,
312312
/* [annotation] */
313-
_Out_writes_bytes_opt_(*pDataSize) void *v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
313+
void *v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
314314
#undef WRAP_METH_NAME
315315
#define WRAP_METH_NAME SetPrivateData
316316
WRAPPED_METH_DECL(WRAP_METH_NAME)( WRAPPED_THIS_
@@ -319,7 +319,7 @@ WRAPPED_METH_DECL_(ULONG, WRAP_METH_NAME)(WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_
319319
/* [annotation] */
320320
UINT v2,
321321
/* [annotation] */
322-
_In_reads_bytes_opt_(DataSize) const void *v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
322+
const void *v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
323323
#undef WRAP_METH_NAME
324324
#define WRAP_METH_NAME SetPrivateDataInterface
325325
WRAPPED_METH_DECL(WRAP_METH_NAME)( WRAPPED_THIS_
@@ -349,3 +349,268 @@ WRAPPED_METH_DECL_(ULONG, WRAP_METH_NAME)(WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_
349349
#define WRAP_METH_NAME GetExceptionMode
350350
WRAPPED_METH_DECL_(UINT, WRAP_METH_NAME)( WRAPPED_THIS) WRAP_CALLTHRU_V0 CUSTOM_ENDLINE_DEF
351351
#undef WRAP_METH_NAME
352+
353+
//device1
354+
355+
#define WRAP_METH_NAME GetImmediateContext1
356+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
357+
/* [annotation] */
358+
ID3D11DeviceContext1 **v1) WRAP_CALLTHRU_V1_ CUSTOM_ENDLINE_DEF
359+
#undef WRAP_METH_NAME
360+
361+
#define WRAP_METH_NAME CreateDeferredContext1
362+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
363+
UINT v1,
364+
/* [annotation] */
365+
ID3D11DeviceContext1 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
366+
#undef WRAP_METH_NAME
367+
368+
#define WRAP_METH_NAME CreateBlendState1
369+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
370+
/* [annotation] */
371+
const D3D11_BLEND_DESC1 *v1,
372+
/* [annotation] */
373+
ID3D11BlendState1 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
374+
#undef WRAP_METH_NAME
375+
376+
#define WRAP_METH_NAME CreateRasterizerState1
377+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
378+
/* [annotation] */
379+
const D3D11_RASTERIZER_DESC1 *v1,
380+
/* [annotation] */
381+
ID3D11RasterizerState1 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
382+
#undef WRAP_METH_NAME
383+
384+
#define WRAP_METH_NAME CreateDeviceContextState
385+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
386+
UINT v1,
387+
/* [annotation] */
388+
_In_reads_( FeatureLevels ) const D3D_FEATURE_LEVEL *v2,
389+
UINT v3,
390+
UINT v4,
391+
REFIID v5,
392+
/* [annotation] */
393+
D3D_FEATURE_LEVEL *v6,
394+
/* [annotation] */
395+
ID3DDeviceContextState **v7) WRAP_CALLTHRU_V7 CUSTOM_ENDLINE_DEF
396+
#undef WRAP_METH_NAME
397+
398+
#define WRAP_METH_NAME OpenSharedResource1
399+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
400+
/* [annotation] */
401+
HANDLE v1,
402+
/* [annotation] */
403+
REFIID v2,
404+
/* [annotation] */
405+
void **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
406+
#undef WRAP_METH_NAME
407+
408+
#define WRAP_METH_NAME OpenSharedResourceByName
409+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
410+
/* [annotation] */
411+
LPCWSTR v1,
412+
/* [annotation] */
413+
DWORD v2,
414+
/* [annotation] */
415+
REFIID v3,
416+
/* [annotation] */
417+
void **v4) WRAP_CALLTHRU_V4 CUSTOM_ENDLINE_DEF
418+
#undef WRAP_METH_NAME
419+
420+
421+
//device2
422+
#define WRAP_METH_NAME GetImmediateContext2
423+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
424+
/* [annotation] */
425+
ID3D11DeviceContext2 **v1) WRAP_CALLTHRU_V1_ CUSTOM_ENDLINE_DEF
426+
#undef WRAP_METH_NAME
427+
428+
#define WRAP_METH_NAME CreateDeferredContext2
429+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
430+
UINT v1,
431+
/* [annotation] */
432+
ID3D11DeviceContext2 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
433+
#undef WRAP_METH_NAME
434+
435+
#define WRAP_METH_NAME GetResourceTiling
436+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
437+
/* [annotation] */
438+
ID3D11Resource *v1,
439+
/* [annotation] */
440+
UINT *v2,
441+
/* [annotation] */
442+
D3D11_PACKED_MIP_DESC *v3,
443+
/* [annotation] */
444+
D3D11_TILE_SHAPE *v4,
445+
/* [annotation] */
446+
UINT *v5,
447+
/* [annotation] */
448+
UINT v6,
449+
/* [annotation] */
450+
D3D11_SUBRESOURCE_TILING *v7) WRAP_CALLTHRU_V7_ CUSTOM_ENDLINE_DEF
451+
#undef WRAP_METH_NAME
452+
453+
#define WRAP_METH_NAME CheckMultisampleQualityLevels1
454+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
455+
/* [annotation] */
456+
DXGI_FORMAT v1,
457+
/* [annotation] */
458+
UINT v2,
459+
/* [annotation] */
460+
UINT v3,
461+
/* [annotation] */
462+
UINT *v4) WRAP_CALLTHRU_V4 CUSTOM_ENDLINE_DEF
463+
#undef WRAP_METH_NAME
464+
465+
//device3
466+
467+
#define WRAP_METH_NAME CreateTexture2D1
468+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
469+
/* [annotation] */
470+
const D3D11_TEXTURE2D_DESC1 *v1,
471+
/* [annotation] */
472+
const D3D11_SUBRESOURCE_DATA *v2,
473+
/* [annotation] */
474+
ID3D11Texture2D1 **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
475+
#undef WRAP_METH_NAME
476+
477+
#define WRAP_METH_NAME CreateTexture3D1
478+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
479+
/* [annotation] */
480+
const D3D11_TEXTURE3D_DESC1 *v1,
481+
/* [annotation] */
482+
const D3D11_SUBRESOURCE_DATA *v2,
483+
/* [annotation] */
484+
ID3D11Texture3D1 **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
485+
#undef WRAP_METH_NAME
486+
487+
#define WRAP_METH_NAME CreateRasterizerState2
488+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
489+
/* [annotation] */
490+
const D3D11_RASTERIZER_DESC2 *v1,
491+
/* [annotation] */
492+
ID3D11RasterizerState2 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
493+
#undef WRAP_METH_NAME
494+
495+
#define WRAP_METH_NAME CreateShaderResourceView1
496+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
497+
/* [annotation] */
498+
ID3D11Resource *v1,
499+
/* [annotation] */
500+
const D3D11_SHADER_RESOURCE_VIEW_DESC1 *v2,
501+
/* [annotation] */
502+
ID3D11ShaderResourceView1 **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
503+
#undef WRAP_METH_NAME
504+
505+
#define WRAP_METH_NAME CreateUnorderedAccessView1
506+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
507+
/* [annotation] */
508+
ID3D11Resource *v1,
509+
/* [annotation] */
510+
const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *v2,
511+
/* [annotation] */
512+
ID3D11UnorderedAccessView1 **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
513+
#undef WRAP_METH_NAME
514+
515+
#define WRAP_METH_NAME CreateRenderTargetView1
516+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
517+
/* [annotation] */
518+
ID3D11Resource *v1,
519+
/* [annotation] */
520+
const D3D11_RENDER_TARGET_VIEW_DESC1 *v2,
521+
/* [annotation] */
522+
ID3D11RenderTargetView1 **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
523+
#undef WRAP_METH_NAME
524+
525+
#define WRAP_METH_NAME CreateQuery1
526+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
527+
/* [annotation] */
528+
const D3D11_QUERY_DESC1 *v1,
529+
/* [annotation] */
530+
ID3D11Query1 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
531+
#undef WRAP_METH_NAME
532+
533+
#define WRAP_METH_NAME GetImmediateContext3
534+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
535+
/* [annotation] */
536+
ID3D11DeviceContext3 **v1) WRAP_CALLTHRU_V1_ CUSTOM_ENDLINE_DEF
537+
#undef WRAP_METH_NAME
538+
539+
#define WRAP_METH_NAME CreateDeferredContext3
540+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
541+
UINT v1,
542+
/* [annotation] */
543+
ID3D11DeviceContext3 **v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
544+
#undef WRAP_METH_NAME
545+
546+
#define WRAP_METH_NAME WriteToSubresource
547+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
548+
/* [annotation] */
549+
ID3D11Resource *v1,
550+
/* [annotation] */
551+
UINT v2,
552+
/* [annotation] */
553+
const D3D11_BOX *v3,
554+
/* [annotation] */
555+
const void *v4,
556+
/* [annotation] */
557+
UINT v5,
558+
/* [annotation] */
559+
UINT v6) WRAP_CALLTHRU_V6_ CUSTOM_ENDLINE_DEF
560+
#undef WRAP_METH_NAME
561+
562+
#define WRAP_METH_NAME ReadFromSubresource
563+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
564+
/* [annotation] */
565+
void *v1,
566+
/* [annotation] */
567+
UINT v2,
568+
/* [annotation] */
569+
UINT v3,
570+
/* [annotation] */
571+
ID3D11Resource *v4,
572+
/* [annotation] */
573+
UINT v5,
574+
/* [annotation] */
575+
const D3D11_BOX *v6) WRAP_CALLTHRU_V6_ CUSTOM_ENDLINE_DEF
576+
#undef WRAP_METH_NAME
577+
578+
//device4
579+
580+
#define WRAP_METH_NAME RegisterDeviceRemovedEvent
581+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
582+
/* [annotation] */
583+
HANDLE v1,
584+
/* [annotation] */
585+
DWORD *v2) WRAP_CALLTHRU_V2 CUSTOM_ENDLINE_DEF
586+
#undef WRAP_METH_NAME
587+
588+
#define WRAP_METH_NAME UnregisterDeviceRemoved
589+
WRAPPED_METH_DECL_(void, WRAP_METH_NAME) ( WRAPPED_THIS_
590+
/* [annotation] */
591+
DWORD v1) WRAP_CALLTHRU_V1_ CUSTOM_ENDLINE_DEF
592+
#undef WRAP_METH_NAME
593+
594+
//device5
595+
596+
#define WRAP_METH_NAME OpenSharedFence
597+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
598+
/* [annotation] */
599+
HANDLE v1,
600+
/* [annotation] */
601+
REFIID v2,
602+
/* [annotation] */
603+
void **v3) WRAP_CALLTHRU_V3 CUSTOM_ENDLINE_DEF
604+
#undef WRAP_METH_NAME
605+
606+
#define WRAP_METH_NAME CreateFence
607+
WRAPPED_METH_DECL(WRAP_METH_NAME) ( WRAPPED_THIS_
608+
/* [annotation] */
609+
UINT64 v1,
610+
/* [annotation] */
611+
D3D11_FENCE_FLAG v2,
612+
/* [annotation] */
613+
REFIID v3,
614+
/* [annotation] */
615+
void **v4) WRAP_CALLTHRU_V4 CUSTOM_ENDLINE_DEF
616+
#undef WRAP_METH_NAME

0 commit comments

Comments
 (0)