José Fonseca wrote:
> 
> The previous mail got badly formated. I'm sending again the broken lines.
> 
> ...
> 
> 0000:   00000000        /* placeholder for a command */
> 0004:   ????????        /* VERTEX_1_S */
> 0008:   ????????        /* VERTEX_1_T */
> 000c:   ????????        /* VERTEX_1_W */
> 0010:   ????????        /* VERTEX_1_SPEC_ARGB */
> 0014:   ????????        /* VERTEX_1_Z */
> 0018:   ????????        /* VERTEX_1_ARGB */
> 001c:   ????????        /* VERTEX_1_XY */
> 0020:   00000000        /* placeholder for a command */
> 0024:   ????????        /* VERTEX_1_SECONDARY_S */
> 0028:   ????????        /* VERTEX_1_SECONDARY_T */
> 002c:   ????????        /* VERTEX_1_SECONDARY_W */
> 0030:   ...             /* the same as above for vertex 2, 3, and so on */
> 
> The DRM would unmap this buffer to prevent further tampering, and it would
> then add the commands:
> 
> 0000:   (MACH64_VERTEX_1_S) | (6<<16)   /* setup for programming seven
> sequential registers */
> 0004:   ????????        /* VERTEX_1_S */
> 0008:   ????????        /* VERTEX_1_T */
> 000c:   ????????        /* VERTEX_1_W */
> 0010:   ????????        /* VERTEX_1_SPEC_ARGB */
> 0014:   ????????        /* VERTEX_1_Z */
> 0018:   ????????        /* VERTEX_1_ARGB */
> 001c:   ????????        /* VERTEX_1_XY */
> 0020:   (MACH64_VERTEX_1_SECONDARY_S) | (2<<16) /* setup for programming
> three sequential registers */
> 0024:   ????????        /* VERTEX_1_SECONDARY_S */
> 0028:   ????????        /* VERTEX_1_SECONDARY_T */
> 002c:   ????????        /* VERTEX_1_SECONDARY_W */
> 0030:   ...

The advantages of doing it this way:
        - unmapping rather than copying the data is probably faster.
        - no need to reformat data in kernel space.

The disadvantages:
        - you have to re-write '_vbtmp.h' and maybe '_tritmp.h", and keep these
uptodate with any bugfixes
        - the driver looks less like the other drivers and it is harder to incoperate
new optimizations.
        - unmapping is more complex than copying.

It's probably a matter of personal choice...
                
Keith

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

Reply via email to