ホーム › Graphics.Dxgi › DXGI_ADAPTER_DESC3
DXGI_ADAPTER_DESC3
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Description | WCHAR | 256 | +0 | +0 | アダプターの説明を格納する文字列です。 |
| VendorId | DWORD | 4 | +256 | +256 | アダプターのハードウェア ベンダーの PCI ID または ACPI ID です。この値が 0xFFFF 以下の場合は PCI ID、それ以外の場合は ACPI ID です。 |
| DeviceId | DWORD | 4 | +260 | +260 | アダプターのハードウェア デバイスの PCI ID または ACPI ID です。VendorId が PCI ID の場合はこの値も PCI ID、それ以外の場合は ACPI ID です。 |
| SubSysId | DWORD | 4 | +264 | +264 | アダプターのハードウェア サブシステムの PCI ID または ACPI ID です。VendorId が PCI ID の場合はこの値も PCI ID、それ以外の場合は ACPI ID です。 |
| Revision | DWORD | 4 | +268 | +268 | アダプターの PCI または ACPI のリビジョン番号です。VendorId が PCI ID の場合は PCI デバイスのリビジョン番号、それ以外の場合は ACPI デバイスのリビジョン番号です。 |
| DedicatedVideoMemory | UINT_PTR | 8/4 | +272 | +272 | CPU と共有されない専用ビデオ メモリのバイト数です。 |
| DedicatedSystemMemory | UINT_PTR | 8/4 | +280 | +276 | CPU と共有されない専用システム メモリのバイト数です。このメモリは、起動時に利用可能なシステム メモリから割り当てられます。 |
| SharedSystemMemory | UINT_PTR | 8/4 | +288 | +280 | 共有システム メモリのバイト数です。これは、動作中にアダプターが消費する可能性があるシステム メモリの最大値です。ドライバーがビデオ メモリを管理および使用する際に付随的に消費するメモリは、これとは別に加算されます。 |
| AdapterLuid | LUID | 8 | +296 | +284 | アダプターを一意に識別する値です。構造体の定義については LUID を参照してください。LUID は dxgi.h で定義されています。 |
| Flags | DXGI_ADAPTER_FLAG3 | 4 | +304 | +292 | アダプターの種類を表す DXGI_ADAPTER_FLAG3 列挙型の値です。DXGI_ADAPTER_FLAG_REMOTE フラグは予約済みです。 |
| GraphicsPreemptionGranularity | DXGI_GRAPHICS_PREEMPTION_GRANULARITY | 4 | +308 | +296 | 現在のグラフィックス レンダリング タスクの実行から GPU をプリエンプトできる粒度のレベルを表す DXGI_GRAPHICS_PREEMPTION_GRANULARITY 列挙型の値です。 |
| ComputePreemptionGranularity | DXGI_COMPUTE_PREEMPTION_GRANULARITY | 4 | +312 | +300 | 現在のコンピューティング タスクの実行から GPU をプリエンプトできる粒度のレベルを表す DXGI_COMPUTE_PREEMPTION_GRANULARITY 列挙型の値です。 |
公式ドキュメント
Microsoft DirectX Graphics Infrastructure (DXGI) 1.6 を使用するアダプター (またはビデオ カード) を記述します。
解説(Remarks)
DXGI_ADAPTER_DESC3 構造体は、アダプターに関する DXGI 1.6 の記述を提供します。この構造体は IDXGIAdapter4::GetDesc3 メソッドによって初期化されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// LUID (x64 8 / x86 8 バイト)
typedef struct LUID {
DWORD LowPart;
INT HighPart;
} LUID;
// DXGI_ADAPTER_DESC3 (x64 320 / x86 304 バイト)
typedef struct DXGI_ADAPTER_DESC3 {
WCHAR Description[128];
DWORD VendorId;
DWORD DeviceId;
DWORD SubSysId;
DWORD Revision;
UINT_PTR DedicatedVideoMemory;
UINT_PTR DedicatedSystemMemory;
UINT_PTR SharedSystemMemory;
LUID AdapterLuid;
DXGI_ADAPTER_FLAG3 Flags;
DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
} DXGI_ADAPTER_DESC3;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LUID
{
public uint LowPart;
public int HighPart;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXGI_ADAPTER_DESC3
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string Description;
public uint VendorId;
public uint DeviceId;
public uint SubSysId;
public uint Revision;
public UIntPtr DedicatedVideoMemory;
public UIntPtr DedicatedSystemMemory;
public UIntPtr SharedSystemMemory;
public LUID AdapterLuid;
public int Flags;
public int GraphicsPreemptionGranularity;
public int ComputePreemptionGranularity;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LUID
Public LowPart As UInteger
Public HighPart As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXGI_ADAPTER_DESC3
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public Description As String
Public VendorId As UInteger
Public DeviceId As UInteger
Public SubSysId As UInteger
Public Revision As UInteger
Public DedicatedVideoMemory As UIntPtr
Public DedicatedSystemMemory As UIntPtr
Public SharedSystemMemory As UIntPtr
Public AdapterLuid As LUID
Public Flags As Integer
Public GraphicsPreemptionGranularity As Integer
Public ComputePreemptionGranularity As Integer
End Structureimport ctypes
from ctypes import wintypes
class LUID(ctypes.Structure):
_fields_ = [
("LowPart", wintypes.DWORD),
("HighPart", ctypes.c_int),
]
class DXGI_ADAPTER_DESC3(ctypes.Structure):
_fields_ = [
("Description", ctypes.c_wchar * 128),
("VendorId", wintypes.DWORD),
("DeviceId", wintypes.DWORD),
("SubSysId", wintypes.DWORD),
("Revision", wintypes.DWORD),
("DedicatedVideoMemory", ctypes.c_size_t),
("DedicatedSystemMemory", ctypes.c_size_t),
("SharedSystemMemory", ctypes.c_size_t),
("AdapterLuid", LUID),
("Flags", ctypes.c_int),
("GraphicsPreemptionGranularity", ctypes.c_int),
("ComputePreemptionGranularity", ctypes.c_int),
]#[repr(C)]
pub struct LUID {
pub LowPart: u32,
pub HighPart: i32,
}
#[repr(C)]
pub struct DXGI_ADAPTER_DESC3 {
pub Description: [u16; 128],
pub VendorId: u32,
pub DeviceId: u32,
pub SubSysId: u32,
pub Revision: u32,
pub DedicatedVideoMemory: usize,
pub DedicatedSystemMemory: usize,
pub SharedSystemMemory: usize,
pub AdapterLuid: LUID,
pub Flags: i32,
pub GraphicsPreemptionGranularity: i32,
pub ComputePreemptionGranularity: i32,
}import "golang.org/x/sys/windows"
type LUID struct {
LowPart uint32
HighPart int32
}
type DXGI_ADAPTER_DESC3 struct {
Description [128]uint16
VendorId uint32
DeviceId uint32
SubSysId uint32
Revision uint32
DedicatedVideoMemory uintptr
DedicatedSystemMemory uintptr
SharedSystemMemory uintptr
AdapterLuid LUID
Flags int32
GraphicsPreemptionGranularity int32
ComputePreemptionGranularity int32
}type
LUID = record
LowPart: DWORD;
HighPart: Integer;
end;
DXGI_ADAPTER_DESC3 = record
Description: array[0..127] of WideChar;
VendorId: DWORD;
DeviceId: DWORD;
SubSysId: DWORD;
Revision: DWORD;
DedicatedVideoMemory: NativeUInt;
DedicatedSystemMemory: NativeUInt;
SharedSystemMemory: NativeUInt;
AdapterLuid: LUID;
Flags: Integer;
GraphicsPreemptionGranularity: Integer;
ComputePreemptionGranularity: Integer;
end;const LUID = extern struct {
LowPart: u32,
HighPart: i32,
};
const DXGI_ADAPTER_DESC3 = extern struct {
Description: [128]u16,
VendorId: u32,
DeviceId: u32,
SubSysId: u32,
Revision: u32,
DedicatedVideoMemory: usize,
DedicatedSystemMemory: usize,
SharedSystemMemory: usize,
AdapterLuid: LUID,
Flags: i32,
GraphicsPreemptionGranularity: i32,
ComputePreemptionGranularity: i32,
};type
LUID {.bycopy.} = object
LowPart: uint32
HighPart: int32
DXGI_ADAPTER_DESC3 {.bycopy.} = object
Description: array[128, uint16]
VendorId: uint32
DeviceId: uint32
SubSysId: uint32
Revision: uint32
DedicatedVideoMemory: uint
DedicatedSystemMemory: uint
SharedSystemMemory: uint
AdapterLuid: LUID
Flags: int32
GraphicsPreemptionGranularity: int32
ComputePreemptionGranularity: int32struct LUID
{
uint LowPart;
int HighPart;
}
struct DXGI_ADAPTER_DESC3
{
wchar[128] Description;
uint VendorId;
uint DeviceId;
uint SubSysId;
uint Revision;
size_t DedicatedVideoMemory;
size_t DedicatedSystemMemory;
size_t SharedSystemMemory;
LUID AdapterLuid;
int Flags;
int GraphicsPreemptionGranularity;
int ComputePreemptionGranularity;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXGI_ADAPTER_DESC3 サイズ: 304 バイト(x86)
dim st, 76 ; 4byte整数×76(構造体サイズ 304 / 4 切り上げ)
; Description : WCHAR (+0, 256byte) varptr(st)+0 を基点に操作(256byte:入れ子/配列)
; VendorId : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; DeviceId : DWORD (+260, 4byte) st.65 = 値 / 値 = st.65 (lpoke/lpeek も可)
; SubSysId : DWORD (+264, 4byte) st.66 = 値 / 値 = st.66 (lpoke/lpeek も可)
; Revision : DWORD (+268, 4byte) st.67 = 値 / 値 = st.67 (lpoke/lpeek も可)
; DedicatedVideoMemory : UINT_PTR (+272, 4byte) st.68 = 値 / 値 = st.68 (lpoke/lpeek も可)
; DedicatedSystemMemory : UINT_PTR (+276, 4byte) st.69 = 値 / 値 = st.69 (lpoke/lpeek も可)
; SharedSystemMemory : UINT_PTR (+280, 4byte) st.70 = 値 / 値 = st.70 (lpoke/lpeek も可)
; AdapterLuid : LUID (+284, 8byte) varptr(st)+284 を基点に操作(8byte:入れ子/配列)
; Flags : DXGI_ADAPTER_FLAG3 (+292, 4byte) st.73 = 値 / 値 = st.73 (lpoke/lpeek も可)
; GraphicsPreemptionGranularity : DXGI_GRAPHICS_PREEMPTION_GRANULARITY (+296, 4byte) st.74 = 値 / 値 = st.74 (lpoke/lpeek も可)
; ComputePreemptionGranularity : DXGI_COMPUTE_PREEMPTION_GRANULARITY (+300, 4byte) st.75 = 値 / 値 = st.75 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXGI_ADAPTER_DESC3 サイズ: 320 バイト(x64)
dim st, 80 ; 4byte整数×80(構造体サイズ 320 / 4 切り上げ)
; Description : WCHAR (+0, 256byte) varptr(st)+0 を基点に操作(256byte:入れ子/配列)
; VendorId : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; DeviceId : DWORD (+260, 4byte) st.65 = 値 / 値 = st.65 (lpoke/lpeek も可)
; SubSysId : DWORD (+264, 4byte) st.66 = 値 / 値 = st.66 (lpoke/lpeek も可)
; Revision : DWORD (+268, 4byte) st.67 = 値 / 値 = st.67 (lpoke/lpeek も可)
; DedicatedVideoMemory : UINT_PTR (+272, 8byte) qpoke st,272,値 / qpeek(st,272) ※IronHSPのみ。3.7/3.8は lpoke st,272,下位 : lpoke st,276,上位
; DedicatedSystemMemory : UINT_PTR (+280, 8byte) qpoke st,280,値 / qpeek(st,280) ※IronHSPのみ。3.7/3.8は lpoke st,280,下位 : lpoke st,284,上位
; SharedSystemMemory : UINT_PTR (+288, 8byte) qpoke st,288,値 / qpeek(st,288) ※IronHSPのみ。3.7/3.8は lpoke st,288,下位 : lpoke st,292,上位
; AdapterLuid : LUID (+296, 8byte) varptr(st)+296 を基点に操作(8byte:入れ子/配列)
; Flags : DXGI_ADAPTER_FLAG3 (+304, 4byte) st.76 = 値 / 値 = st.76 (lpoke/lpeek も可)
; GraphicsPreemptionGranularity : DXGI_GRAPHICS_PREEMPTION_GRANULARITY (+308, 4byte) st.77 = 値 / 値 = st.77 (lpoke/lpeek も可)
; ComputePreemptionGranularity : DXGI_COMPUTE_PREEMPTION_GRANULARITY (+312, 4byte) st.78 = 値 / 値 = st.78 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global LUID
#field int LowPart
#field int HighPart
#endstruct
#defstruct global DXGI_ADAPTER_DESC3
#field wchar Description 128
#field int VendorId
#field int DeviceId
#field int SubSysId
#field int Revision
#field intptr DedicatedVideoMemory
#field intptr DedicatedSystemMemory
#field intptr SharedSystemMemory
#field LUID AdapterLuid
#field int Flags
#field int GraphicsPreemptionGranularity
#field int ComputePreemptionGranularity
#endstruct
stdim st, DXGI_ADAPTER_DESC3 ; NSTRUCT 変数を確保
st->VendorId = 100
mes "VendorId=" + st->VendorId