Re: memory address of pixmap

2003-06-29 Thread Philip Brown
Mark Vojkovich wrote:

  pPixmap-devPrivate is the pointer to the memory, but this
is dynamic.  Pixmaps get migrated back and forth between video
and system ram.  So you need to check it every time you reenter
your code.


oops.   

The bitblit routines are rather hairy to follow, so I hope you dont mind me
also asking; what are the pitfalls of me creating a pixmap myself?

The constraints are that I want to be able to allocate an offscreen memory
chunk myself via xf86AllocateLinear, then create a pixmap around it, and
then be able to use the accelerated bitblit routines via 
gc-ops-CopyArea()

Is the process of creating an offscreen pixmap the hard way documented
anywhere? Like a place for tips for 2d card driver writers?


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: memory address of pixmap

2003-06-29 Thread Philip Brown
Mark Vojkovich wrote:
... Even XAA can't use
xf86AllocateLinear because it doesn't know about hardware alignment
contraints.  In XAA, the root window extends downward and offscreen
pixmaps are just windows that are offscreen.  There is no mechanism
to take a linear allocation and make a hardware pixmap out of it.


Well, I dont care too strongly about using xf86AllocateLinear myself.
I just need some method of encapsulating (locked down) offscreen video
memory, in a manner that I can also leverage the 2d hardware acceleration .
Mostly just bitblits. I dont care too much about the other stuff;
 while it might be useful if available, it's not the crucial issue.
 
 XAACopyArea() seems to explicitly have code for the case of
   IS_OFFSCREEN_PIXMAP(pSrcDrawable)


Do you have a suggestion for the best way my extension module could
allocate an offscreen pixmap that would not get swapped out to system
memory?
Or, just faking out XAACopyArea() enough to work in most cases?
Or even
 XAAInfoRecPtr-ScreenToScreenBitBlt()



A related question:
Is it reasonably valid to cheat the XAA routines, calling

  SetupForScreenToScreenCopy()
  SubsequentScreenToScreenCopy(pscrn, srcx,srcy, dstx, dsty,w,h)

and make 'fake' srcx,srcy coordinates for my offscreen memory area?

This has the disadvantage that I would have to allocate my related
offscreen areas sparsely like visible windows, I think(?), but that would
be acceptible to me.



___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel