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

D3D10_QUERY_DATA_PIPELINE_STATISTICS

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

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

フィールド

フィールドサイズx64x86説明
IAVerticesULONGLONG8+0+0入力アセンブラーによって読み取られた頂点の数です。
IAPrimitivesULONGLONG8+8+8入力アセンブラーによって読み取られたプリミティブの数です。この数は、使用するプリミティブトポロジーによって異なる場合があります。たとえば、6 個の頂点を持つトライアングルストリップは 4 個の三角形を生成しますが、6 個の頂点を持つトライアングルリストは 2 個の三角形を生成します。
VSInvocationsULONGLONG8+16+16頂点シェーダーが呼び出された回数です。Direct3D は頂点ごとに 1 回、頂点シェーダーを呼び出します。
GSInvocationsULONGLONG8+24+24ジオメトリシェーダーが呼び出された回数です。ジオメトリシェーダーが NULL に設定されている場合、この統計値が増加するかどうかはハードウェアメーカーによって異なります。
GSPrimitivesULONGLONG8+32+32ジオメトリシェーダーによって出力されたプリミティブの数です。
CInvocationsULONGLONG8+40+40ラスタライザーに送信されたプリミティブの数です。ラスタライザーが無効になっている場合、この値は増加しません。
CPrimitivesULONGLONG8+48+48レンダリングされたプリミティブの数です。プリミティブはクリッピングされた後に複数のプリミティブに分割されたり、完全にカリングされたりすることがあるため、この値は CInvocations より大きくなることも小さくなることもあります。
PSInvocationsULONGLONG8+56+56ピクセルシェーダーが呼び出された回数です。

公式ドキュメント

ID3D10Asynchronous::BeginID3D10Asynchronous::End の呼び出しの間に発生したグラフィックスパイプラインの動作に関する情報を照会します。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// D3D10_QUERY_DATA_PIPELINE_STATISTICS  (x64 64 / x86 64 バイト)
typedef struct D3D10_QUERY_DATA_PIPELINE_STATISTICS {
    ULONGLONG IAVertices;
    ULONGLONG IAPrimitives;
    ULONGLONG VSInvocations;
    ULONGLONG GSInvocations;
    ULONGLONG GSPrimitives;
    ULONGLONG CInvocations;
    ULONGLONG CPrimitives;
    ULONGLONG PSInvocations;
} D3D10_QUERY_DATA_PIPELINE_STATISTICS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D10_QUERY_DATA_PIPELINE_STATISTICS
{
    public ulong IAVertices;
    public ulong IAPrimitives;
    public ulong VSInvocations;
    public ulong GSInvocations;
    public ulong GSPrimitives;
    public ulong CInvocations;
    public ulong CPrimitives;
    public ulong PSInvocations;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D10_QUERY_DATA_PIPELINE_STATISTICS
    Public IAVertices As ULong
    Public IAPrimitives As ULong
    Public VSInvocations As ULong
    Public GSInvocations As ULong
    Public GSPrimitives As ULong
    Public CInvocations As ULong
    Public CPrimitives As ULong
    Public PSInvocations As ULong
End Structure
import ctypes
from ctypes import wintypes

class D3D10_QUERY_DATA_PIPELINE_STATISTICS(ctypes.Structure):
    _fields_ = [
        ("IAVertices", ctypes.c_ulonglong),
        ("IAPrimitives", ctypes.c_ulonglong),
        ("VSInvocations", ctypes.c_ulonglong),
        ("GSInvocations", ctypes.c_ulonglong),
        ("GSPrimitives", ctypes.c_ulonglong),
        ("CInvocations", ctypes.c_ulonglong),
        ("CPrimitives", ctypes.c_ulonglong),
        ("PSInvocations", ctypes.c_ulonglong),
    ]
#[repr(C)]
pub struct D3D10_QUERY_DATA_PIPELINE_STATISTICS {
    pub IAVertices: u64,
    pub IAPrimitives: u64,
    pub VSInvocations: u64,
    pub GSInvocations: u64,
    pub GSPrimitives: u64,
    pub CInvocations: u64,
    pub CPrimitives: u64,
    pub PSInvocations: u64,
}
import "golang.org/x/sys/windows"

type D3D10_QUERY_DATA_PIPELINE_STATISTICS struct {
	IAVertices uint64
	IAPrimitives uint64
	VSInvocations uint64
	GSInvocations uint64
	GSPrimitives uint64
	CInvocations uint64
	CPrimitives uint64
	PSInvocations uint64
}
type
  D3D10_QUERY_DATA_PIPELINE_STATISTICS = record
    IAVertices: UInt64;
    IAPrimitives: UInt64;
    VSInvocations: UInt64;
    GSInvocations: UInt64;
    GSPrimitives: UInt64;
    CInvocations: UInt64;
    CPrimitives: UInt64;
    PSInvocations: UInt64;
  end;
const D3D10_QUERY_DATA_PIPELINE_STATISTICS = extern struct {
    IAVertices: u64,
    IAPrimitives: u64,
    VSInvocations: u64,
    GSInvocations: u64,
    GSPrimitives: u64,
    CInvocations: u64,
    CPrimitives: u64,
    PSInvocations: u64,
};
type
  D3D10_QUERY_DATA_PIPELINE_STATISTICS {.bycopy.} = object
    IAVertices: uint64
    IAPrimitives: uint64
    VSInvocations: uint64
    GSInvocations: uint64
    GSPrimitives: uint64
    CInvocations: uint64
    CPrimitives: uint64
    PSInvocations: uint64
struct D3D10_QUERY_DATA_PIPELINE_STATISTICS
{
    ulong IAVertices;
    ulong IAPrimitives;
    ulong VSInvocations;
    ulong GSInvocations;
    ulong GSPrimitives;
    ulong CInvocations;
    ulong CPrimitives;
    ulong PSInvocations;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D10_QUERY_DATA_PIPELINE_STATISTICS サイズ: 64 バイト(x64)
dim st, 16    ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; IAVertices : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; IAPrimitives : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; VSInvocations : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; GSInvocations : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; GSPrimitives : ULONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; CInvocations : ULONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; CPrimitives : ULONGLONG (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; PSInvocations : ULONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D10_QUERY_DATA_PIPELINE_STATISTICS
    #field int64 IAVertices
    #field int64 IAPrimitives
    #field int64 VSInvocations
    #field int64 GSInvocations
    #field int64 GSPrimitives
    #field int64 CInvocations
    #field int64 CPrimitives
    #field int64 PSInvocations
#endstruct

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