summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600/drm/radeon.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-10 22:41:00 +1000
committerDave Airlie <[email protected]>2010-09-10 22:41:00 +1000
commitfcae8ca57512f84c51b7445456aab7ec92a21254 (patch)
tree238b9b1af10697b14c721f65c6e756969954a277 /src/gallium/winsys/r600/drm/radeon.c
parentf61b241ebabf2d8db9b96f7860afe79bec980df7 (diff)
r600g: fixup state calculations for picking states.
for evergreen I ended up using a non-contig array of states, but this code needs a bit of fixing up to deal with that.
Diffstat (limited to 'src/gallium/winsys/r600/drm/radeon.c')
-rw-r--r--src/gallium/winsys/r600/drm/radeon.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon.c b/src/gallium/winsys/r600/drm/radeon.c
index 64ccc7db877..ccf60605ed8 100644
--- a/src/gallium/winsys/r600/drm/radeon.c
+++ b/src/gallium/winsys/r600/drm/radeon.c
@@ -45,7 +45,7 @@ static int radeon_get_device(struct radeon *radeon)
struct radeon *radeon_new(int fd, unsigned device)
{
struct radeon *radeon;
- int r, i, id;
+ int r, i, id, j, k;
radeon = calloc(1, sizeof(*radeon));
if (radeon == NULL) {
@@ -120,19 +120,6 @@ struct radeon *radeon_new(int fd, unsigned device)
__func__, radeon->device);
break;
}
- radeon->state_type_id = calloc(radeon->nstype, sizeof(unsigned));
- if (radeon->state_type_id == NULL) {
- return radeon_decref(radeon);
- }
- for (i = 0, id = 0; i < radeon->nstype; i++) {
- radeon->state_type_id[i] = id;
- for (int j = 0; j < radeon->nstype; j++) {
- if (radeon->stype[j].stype != i)
- continue;
- id += radeon->stype[j].num;
- }
- }
- radeon->nstate_per_shader = id;
return radeon;
}