summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-04-04 16:09:59 +0200
committerMarek Olšák <[email protected]>2010-04-05 07:09:45 +0200
commit4e949271c25ccc5a06fbbbe912b0b43b75d1d169 (patch)
tree1fd7e66fe065cd5206afcdc84c089d833f58c992 /src/gallium/drivers/r300/r300_texture.c
parent0179c5a95b604105ead8d642e8313740adc2a686 (diff)
r300g: is_npot -> uses_pitch
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index d03c28ba350..d1db6722e0a 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -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 || tex->stride_override) {
+ if (tex->uses_pitch) {
/* rectangles love this */
state->format0 |= R300_TX_PITCH_EN;
state->format2 = (tex->pitch[0] - 1) & 0x1fff;
@@ -741,8 +741,9 @@ static void r300_setup_miptree(struct r300_screen* screen,
static void r300_setup_flags(struct r300_texture* tex)
{
- tex->is_npot = !util_is_power_of_two(tex->tex.width0) ||
- !util_is_power_of_two(tex->tex.height0);
+ tex->uses_pitch = !util_is_power_of_two(tex->tex.width0) ||
+ !util_is_power_of_two(tex->tex.height0) ||
+ tex->stride_override;
}
static void r300_setup_tiling(struct pipe_screen *screen,