共用方式為


D3D10_SHADER_DESC 結構 (d3d10shader.h)

描述著色器。

語法

typedef struct _D3D10_SHADER_DESC {
  UINT                     Version;
  LPCSTR                   Creator;
  UINT                     Flags;
  UINT                     ConstantBuffers;
  UINT                     BoundResources;
  UINT                     InputParameters;
  UINT                     OutputParameters;
  UINT                     InstructionCount;
  UINT                     TempRegisterCount;
  UINT                     TempArrayCount;
  UINT                     DefCount;
  UINT                     DclCount;
  UINT                     TextureNormalInstructions;
  UINT                     TextureLoadInstructions;
  UINT                     TextureCompInstructions;
  UINT                     TextureBiasInstructions;
  UINT                     TextureGradientInstructions;
  UINT                     FloatInstructionCount;
  UINT                     IntInstructionCount;
  UINT                     UintInstructionCount;
  UINT                     StaticFlowControlCount;
  UINT                     DynamicFlowControlCount;
  UINT                     MacroInstructionCount;
  UINT                     ArrayInstructionCount;
  UINT                     CutInstructionCount;
  UINT                     EmitInstructionCount;
  D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology;
  UINT                     GSMaxOutputVertexCount;
} D3D10_SHADER_DESC;

成員

Version

類型: UINT

著色器版本。

Creator

類型: LPCSTR

著色器的原始程序名稱。

Flags

類型: UINT

著色器編譯/剖析旗標。

ConstantBuffers

類型: UINT

著色器常數緩衝區的數目。

BoundResources

類型: UINT

系結至著色器的資源 (紋理和緩衝區數目) 。

InputParameters

類型: UINT

輸入簽章中的參數數目。

OutputParameters

類型: UINT

輸出簽章中的參數數目。

InstructionCount

類型: UINT

編譯著色器中的中繼語言指令數目。

TempRegisterCount

類型: UINT

已編譯著色器中的暫存緩存器數目。

TempArrayCount

類型: UINT

使用的暫存陣列數目。

DefCount

類型: UINT

常數定義的數目。

DclCount

類型: UINT

輸入 + 輸出) (宣告數目。

TextureNormalInstructions

類型: UINT

非分類紋理指令的數目。

TextureLoadInstructions

類型: UINT

紋理載入指令的數目

TextureCompInstructions

類型: UINT

紋理比較指示的數目

TextureBiasInstructions

類型: UINT

紋理偏差指令的數目

TextureGradientInstructions

類型: UINT

紋理漸層指令的數目。

FloatInstructionCount

類型: UINT

使用的浮點算術指令數目。

IntInstructionCount

類型: UINT

使用的帶正負號整數算術指令數目。

UintInstructionCount

類型: UINT

使用的不帶正負號整數算術指令數目。

StaticFlowControlCount

類型: UINT

使用的靜態流程控制指令數目。

DynamicFlowControlCount

類型: UINT

使用的動態流程控制指令數目。

MacroInstructionCount

類型: UINT

使用的宏指令數目。

ArrayInstructionCount

類型: UINT

使用的陣列指令數目。

CutInstructionCount

類型: UINT

使用的剪下指令數目。

EmitInstructionCount

類型: UINT

使用的發出指令數目。

GSOutputTopology

類型: D3D10_PRIMITIVE_TOPOLOGY

幾何著色器輸出拓撲。

GSMaxOutputVertexCount

類型: UINT

幾何著色器最大輸出頂點計數。

備註

著色器是以 HLSL 撰寫,並由 HLSL 編譯程式編譯成中繼語言。 著色器描述會傳回已編譯著色器的相關信息。 呼叫 ID3D10ShaderReflection::GetDesc來取得著色器描述。

規格需求

需求
標頭 d3d10shader.h

另請參閱

著色器結構