diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-08-30 17:56:59 -0400 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2010-09-01 13:16:23 -0400 |
commit | 66e4cb1cd5a55402606a09417349d2be8b009e89 (patch) | |
tree | b9c4e20211fbfc1a979667598f141116f4a5cebd /src/gallium/winsys/r600/drm/r600_state.c | |
parent | 15ce70252c5357081a61f3494261c7e343174301 (diff) |
r600g: avoid dynamic allocation of states
Make state statically allocated, this kills a bunch of code
and avoid intensive use of malloc/free. There is still a lot
of useless duplicate function wrapping that can be kill. This
doesn't improve yet performance, needs to avoid memcpy states
in radeon_ctx_set_draw and to avoid rebuilding vs_resources,
dsa, scissor, cb_cntl, ... states at each draw command.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_state.c')
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_state.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_state.c b/src/gallium/winsys/r600/drm/r600_state.c index f6a428e884..71d65f0fea 100644 --- a/src/gallium/winsys/r600/drm/r600_state.c +++ b/src/gallium/winsys/r600/drm/r600_state.c @@ -367,7 +367,6 @@ static int r600_state_pm4_vgt(struct radeon_state *state) static int r600_state_pm4_draw(struct radeon_state *state) { - unsigned i; int r; if (state->nbo) { @@ -485,11 +484,10 @@ static void r600_build_types_array(struct radeon *radeon) } else { for (j = 0; j < R600_SHADER_MAX; j++) { if (r600_stypes[i].reginfo[j].shader_type) - id += r600_stypes[i].num; + id += r600_stypes[i].num; } } } - radeon->nstate = id; radeon->stype = r600_stypes; radeon->nstype = STYPES_SIZE; |