Formato istruzione DCL

L'istruzione DCL dichiara i registri.

Formato

Pixel shader 2_0 e versioni successive.

Solo registro di stato sampler.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[26:0] Reserved. Impostare su 0x0.

[30:27] Set to D3DSAMPLER_TEXTURE_TYPE for 2D, cube, and so on.

[31] Set to 0x1.

token del parametro di destinazione

Indicates the register number and the register type as D3DSPR_SAMPLER. Questi sono gli unici campi usati in questo token.

Solo registrazione di input o trama.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[30:0] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indica il numero del registro di input o trama. Il campo write-mask indica i componenti dichiarati.

Solo vertex shader 2_0 e versioni successive.

Solo registro di input.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[4:0] D3DDECLUSAGE value (that is, D3DDECLUSAGE_TEXCOORD, D3DDECLUSAGE_NORMAL, and so on).

[15:5] Reserved. Impostare su 0x0.

[19:16] Usage index value.

[30:20] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indicates the register number and the register type as D3DSPR_INPUT. Il campo write-mask indica i componenti dichiarati.

Pixel shader 3_0 e versioni successive.

Solo registro trame.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[4:0] D3DDECLUSAGE value (must be D3DDECLUSAGE_TEXCOORD or D3DDECLUSAGE_COLOR).

[15:5] Reserved. Impostare su 0x0.

[19:16] Usage index value. Per D3DDECLUSAGE_TEXCOORD, deve essere 0-7. Per D3DDECLUSAGE_COLOR, deve essere 0.

[30:20] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indicates the register number and the register type as D3DSPR_TEXTURE. Il campo write-mask indica i componenti dichiarati.

Solo registro viso.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[30:0] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indica il registro del viso. Il campo write-mask deve essere pieno anche se non è usato. I campi result-modifier e shift-scale devono essere 0 (anche inutilizzati).

Solo registro di posizione.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[30:0] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indica il registro di posizione. Il campo write-mask indica i componenti dichiarati.

Solo vertex shader 3_0 e versioni successive.

Solo registro di output.

instruction token

Contains D3DSIO_DCL. DWORD token

Ha il formato di bit seguente:

[4:0] D3DDECLUSAGE value (that is, D3DDECLUSAGE_TEXCOORD, D3DDECLUSAGE_NORMAL, and so on).

[15:5] Reserved. Impostare su 0x0.

[19:16] Usage index value.

[30:20] Reserved. Impostare su 0x0.

[31] Set to 0x1.

token del parametro di destinazione

Indicates the register number and the register type as D3DSPR_OUTPUT. Il campo write-mask definisce i componenti scritti.

Si noti che diverse istruzioni DCL, che descrivono l'output, possono usare lo stesso offset del registro. Tuttavia, i componenti della maschera di scrittura per ogni istruzione DCL devono essere diversi. Ad esempio, il codice seguente è valido in un vertex shader 3_0 e versioni successive:

       DCL   o10.xy
       DCL   o10.zw

Le istruzioni DCL di output devono dichiarare tutti i registri scritti da un vertex shader 3_0 e versioni successive.

Fabbisogno

Disponibile in Windows Vista e versioni successive dei sistemi operativi Windows.