Win32 API 日本語リファレンス
ホームGraphics.Direct3D11 › D3D11_FEATURE_DATA_D3D11_OPTIONS

D3D11_FEATURE_DATA_D3D11_OPTIONS

構造体
サイズx64: 56 バイト / x86: 56 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
OutputMergerLogicOpBOOL4+0+0出力マージ段での論理演算をサポートするか。TRUEで対応。
UAVOnlyRenderingForcedSampleCountBOOL4+4+4UAVのみのレンダリングで強制サンプル数を使用できるか。TRUEで対応。
DiscardAPIsSeenByDriverBOOL4+8+8DiscardResource/DiscardView系APIがドライバーに伝達されるか。TRUEで対応。
FlagsForUpdateAndCopySeenByDriverBOOL4+12+12更新・コピー操作のフラグがドライバーに伝達されるか。TRUEで対応。
ClearViewBOOL4+16+16ClearViewによるビューのクリアをサポートするか。TRUEで対応。
CopyWithOverlapBOOL4+20+20コピー元と先が重複するコピー操作をサポートするか。TRUEで対応。
ConstantBufferPartialUpdateBOOL4+24+24定数バッファの部分更新をサポートするか。TRUEで対応。
ConstantBufferOffsettingBOOL4+28+28定数バッファのオフセット指定をサポートするか。TRUEで対応。
MapNoOverwriteOnDynamicConstantBufferBOOL4+32+32動的定数バッファへのMAP_NO_OVERWRITEマップをサポートするか。TRUEで対応。
MapNoOverwriteOnDynamicBufferSRVBOOL4+36+36動的バッファSRVへのMAP_NO_OVERWRITEマップをサポートするか。TRUEで対応。
MultisampleRTVWithForcedSampleCountOneBOOL4+40+40強制サンプル数1のマルチサンプルRTVをサポートするか。TRUEで対応。
SAD4ShaderInstructionsBOOL4+44+44sad4系シェーダー命令をサポートするか。TRUEで対応。
ExtendedDoublesShaderInstructionsBOOL4+48+48倍精度拡張シェーダー命令をサポートするか。TRUEで対応。
ExtendedResourceSharingBOOL4+52+52拡張リソース共有をサポートするか。TRUEで対応。

各言語での定義

#include <windows.h>

