D3D 渲染状态 API 调用开销表

在DXSDK里找到的,这个是一般情况下的调用开销,计算单位是 CPU Cycles,可以依据这个构建一张静态渲染状态开销表,根据这个标准来构建 shader tree 。

API Call

 

Average number of Cycles

SetVertexDeclaration 6500 – 11250
SetFVF 6400 – 11200
SetVertexShader 3000 – 12100
SetPixelShader 6300 – 7000
SPECULARENABLE 1900 – 11200
SetRenderTarget 6000 – 6250
SetPixelShaderConstant (1 Constant) 1500 – 9000
NORMALIZENORMALS 2200 – 8100
LightEnable 1300 – 9000
SetStreamSource 3700 – 5800
LIGHTING 1700 – 7500
DIFFUSEMATERIALSOURCE 900 – 8300
AMBIENTMATERIALSOURCE 900 – 8200
COLORVERTEX 800 – 7800
SetLight 2200 – 5100
SetTransform 3200 – 3750
SetIndices 900 – 5600
AMBIENT 1150 – 4800
SetTexture 2500 – 3100
SPECULARMATERIALSOURCE 900 – 4600
EMISSIVEMATERIALSOURCE 900 – 4500
SetMaterial 1000 – 3700
ZENABLE 700 – 3900
WRAP0 1600 – 2700
MINFILTER 1700 – 2500
MAGFILTER 1700 – 2400
SetVertexShaderConstant (1 Constant) 1000 – 2700
COLOROP 1500 – 2100
COLORARG2 1300 – 2000
COLORARG1 1300 – 1980
CULLMODE 500 – 2570
CLIPPING 500 – 2550
DrawIndexedPrimitive 1200 – 1400
ADDRESSV 1090 – 1500
ADDRESSU 1070 – 1500
DrawPrimitive 1050 – 1150
SRGBTEXTURE 150 – 1500
STENCILMASK 570 – 700
STENCILZFAIL 500 – 800
STENCILREF 550 – 700
ALPHABLENDENABLE 550 – 700
STENCILFUNC 560 – 680
STENCILWRITEMASK 520 – 700
STENCILFAIL 500 – 750
ZFUNC 510 – 700
ZWRITEENABLE 520 – 680
STENCILENABLE 540 – 650
STENCILPASS 560 – 630
SRCBLEND 500 – 685
TWOSIDEDSTENCILMODE 450 – 590
ALPHATESTENABLE 470 – 525
ALPHAREF 460 – 530
ALPHAFUNC 450 – 540
DESTBLEND 475 – 510
COLORWRITEENABLE 465 – 515
CCW_STENCILFAIL 340 – 560
CCW_STENCILPASS 340 – 545
CCW_STENCILZFAIL 330 – 495
SCISSORTESTENABLE 375 – 440
CCW_STENCILFUNC 250 – 480
SetScissorRect 150 – 340
Advertisements
此条目发表在3D图形分类目录。将固定链接加入收藏夹。

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

w

Connecting to %s