Skip to content

Commit be45b30

Browse files
committed
dxsdk: extend SAL shim for DXGI headers
Commit e8191ce ("Add this") routes griffin.c's d3dcompiler_common.c inclusion through an HAVE_D3D9+HAVE_HLSL arm and redirects dxgi_common.h to the bundled <dxsdk/dxgi1_6.h>. On legacy MSVC toolchains (2003-2010) this surfaces a new SAL-annotation parse cascade: dxgi1_2.h through dxgi1_6.h reference SAL 2 macros that those toolchains do not know
1 parent e8191ce commit be45b30

7 files changed

Lines changed: 51 additions & 0 deletions

File tree

gfx/include/dxsdk/dxgi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxgi1_2.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxgi1_3.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxgi1_4.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxgi1_5.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxgi1_6.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* SAL compatibility shim for legacy MSVC toolchains */
2+
#include "dxsdk_sal_compat.h"
3+
14

25
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
36

gfx/include/dxsdk/dxsdk_sal_compat.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,21 @@
244244
#ifndef _Out_writes_to_opt_
245245
#define _Out_writes_to_opt_(s,c)
246246
#endif
247+
#ifndef _Out_writes_bytes_to_
248+
#define _Out_writes_bytes_to_(s,c)
249+
#endif
250+
#ifndef _Out_writes_bytes_to_opt_
251+
#define _Out_writes_bytes_to_opt_(s,c)
252+
#endif
253+
#ifndef _Out_writes_all_opt_
254+
#define _Out_writes_all_opt_(s)
255+
#endif
256+
#ifndef _Out_writes_bytes_all_
257+
#define _Out_writes_bytes_all_(s)
258+
#endif
259+
#ifndef _Out_writes_bytes_all_opt_
260+
#define _Out_writes_bytes_all_opt_(s)
261+
#endif
247262
#ifndef _Inout_updates_
248263
#define _Inout_updates_(s)
249264
#endif
@@ -265,6 +280,24 @@
265280
#ifndef _Field_size_bytes_opt_
266281
#define _Field_size_bytes_opt_(s)
267282
#endif
283+
#ifndef _Field_size_full_
284+
#define _Field_size_full_(s)
285+
#endif
286+
#ifndef _Field_size_full_opt_
287+
#define _Field_size_full_opt_(s)
288+
#endif
289+
#ifndef _Field_size_bytes_full_
290+
#define _Field_size_bytes_full_(s)
291+
#endif
292+
#ifndef _Field_size_bytes_full_opt_
293+
#define _Field_size_bytes_full_opt_(s)
294+
#endif
295+
#ifndef _Field_size_part_
296+
#define _Field_size_part_(s,c)
297+
#endif
298+
#ifndef _Field_size_part_opt_
299+
#define _Field_size_part_opt_(s,c)
300+
#endif
268301

269302
/* --- SAL 2 wrapper / annotation-of-annotation forms (pass-through) --- */
270303
#ifndef _Always_

0 commit comments

Comments
 (0)