A programmable pixel shader is made up of a set of instructions that operate on pixel data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
Instructions - ps_3_0 contains a list of the available instructions.
Registers - ps_3_0 lists the different types of registers used by the vertex shader arithmetic logic unit (ALU).
InstructionModifiers are used to modify the way an instruction works.
Masking determines what components of the destination register get written.
SourceModifiers alter the source register data before the instruction runs.
Swizzling gives additional control over which register components are read, copied or written.
New Features
Add a face register. Add a position register. Color registers (v#) are now fully floating point and the texture coordinate registers (t#) have been consolidated. Input declarations take the usage names, and multiple usages are permitted for components of a given register.
Dynamic Flow Control
The device supports dynamic flow control (if, break, and break_comp). The depth of nesting ranges from 0 to 24.
Number of Temporary Registers
The number of temporary registers supported is 32.
Static Flow Control Nesting Depth
The call/callnz/call_pred can be nested to a maximum depth of 4. Independently, loop/rep instructions can be nested to a maximum depth of 4.
Arbitrary Swizzle
Arbitrary swizzle is supported. See Arbitrary Swizzle.
Gradient Instructions
Gradient instructions are supported. See dsx, dsy, and texldd.
Predication
Instruction predication is supported. See Predicate.
Dependent Read Limit
There are no dependent read limits.
Texture Instruction Limit
There is no limit on texture instructions.
Instruction Count
Each pixel shader is allowed anywhere from 512 up to the number of slots in the MaxPixelShader30InstructionSlots member of D3DCAPS9 (not more than 32768). The number of instructions run can be much higher because of the looping support. The MaxPShaderInstructionsExecuted cap in D3DCAPS9 should be at least 2^16.
New Features:
Static flow control instructions: call, callnz, else, end, endif, endloop, endrep, if, label, loop, rep, ret
Static flow control nesting depth
Number of temporary registers
Dynamic flow control instructions: break, breakc, ifc
Predication: setp instruction, p# register
New registers: constant integer, constant Boolean, loop counter, predicate
New modifiers: arbitrary swizzle
A programmable vertex shader is made up of a set of instructions that operate on vertex data. Registers transfer data in and out of the ALU. Additional control can be applied to modify the instruction, the results, or what data gets written out.
Instructions - vs_3_0 contains a list of the available instructions.
Registers - vs_3_0 lists the different types of registers used by the vertex shader arithmetic logic unit (ALU).
InstructionModifiers are used to modify the way an instruction works.
Masking determines what components of the destination register get written.
SourceModifiers alter the source register data before the instruction runs.
Swizzling gives additional control over which register components are read, copied or written.
New Features
New features include the following:
Indexing Registers
In the earlier shader models, only the constant register bank could be indexed. In this model, the following register banks can be indexed, using the loop counter register (aL).
Input register (v#)
Output register (o#)
Vertex Textures
This shader model supports texture lookup in the vertex shader using texldl. The vertex engine has four texture sampler stages (distinct from the displacement map sampler and the texture samplers in the pixel engine) that can be used to sample textures set at those stages. See Vertex Textures.
Vertex Stream Frequency
This feature allows a subset of the input registers to be initialized at a rate different from once per vertex. See Vertex Stream Frequency.
Shader Output
Similar to vs_2_0, the output of the shader can vary with static flow control. Be careful with dynamic branching as this can cause shader outputs to vary per vertex. This will produce unpredictable results on different hardware.
Dynamic Flow Control
Dynamic flow control instructions are supported. The depth values allowed is a maximum of 24.
Static Flow Control Nesting Depth
Static flow control instructions are supported. The depth value allowed is a maximum of 4.
Instruction Count
Each vertex shader is allowed anywhere from 512 up to the number of slots in the MaxVertexShader30InstructionSlots member of D3DCAPS9. The number of instructions run can be much higher because of the looping support. The MaxVShaderInstructionsExecuted cap in D3DCAPS9 should be at least 2^16.
New features:
Static flow control nesting depth
Dynamic flow control instructions - break, breakc, ifc
Predication - setp instruction, p# register
Number of temporary registers
Indexing registers
Vertex textures - texld texture address instruction
Vertex stream frequency
Apparently that is official.elroy said:Am I right in assuming that DX10 isn't scheduled to be released until the release of Longhorn (i.e. 2005)?
These two are the "rumors", and good ones at that.I thought it was going to include a unified PS/VS model, and PPP support.
Well, technically speaking, there isn't even hardware supporting 3_0However, because support of DX10 is so far off, wouldn't it be better concentrating on the implementation of PS/VS 3.0?
Zeross said:What's PPP please
Another damn acronym I hate them
Edit : isn't that Primitive Processor thing by chance ?
Zeross said:Edit : isn't that Primitive Processor thing by chance ? Damn it lacks a P
Heathen said:So what benefits would a primitive processor bring?
It will be able to delete, create triangles. So stuff like LOD can be moved to GPU and high order surfaces can be made programmable (and actually useful).Heathen said:So what benefits would a primitive processor bring?