r300: Fix texture coordinate calculation for rectangle textures
authorNicolai Haehnle <nhaehnle@gmail.com>
Sat, 24 Mar 2007 18:08:26 +0000 (19:08 +0100)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 24 Mar 2007 18:09:44 +0000 (19:09 +0100)
commitf27991c9165450872c652e2fd27811409957b2a0
treee9e5e8d3023498c04c2b04fe5dce9a554d10f2e0
parent0c3ae2ea7fbb9c1087bdbc1048c380ca760b80d2
r300: Fix texture coordinate calculation for rectangle textures

R300 hardware takes texcoords in the range 0..1 even for rectangle
textures. Previously, the necessary texcoord conversion was applied
to the texture coordinate during vertex processing in a render stage.

This is obviously wrong when fragment programs are used, which can
calculate arbitrary coordinates for TEX instructions. Therefore,
we now inject an appropriate MUL instruction before a TEX that
reference a rectangle texture.
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_fragprog.c
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_state.c