>
> Finally, someone who knows the stuff :)) No, there is no such variable,
> but this phrase I plucked from the comment. Here is an example from
> radeon.h:
>
>                               /* CP vertex/indirect buffer data */
>     unsigned long     bufStart;        /* Offset into AGP space */
>     drmHandle         bufHandle;       /* Handle from drmAddMap */
>     drmSize           bufMapSize;      /* Size of map */
>     int               bufSize;         /* Size of buffers (in MB) */
>     unsigned char     *buf;            /* Map */
>     int               bufNumBufs;      /* Number of buffers */
>     drmBufMapPtr      buffers;         /* Buffer map */
>
> Now, from these I guess that *buf is where I can access the data directly
> for Xserver. bufSize is the size of the thing - does it have to be in MB ?
> Or just page-aligned is fine ? bufStart - what do I use this for ? Can I
> use it to reference data in the buffer or do I have to add or subtract a
> magic number from it before writing into card's registers ? (and to answer
> your questions: I have made a copy of the same fields /with buf replaced
> with capture and allocated space.. nothing seems to crash.., 3d workds,
> 1mb is reserved someplace. /)

I'll check up & give you proper answers in a sec.  However, it sounds like 
you're just looking to allocate a buffer of a meg or two on the card 
somewhere and use that for some purpose.  If so, the 3d drivers are doing 
this all the time - to hold textures.  You should be able to do the same 
thing - just grab a meg or two of texture memory and use that for your 
purposes.  You'll need a trick or two to stop others grabbing it back when 
resources run low, but it is doable without modifying any kernel structures.  
Have a look at the files in lib/GL/mesa/src/drv/XYZ/*_tex*.[ch] and in 
particular functions like i810UploadTexImages() which scan the LRU and 
allocate memory.

Keith

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to