r300g: fix TFP stride override.

We should use pitch for the overriden state, fixes one half of the tfp test.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2010-04-04 20:31:42 +10:00
parent 655fe28155
commit d605b0db4d

View file

@ -521,7 +521,7 @@ static void r300_setup_texture_state(struct r300_screen* screen, struct r300_tex
state->format0 = R300_TX_WIDTH((pt->width0 - 1) & 0x7ff) |
R300_TX_HEIGHT((pt->height0 - 1) & 0x7ff);
if (tex->is_npot) {
if (tex->is_npot || tex->stride_override) {
/* rectangles love this */
state->format0 |= R300_TX_PITCH_EN;
state->format2 = (tex->pitch[0] - 1) & 0x1fff;