struktur D3D12_SHADER_DESC (d3d12shader.h)
Menjelaskan shader.
Sintaks
typedef struct _D3D12_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;
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology;
UINT GSMaxOutputVertexCount;
D3D_PRIMITIVE InputPrimitive;
UINT PatchConstantParameters;
UINT cGSInstanceCount;
UINT cControlPoints;
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive;
D3D_TESSELLATOR_PARTITIONING HSPartitioning;
D3D_TESSELLATOR_DOMAIN TessellatorDomain;
UINT cBarrierInstructions;
UINT cInterlockedInstructions;
UINT cTextureStoreInstructions;
} D3D12_SHADER_DESC;
Anggota
Version
Versi Shader, sebagai UINT yang dikodekan yang sesuai dengan model shader, seperti "ps_5_0". Versi menjelaskan jenis program, nomor versi utama, dan nomor versi minor. Jenis program adalah konstanta enumerasi D3D12_SHADER_VERSION_TYPE . Versi didekode dengan cara berikut:
- Jenis program = (Versi & 0xFFFF0000) >> 16
- Versi utama = (Versi & 0x000000F0) >> 4
- Versi minor = (Versi & 0x0000000F)
Creator
Nama penentu shader.
Flags
Bendera kompilasi/penguraian shader.
ConstantBuffers
Jumlah buffer shader-constant.
BoundResources
Jumlah sumber daya (tekstur dan buffer) yang terikat ke shader.
InputParameters
Jumlah parameter dalam tanda tangan input.
OutputParameters
Jumlah parameter dalam tanda tangan output.
InstructionCount
Jumlah instruksi bahasa perantara dalam shader yang dikompilasi.
TempRegisterCount
Jumlah register sementara dalam shader yang dikompilasi.
TempArrayCount
Jumlah array sementara yang digunakan.
DefCount
Jumlah definisi konstanta.
DclCount
Jumlah deklarasi (input + output).
TextureNormalInstructions
Jumlah instruksi tekstur yang tidak dikategorikan.
TextureLoadInstructions
Jumlah instruksi pemuatan tekstur
TextureCompInstructions
Jumlah instruksi perbandingan tekstur
TextureBiasInstructions
Jumlah instruksi bias tekstur
TextureGradientInstructions
Jumlah instruksi gradien tekstur.
FloatInstructionCount
Jumlah instruksi aritmatika titik mengambang yang digunakan.
IntInstructionCount
Jumlah instruksi aritmatika bilangan bulat yang ditandatangani yang digunakan.
UintInstructionCount
Jumlah instruksi aritmatika bilangan bulat yang tidak ditandatangani yang digunakan.
StaticFlowControlCount
Jumlah instruksi kontrol aliran statis yang digunakan.
DynamicFlowControlCount
Jumlah instruksi kontrol alur dinamis yang digunakan.
MacroInstructionCount
Jumlah instruksi makro yang digunakan.
ArrayInstructionCount
Jumlah instruksi array yang digunakan.
CutInstructionCount
Jumlah instruksi potong yang digunakan.
EmitInstructionCount
Jumlah instruksi memancarkan yang digunakan.
GSOutputTopology
Nilai yang diketik D3D_PRIMITIVE_TOPOLOGY yang mewakili topologi output shader geometri.
GSMaxOutputVertexCount
Geometri memecah jumlah puncak output maksimum.
InputPrimitive
Nilai yang diketik D3D_PRIMITIVE yang mewakili primitif input untuk shader geometri atau shader lambung.
PatchConstantParameters
Jumlah parameter dalam tanda tangan konstanta patch.
cGSInstanceCount
Jumlah instans shader geometri.
cControlPoints
Jumlah titik kontrol dalam shader lambung dan shader domain.
HSOutputPrimitive
Nilai D3D_TESSELLATOR_OUTPUT_PRIMITIVE-typed yang mewakili jenis output-primitif tessellator.
HSPartitioning
Nilai D3D_TESSELLATOR_PARTITIONING-typed yang mewakili mode partisi tessellator.
TessellatorDomain
Nilai D3D_TESSELLATOR_DOMAIN-typed yang mewakili domain tessellator.
cBarrierInstructions
Jumlah instruksi penghambat dalam shader komputasi.
cInterlockedInstructions
Jumlah instruksi yang saling terkait dalam shader komputasi.
cTextureStoreInstructions
Jumlah penulisan tekstur dalam shader komputasi.
Keterangan
Shader ditulis dalam HLSL dan dikompilasi ke dalam bahasa perantara oleh pengkompilasi HLSL. Deskripsi shader mengembalikan informasi tentang shader yang dikompilasi. Untuk mendapatkan deskripsi shader, panggil ID3D12ShaderReflection::GetDesc.
Persyaratan
Persyaratan | Nilai |
---|---|
Header | d3d12shader.h |
Lihat juga
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk