On Tue, 27 Apr 2004 11:04:11 -0400 (EDT) Vladimir Dergachev <[EMAIL PROTECTED]> wrote:
> > Hi Felix :) > > Thank you for the answers, more questions below: > > > > 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. > > There are no equivalent registers, however I do not care about this. > At the moment all I want is to have a driver that does not lock up the > machine so I can start exercising R300-specific registers. > > I.e. I would be perfectly happy to rip out TCL-specific registers and have > colors come out wrong as long as I don't have to reboot after each try. Yeah, all the TCL stuff makes the radeon drivers pretty complex. Stripping it down to the bare minimum sounds like a good approach. > > > > > 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. > > I tried putting a return in the beginning of each of the functions in > r200_state.c and I am still getting a lockup. I suspect that vertex or > texture handling code also likes to emit part of the state. Anything that bypasses r200EmitState would be a bad hack. So (without having looked at the code) it's pretty improbable that texture code modifies some registers directly. But maybe DMA texture uploads lock up the chip, though that should not happen in glxgears. > > > > > > > > > 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. > > Excellent ! > > best > > 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
