Mesa (master): nvc0: sprite coord enable is per GENERIC, not overall index
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Thu Feb 24 16:36:25 UTC 2011
Module: Mesa
Branch: master
Commit: b0bf4ee85f01e9cbe240e49e67a947d052daa3f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0bf4ee85f01e9cbe240e49e67a947d052daa3f3
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Wed Feb 23 15:00:26 2011 +0100
nvc0: sprite coord enable is per GENERIC, not overall index
---
src/gallium/drivers/nvc0/nvc0_state_validate.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nvc0/nvc0_state_validate.c
index 0cc0a0c..70c418f 100644
--- a/src/gallium/drivers/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nvc0/nvc0_state_validate.c
@@ -302,14 +302,12 @@ nvc0_validate_sprite_coords(struct nvc0_context *nvc0)
if (nvc0->rast->pipe.point_quad_rasterization) {
uint32_t en = nvc0->rast->pipe.sprite_coord_enable;
- int i;
- struct nvc0_program *prog = nvc0->fragprog;
while (en) {
- i = ffs(en) - 1;
+ int i = ffs(en) - 1;
en &= ~(1 << i);
- if (prog->fp.in_pos[i] >= 0xc0 && prog->fp.in_pos[i] < 0xe0)
- reg |= 8 << ((prog->fp.in_pos[i] - 0xc0) / 4);
+ if (i >= 0 && i < 8)
+ reg |= 8 << i;
}
}
More information about the mesa-commit
mailing list