[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dri-devel
Subject:    Re: [Dri-devel] Savage 3D driver roadmap
From:       Felix =?ISO-8859-1?Q?K=FChling?= <fxkuehl () gmx ! de>
Date:       2004-02-21 15:23:59
Message-ID: 20040221162359.6c628227.felix () trabant
[Download RAW message or body]

On Fri, 20 Feb 2004 17:29:07 -0800
Tim Roberts <timr@probo.com> wrote:

> Alex Deucher wrote:
> 
> >Felix can probably phrase this better than I since he has worked more
> >closely with the 3D code.  however, I think what he is asking is how
> >should vertex commends be formatted when sent to the 3D engine when
> >using indexed drawing commands?  We want to separate drawing commands
> >and data so that we can do DMA securely to prevent someone writing
> >anywhere in memory.
> >  
> >
> 
> Looks to me like they just write the BCI command (80030000 for triangle 
> primitive) followed by three D3DTLVERTEX instances, 32 bytes each.  The 
> code copies each D3DTLVERTEX using the FPU: 
> fild/fild/fild/fild/fistp/fistp/fistp/fistp.  I wouldn't have guessed 
> that was optimal for a 32-byte copy.

Yes, that's when you have a mixed command and data stream. However,
there also seems to be a BCI command that allows you to reference
vertices in a pure vertex DMA buffer. The vertex buffer address is
deterined by register 0x48C20 (BCI: 0x3E). I found this definition of
the indexed drawing BCI command in the S3 driver:

typedef struct {  /*for DrawIndexPrimitive command, vert0Idx is meaningful.*/
    unsigned int vert0Idx:16;
    unsigned int vertCnt:8;
    unsigned int cont:1;
    unsigned int type:2;   /*00=list, 01=strip, 10=fan, 11=reserved*/
    unsigned int cmd:5;
}Reg_DrawIndexPrimitive;

However, it does not allow you to specify the vertex format (skip
flags). So my question is if vertices are always complete (32 bytes on
Savage3D and 40 bytes on Savage4 due to the second texture unit) or if
the vertex format is somehow automatically determined by state flags
like specular enabled and the texture units that are enabled. Or is
there another way to specify the vertex format for indexed drawing
commands that I missed. Also I just realized that I don't know the most
significant 5 bits of the drawing command yet (cmd in the structure
above).

> 
> -- 
> - Tim Roberts, timr@probo.com
>   Providenza & Boekelheide, Inc.
> 

Felix


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic