GPU Registers...

hi All,

I was wondering if modern GPUs have registers like CPUs do?

Of course! You can even control some of them explicity with extensions such as Register combiners or vertex and fragment programs.

– Zeno

[This message has been edited by Zeno (edited 03-11-2003).]

if that is the case, where is it documented?
For eg, for Geforce2 what are the register names and how can we use them, etc?

The source for all nvidia OpenGL extension specs:

http://developer.nvidia.com/view.asp?IO=nvidia_opengl_specs

Register names are arbitrary. On modern X86 processors, there are far more “registers” than there are names.

Anyway, you want to look at the specifications for NV_register_combiners and ARB_fragment_program and ARB_vertex_program and so on. Programming GPUs is similar in some ways to CPUs, but also quite different in others.

Isn’t register combiners specific to nv30+ and R300+ GPUs?

What i mean is don’t other GPUs (like Geforce2 for example) have registers built into them?

register combiners are for GeForce256 and up (GeForce 1, 2/MX, 3, 4/MX, NV30), fragment programs are R300/NV30 and up.

What i mean is don’t other GPUs (like Geforce2 for example) have registers built into them?

Plus, don’t make the mistake of thinking that just because you can’t access registers on a particular card that they aren’t there. All GPUs have “registers built into them”. That doesn’t necessarily mean that there are “registers you as a programmer can read and write to”.

– Zeno

Plus, don’t make the mistake of thinking that just because you can’t access registers on a particular card that they aren’t there. All GPUs have “registers built into them”. That doesn’t necessarily mean that there are “registers you as a programmer can read and write to”.

Where can I get details of these registers?

Originally posted by GT5:
Where can I get details of these registers?

I don’t think you read what he said there. If these registers can not be accessed directly by the programmer then you wont be able to get any details on them. It makes sence, why would you need details to something you can’t use?

-SirKnight

I don’t think you read what he said there. If these registers can not be accessed directly by the programmer then you wont be able to get any details on them. It makes sence, why would you need details to something you can’t use?

Who said anything about trying to access them? I am curious about how many registers a GPU might have.

a gpu is not like a cpu. it’s split up in tons of parts, and every part is different on every architecture, they can have registers in everywhere to store some intermediate values… in the vertexshaders, in the rastericer unit, in the pixelshading parts, the blending unit, depthtesting parts, who knows? who cares?

its not a cpu, it does not need registers like a cpu. it does not have registers like a cpu. its a pipeline.

Originally posted by GT5:
Who said anything about trying to access them? I am curious about how many registers a GPU might have.

I didn’t say you wanted to directly access them. Im saying from what he said it should have been obvious that you wont be able to get details like you ask for. I found that obvious anyway. But like dave said, a GPU is a lot different than a cpu because it’s a pipeline architecture. Any exact details of the hardware are only known and should only be known by the driver writers. All the application programmers need to know is how to use an API to access some feature the cards can do no matter how the gpu actually performs the operations and it’s details on the actual hardware. Maybe if the gpu was not a pipeline architecture and more like a cpu then it would be nice to know the details on the registers and stuff like we do for cpus. The only details we need to know is what D3D and/or OpenGL tells us.

-SirKnight

It’s well documented in the nVIDIA OpenGL extensions document. For example, the parameter registers, temporary registers, and vertex attribute registers for the GeForce 3 and GeForce 4 are documented in the NV_vertex_program extension documentation (downloadable from the nVIDIA site). Similarly, ATI has such documentation for the R8500.

With the newest generation (9500+ and GFFX+) the registers and assembly-like code are all standardized, and you give symbolic names to them; there’s still an upper limit to the number you can use.

Note that the registers don’t have exciting names; they’re called something like “r0” through “r95”. Good enough :slight_smile:

Hi,

You might be interrested in watching out the sources from xFree86. the direct rendering interface, which is a 3d accelerator api, has opensource drivers for first generation ATI radeons (R100). watching through the headers, i figured out the r100 had between 1000 and 2000 registers built in the board. so you might be able to access registers directly on this video card, but i doubt you would be able to do anything with them without a decent 3d api, like direct3d or opengl.

however, i didn’t even want to imagine how many register the ati r200 r300 and up have… we canot assume the cards are compatible in any way between themselves furthemore.

Originally posted by jwatte:
With the newest generation (9500+ and GFFX+) the registers and assembly-like code are all standardized, and you give symbolic names to them; there’s still an upper limit to the number you can use.

just remember that nobody defines that they are really hardware registers… they are just named registers in the extensionspec. each pixelpipeline for example has its own set of registers for some specific task. if at all registers (i can think of a register-combiner implementation with only flow control, but no registers… would get the same interface…)

there are no general purpose registers, not even special purpose registers. there are places some part of some pipeline can store some data. if you wanna call this register, okay…

for example the rastericer is just a black box for all of us.

Hey fellas , almost everything in your computer have registers
They are like some real fast RAM memory… ( this is a very poor , and very generic speficication of a register …but as the name statements …they are used to register some data …)
Try coding some MIPS ( mips assembly language is way cool , and very similar to video cards programmable pipelines …because it´s a processor that …hmm …intends to be highly pipelinized ) or x86 assembly language and u´ll catch up easily what are those bunch of registers for