--- Michel D�nzer <[EMAIL PROTECTED]> wrote:
> On Sat, 2003-09-27 at 23:10, Alex Deucher wrote:
> > --- Michel Dnzer <[EMAIL PROTECTED]> wrote:
> > > On Fri, 2003-09-26 at 18:16, Alex Deucher wrote:
> > > > 
> > > > When implemeting this on radeon, would I have to use the CP
> > > > to program the texture registers or could I use MMIO?  
> > > 
> > > Using the 3D engine without the CP is hard if not impossible.
> > 
> > how do 2D, 3D, CP, etc fit together.  I take it the CP is mainly a
> > queue for 3D commands, but can also process register writes?  
> 
> It's basically a general command queue.

OK.

> 
> > I understand how the to issues commands for 2D to the CP, but how
> does 3D
> > work?  
> 
> Similarly, via special 3D command packets.

Ok.  this is starting to come together in my mind.  I've also dug into
the code a bit more.
> 
> > The DRI driver seems very foreign by comparison.  having looked
> > it over it guess the various functions queue up 3D commands which
> are
> > then flushed to the 3D engine at some point.  where do that
> commands
> > get flushed?  
> 
> In the DRM.

That's what I figured.

> 
> > can I just use the texture commands or do I need to recreate the
> commands 
> > to create a quad first and then the texture? 
> 
> The latter, there's no 'texture command' per se, textures are just
> part
> of the hardware state.

OK. makes sense.

> 
> 
> > > > I've been toying with the idea of converting the existing Xv
> code
> > > to CP 
> > > > anyway, however if you disabled the DRI and wanted to use the
> > > overlay or 
> > > > the texture engine you'd need an MMIO code path at least.
> > > 
> > > The register write macros could be changed (or new ones added) to
> use
> > > the CP transparently when appropriate.
> > 
> > do you mean like psuedo-MMIO using the CP?  or just other macros
> like
> > the 2D accel code uses (OUTRING() and such).  
> 
> Either.
> 
> > is it possible to use the 3D engine at all when the DRI is not
> enabled?
> 
> AFAIK it's not possible to use the 3D engine without the CP.
> Apparently,
> it's possible to use the CP with MMIO though, but I haven't seen code
> or
> even documentation on how to do it.

I'm going to start with just issuing commands to the CP like the 2D
accel code does.  I may dig into MMIO stuff later, but first I just
want to get something working.

> 
> 
> > > As a bonus, once you've solved all the issues involved, adding
> some
> > > RENDER extension acceleration should be trivial. :) I played with
> > > that a
> > > little but never found the time to get it very far.
> > 
> > Do you have any code (however broken) I could look at?
> 
> Sure, http://penguinppc.org/~daenzer/DRI/radeon_render.c . It's for
> the
> R100 3D engine, and it doesn't render anything yet, or at least not
> anything like what it's supposed to. :\
> 

I've briefly looked over the code.  I've got a few questions.  
How does this take care of the state sharing issue (2D and 3D) that Ian
brought up yesterday?  the name would seem to indicate that your
UploadCommon3DState() function handled that, but it looks more like
it's  just setting up state for your render accel functions.  is there
a reference anywhere for what the different 3D packets do?  I suspect
not.  many of them I can guess at based on their names, but others are
pretty unclear.  I guess I'll just ask when I need help.  

SubsequentCPUToScreenTexture() looks like it sends the packets for
creating a quad?  what function should I look at in the DRI driver?

there are several places where you have code that looks like this:
    BEGIN_RING( 8 );

    OUT_RING_REG( RADEON_PP_TXFORMAT_0, RADEON_TXFORMAT_RGBA8888
                                      | RADEON_TXFORMAT_ALPHA_IN_MAP
                                      | RADEON_TXFORMAT_NON_POWER2
                                      | RADEON_TXFORMAT_ALPHA_MASK_ENABLE );
    OUT_RING_REG( RADEON_PP_TXOFFSET_0, offset );
    OUT_RING_REG( RADEON_PP_TXPITCH_0, pitch - 32 );
    OUT_RING_REG( RADEON_PP_TXSIZE_0, (width-1) | ((height-1) << 16) );

    ADVANCE_RING();

Why did you use 8 rather than 4?  it seems to me you are only issuing 4
commands, or is the code just in an incomplete/testing state?

Thanks for you help.

Alex

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to