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

D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY

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

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

フィールド

フィールドサイズx64x86説明
CommandListTypeD3D12_COMMAND_LIST_TYPE4+0+0問い合わせるコマンドリストの種別。入力値。
PriorityDWORD4+4+4問い合わせる優先度値。入力値。
PriorityForTypeIsSupportedBOOL4+8+8指定種別でその優先度が利用可能か。出力値。

各言語での定義

#include <windows.h>

// D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY  (x64 12 / x86 12 バイト)
typedef struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY {
    D3D12_COMMAND_LIST_TYPE CommandListType;
    DWORD Priority;
    BOOL PriorityForTypeIsSupported;
} D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
{
    public int CommandListType;
    public uint Priority;
    [MarshalAs(UnmanagedType.Bool)] public bool PriorityForTypeIsSupported;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
    Public CommandListType As Integer
    Public Priority As UInteger
    <MarshalAs(UnmanagedType.Bool)> Public PriorityForTypeIsSupported As Boolean
End Structure
import ctypes
from ctypes import wintypes

class D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY(ctypes.Structure):
    _fields_ = [
        ("CommandListType", ctypes.c_int),
        ("Priority", wintypes.DWORD),
        ("PriorityForTypeIsSupported", wintypes.BOOL),
    ]
#[repr(C)]
pub struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY {
    pub CommandListType: i32,
    pub Priority: u32,
    pub PriorityForTypeIsSupported: i32,
}
import "golang.org/x/sys/windows"

type D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY struct {
	CommandListType int32
	Priority uint32
	PriorityForTypeIsSupported int32
}
type
  D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY = record
    CommandListType: Integer;
    Priority: DWORD;
    PriorityForTypeIsSupported: BOOL;
  end;
const D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY = extern struct {
    CommandListType: i32,
    Priority: u32,
    PriorityForTypeIsSupported: i32,
};
type
  D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY {.bycopy.} = object
    CommandListType: int32
    Priority: uint32
    PriorityForTypeIsSupported: int32
struct D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
{
    int CommandListType;
    uint Priority;
    int PriorityForTypeIsSupported;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY サイズ: 12 バイト(x64)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; CommandListType : D3D12_COMMAND_LIST_TYPE (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Priority : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; PriorityForTypeIsSupported : BOOL (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_COMMAND_QUEUE_PRIORITY
    #field int CommandListType
    #field int Priority
    #field bool PriorityForTypeIsSupported
#endstruct

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