On Sun, 9 Apr 2006 22:54:10 +0200
Ewald Snel <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Here are two patches for the R300 DRI driver. One adds conventional fog 
> support to the R300 driver, the other fixes a problem with rectangular fp16 
> textures.
> 
> The fog patch is not based on actual register values of the fglrx driver, but 
> rather by trial and error writing to the registers related to fog. The fglrx 
> driver initializes these registers to uninteresting defaults, probably 
> because the vertex and fragment program calculate fog intensity.

What about vertex fog?
Could there be a way to route interpolated fog coords to the fog hardware 
somehow?
I dont mind about doing it with fragment programs but that might be more 
challenging as user supplied programs need to be modified to cope with it.

On the other hand, we are going to need some way to alter programs anyways.
I think these sort of things should be done outside the backend to achieve 
proper optimizations.

r300 vertex progs for instance have following hw limitations:
1. only 14 temps(need to pack tight)
2. no two params/attribs can be read twice in same instruction(move to temp 
first)
3. texture coords need to be normalized for texture rectanges
4. undefined components should never be operated on nor should reach outputs 
(use ZERO/ONE)

5. remove instructions that dont contribute to the outputs we need.
6. inputs we dont need

Doing these operations in backend would not be very sensible because they need 
to be done in correct _order_.
Correct ordering should be: add instructions(2, 3), remove instructions(5, 6), 
optimize temporary usage(1).

-- 
Aapo Tahkola


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to