Archived

This topic is now archived and is closed to further replies.

Exellon2000

Help w/ASM

Recommended Posts

Exellon2000    122
Hey everyone. I''m trying to find a tutorial or two or more on RISC-Assembly, which is what I''ve heard you have to learn to know how to use those shader things in D3D8. I know there is a book on it, but that I cannot afford. Thanks to anyone who can help!

Share this post


Link to post
Share on other sites
Dactylos    122
Just to clarify:
There''s not one single assembly language called "RISC-Assembly". RISC is a type of architecture (it means Reduced Instruction Set Computer). It''s the opposite of CISC (Complex Instruction Set Computer). It refers to the ''ideology'' used when designing the instruction set of a computer. CISC systems have a lot of instructions (many specialized for a particular purpose etc), while a RISC architecture use a few basic instructions, and those instructions are combined to create more complex expressions. (Perhaps not such a good description.)

When they say that the vertex/pixel shaders use a RISC assembly language, it simply means that they use an assembly language with relatively few instructions. Microsoft probably has some resource about the assembly language used for shaders at msdn.microsoft.com

(the x86 architecture would be a good example of CISC)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hi,

In fact, I don''t think that you will want to have any book about RISC assembly just for pixel-shader programming. The pixel- and vertex shader assembly language consists of just a few instructions. However, these instructions are a lot more specialized than those of a RISC processor. A book about RISC assembly will probably deal with topics you don''t care about, such as control structures (if, else, etc.), pipeline optimization, memory layout and data access, etc.

Jumps are a problem on RISC machines, as well as pipeline stalls, because RISC does never stall the pipeline Ok, I''m goning into useless detail here. good thing is: There are no jumps in a pixel- or vertex shader, which is a good thing (having an endless loop on you GPU isn''t nice, is it?)

Just look at www.nvidia.com Their developer section contains some papers about vertex and pixel shader programming. Also, you will find some useful information about how to ''simulate'' those missing instructions.

Share this post


Link to post
Share on other sites