On Mon, 26 Apr 2004 23:32:58 -0400 (EDT)
Vladimir Dergachev <[EMAIL PROTECTED]> wrote:

> 
> Well, I dug a bit deeper into writing R300 driver (using R200 one to
> start with) and I have more questions:
> 
>   1. What does rmesa->TclFallback do and how should I activate it ?
> 
>   2. What is "state" ? More specifically:

I think I can answer some of these state-related questions after my
experience with porting the savage driver to Savage3D-based chips.

> 
>         A) I noticed that state holds contents of a lot of registers,
>            most of which are not present in R300.
> 
>            Is there a safe and easy way to to remove their usage ?

There is no simple way. It could be the most important part of porting
the driver. You'll have to figure out which registers in the R300 have
equivalent functionality to the r200 registers.

Take a look at r200_state.c. These functions (mostly) are invoked by
Mesa when OpenGL state changes. They program the registers. So you'll
have to change the register definitions for r300 and modify/rewrite
r200_state.c.

> 
>         B) When is state updated and how ? I assume that it is written
>            only when registers change - so is marking registers dirty
>            done by driver only or by Mesa internals too ?

Those registers are driver-private stuff. So they are only changed by
driver functions. Dirty state is written to the hardware in
r200EmitState in r200_cmdbuf.c.

> 
>         C) I assume I would need to add new registers to the state - any
>            pointers/suggestions about what needs to be done ?
> 
>                 i) In particular, is their any locking that needs to be
>                    done ?

I believe you can change the driver's mirror of the registers any time.
You only need the hardware lock when state is emitted.

> 
>   3. Are functions in r200_cmdbuf and r200_sanity the only ones that
>      deal with hardware registers ?

As I said, take a look at r200_state.c. AFAIK r200_sanity is not really
needed for a functioning driver. It's more of a debugging tool
(R200_DEBUG=sanity).

> 
>                       thank you !
> 
>                           Vladimir Dergachev
> 

Felix


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to