// D3D11_FEATURE_DATA_D3D11_OPTIONS  (x64 56 / x86 56 バイト)
typedef struct D3D11_FEATURE_DATA_D3D11_OPTIONS {
    BOOL OutputMergerLogicOp;
    BOOL UAVOnlyRenderingForcedSampleCount;
    BOOL DiscardAPIsSeenByDriver;
    BOOL FlagsForUpdateAndCopySeenByDriver;
    BOOL ClearView;
    BOOL CopyWithOverlap;
    BOOL ConstantBufferPartialUpdate;
    BOOL ConstantBufferOffsetting;
    BOOL MapNoOverwriteOnDynamicConstantBuffer;
    BOOL MapNoOverwriteOnDynamicBufferSRV;
    BOOL MultisampleRTVWithForcedSampleCountOne;
    BOOL SAD4ShaderInstructions;
    BOOL ExtendedDoublesShaderInstructions;
    BOOL ExtendedResourceSharing;
} D3D11_FEATURE_DATA_D3D11_OPTIONS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_FEATURE_DATA_D3D11_OPTIONS
{
    [MarshalAs(UnmanagedType.Bool)] public bool OutputMergerLogicOp;
    [MarshalAs(UnmanagedType.Bool)] public bool UAVOnlyRenderingForcedSampleCount;
    [MarshalAs(UnmanagedType.Bool)] public bool DiscardAPIsSeenByDriver;
    [MarshalAs(UnmanagedType.Bool)] public bool FlagsForUpdateAndCopySeenByDriver;
    [MarshalAs(UnmanagedType.Bool)] public bool ClearView;
    [MarshalAs(UnmanagedType.Bool)] public bool CopyWithOverlap;
    [MarshalAs(UnmanagedType.Bool)] public bool ConstantBufferPartialUpdate;
    [MarshalAs(UnmanagedType.Bool)] public bool ConstantBufferOffsetting;
    [MarshalAs(UnmanagedType.Bool)] public bool MapNoOverwriteOnDynamicConstantBuffer;
    [MarshalAs(UnmanagedType.Bool)] public bool MapNoOverwriteOnDynamicBufferSRV;
    [MarshalAs(UnmanagedType.Bool)] public bool MultisampleRTVWithForcedSampleCountOne;
    [MarshalAs(UnmanagedType.Bool)] public bool SAD4ShaderInstructions;
    [MarshalAs(UnmanagedType.Bool)] public bool ExtendedDoublesShaderInstructions;
    [MarshalAs(UnmanagedType.Bool)] public bool ExtendedResourceSharing;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_FEATURE_DATA_D3D11_OPTIONS
    <MarshalAs(UnmanagedType.Bool)> Public OutputMergerLogicOp As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public UAVOnlyRenderingForcedSampleCount As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public DiscardAPIsSeenByDriver As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public FlagsForUpdateAndCopySeenByDriver As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ClearView As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public CopyWithOverlap As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ConstantBufferPartialUpdate As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ConstantBufferOffsetting As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public MapNoOverwriteOnDynamicConstantBuffer As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public MapNoOverwriteOnDynamicBufferSRV As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public MultisampleRTVWithForcedSampleCountOne As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public SAD4ShaderInstructions As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ExtendedDoublesShaderInstructions As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public ExtendedResourceSharing As Boolean
End Structure
import ctypes
from ctypes import wintypes

class D3D11_FEATURE_DATA_D3D11_OPTIONS(ctypes.Structure):
    _fields_ = [
        ("OutputMergerLogicOp", wintypes.BOOL),
        ("UAVOnlyRenderingForcedSampleCount", wintypes.BOOL),
        ("DiscardAPIsSeenByDriver", wintypes.BOOL),
        ("FlagsForUpdateAndCopySeenByDriver", wintypes.BOOL),
        ("ClearView", wintypes.BOOL),
        ("CopyWithOverlap", wintypes.BOOL),
        ("ConstantBufferPartialUpdate", wintypes.BOOL),
        ("ConstantBufferOffsetting", wintypes.BOOL),
        ("MapNoOverwriteOnDynamicConstantBuffer", wintypes.BOOL),
        ("MapNoOverwriteOnDynamicBufferSRV", wintypes.BOOL),
        ("MultisampleRTVWithForcedSampleCountOne", wintypes.BOOL),
        ("SAD4ShaderInstructions", wintypes.BOOL),
        ("ExtendedDoublesShaderInstructions", wintypes.BOOL),
        ("ExtendedResourceSharing", wintypes.BOOL),
    ]
#[repr(C)]
pub struct D3D11_FEATURE_DATA_D3D11_OPTIONS {
    pub OutputMergerLogicOp: i32,
    pub UAVOnlyRenderingForcedSampleCount: i32,
    pub DiscardAPIsSeenByDriver: i32,
    pub FlagsForUpdateAndCopySeenByDriver: i32,
    pub ClearView: i32,
    pub CopyWithOverlap: i32,
    pub ConstantBufferPartialUpdate: i32,
    pub ConstantBufferOffsetting: i32,
    pub MapNoOverwriteOnDynamicConstantBuffer: i32,
    pub MapNoOverwriteOnDynamicBufferSRV: i32,
    pub MultisampleRTVWithForcedSampleCountOne: i32,
    pub SAD4ShaderInstructions: i32,
    pub ExtendedDoublesShaderInstructions: i32,
    pub ExtendedResourceSharing: i32,
}
import "golang.org/x/sys/windows"

type D3D11_FEATURE_DATA_D3D11_OPTIONS struct {
	OutputMergerLogicOp int32
	UAVOnlyRenderingForcedSampleCount int32
	DiscardAPIsSeenByDriver int32
	FlagsForUpdateAndCopySeenByDriver int32
	ClearView int32
	CopyWithOverlap int32
	ConstantBufferPartialUpdate int32
	ConstantBufferOffsetting int32
	MapNoOverwriteOnDynamicConstantBuffer int32
	MapNoOverwriteOnDynamicBufferSRV int32
	MultisampleRTVWithForcedSampleCountOne int32
	SAD4ShaderInstructions int32
	ExtendedDoublesShaderInstructions int32
	ExtendedResourceSharing int32
}
type
  D3D11_FEATURE_DATA_D3D11_OPTIONS = record
    OutputMergerLogicOp: BOOL;
    UAVOnlyRenderingForcedSampleCount: BOOL;
    DiscardAPIsSeenByDriver: BOOL;
    FlagsForUpdateAndCopySeenByDriver: BOOL;
    ClearView: BOOL;
    CopyWithOverlap: BOOL;
    ConstantBufferPartialUpdate: BOOL;
    ConstantBufferOffsetting: BOOL;
    MapNoOverwriteOnDynamicConstantBuffer: BOOL;
    MapNoOverwriteOnDynamicBufferSRV: BOOL;
    MultisampleRTVWithForcedSampleCountOne: BOOL;
    SAD4ShaderInstructions: BOOL;
    ExtendedDoublesShaderInstructions: BOOL;
    ExtendedResourceSharing: BOOL;
  end;
const D3D11_FEATURE_DATA_D3D11_OPTIONS = extern struct {
    OutputMergerLogicOp: i32,
    UAVOnlyRenderingForcedSampleCount: i32,
    DiscardAPIsSeenByDriver: i32,
    FlagsForUpdateAndCopySeenByDriver: i32,
    ClearView: i32,
    CopyWithOverlap: i32,
    ConstantBufferPartialUpdate: i32,
    ConstantBufferOffsetting: i32,
    MapNoOverwriteOnDynamicConstantBuffer: i32,
    MapNoOverwriteOnDynamicBufferSRV: i32,
    MultisampleRTVWithForcedSampleCountOne: i32,
    SAD4ShaderInstructions: i32,
    ExtendedDoublesShaderInstructions: i32,
    ExtendedResourceSharing: i32,
};
type
  D3D11_FEATURE_DATA_D3D11_OPTIONS {.bycopy.} = object
    OutputMergerLogicOp: int32
    UAVOnlyRenderingForcedSampleCount: int32
    DiscardAPIsSeenByDriver: int32
    FlagsForUpdateAndCopySeenByDriver: int32
    ClearView: int32
    CopyWithOverlap: int32
    ConstantBufferPartialUpdate: int32
    ConstantBufferOffsetting: int32
    MapNoOverwriteOnDynamicConstantBuffer: int32
    MapNoOverwriteOnDynamicBufferSRV: int32
    MultisampleRTVWithForcedSampleCountOne: int32
    SAD4ShaderInstructions: int32
    ExtendedDoublesShaderInstructions: int32
    ExtendedResourceSharing: int32
struct D3D11_FEATURE_DATA_D3D11_OPTIONS
{
    int OutputMergerLogicOp;
    int UAVOnlyRenderingForcedSampleCount;
    int DiscardAPIsSeenByDriver;
    int FlagsForUpdateAndCopySeenByDriver;
    int ClearView;
    int CopyWithOverlap;
    int ConstantBufferPartialUpdate;
    int ConstantBufferOffsetting;
    int MapNoOverwriteOnDynamicConstantBuffer;
    int MapNoOverwriteOnDynamicBufferSRV;
    int MultisampleRTVWithForcedSampleCountOne;
    int SAD4ShaderInstructions;
    int ExtendedDoublesShaderInstructions;
    int ExtendedResourceSharing;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_FEATURE_DATA_D3D11_OPTIONS サイズ: 56 バイト(x64)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; OutputMergerLogicOp : BOOL (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; UAVOnlyRenderingForcedSampleCount : BOOL (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; DiscardAPIsSeenByDriver : BOOL (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; FlagsForUpdateAndCopySeenByDriver : BOOL (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ClearView : BOOL (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; CopyWithOverlap : BOOL (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ConstantBufferPartialUpdate : BOOL (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ConstantBufferOffsetting : BOOL (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; MapNoOverwriteOnDynamicConstantBuffer : BOOL (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; MapNoOverwriteOnDynamicBufferSRV : BOOL (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; MultisampleRTVWithForcedSampleCountOne : BOOL (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; SAD4ShaderInstructions : BOOL (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; ExtendedDoublesShaderInstructions : BOOL (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; ExtendedResourceSharing : BOOL (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_FEATURE_DATA_D3D11_OPTIONS
    #field bool OutputMergerLogicOp
    #field bool UAVOnlyRenderingForcedSampleCount
    #field bool DiscardAPIsSeenByDriver
    #field bool FlagsForUpdateAndCopySeenByDriver
    #field bool ClearView
    #field bool CopyWithOverlap
    #field bool ConstantBufferPartialUpdate
    #field bool ConstantBufferOffsetting
    #field bool MapNoOverwriteOnDynamicConstantBuffer
    #field bool MapNoOverwriteOnDynamicBufferSRV
    #field bool MultisampleRTVWithForcedSampleCountOne
    #field bool SAD4ShaderInstructions
    #field bool ExtendedDoublesShaderInstructions
    #field bool ExtendedResourceSharing
#endstruct

stdim st, D3D11_FEATURE_DATA_D3D11_OPTIONS        ; NSTRUCT 変数を確保
st->OutputMergerLogicOp = 100
mes "OutputMergerLogicOp=" + st->OutputMergerLogicOp