diff options
author | Eric Anholt <[email protected]> | 2009-10-02 10:53:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-10-02 11:42:19 -0700 |
commit | 4182b58169c1c37833c590d00d0a6a52b2b55326 (patch) | |
tree | d8ba20029cb611538aeba3a908e204ae8cc44df4 /src/mesa/drivers | |
parent | 6d0fc3cfde3dd730de17e925c5594a8b317ba200 (diff) |
i965: Use a little stack space to avoid a malloc in wm_get_binding_table.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 4f651170c60..9c28a22a298 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -660,7 +660,7 @@ brw_wm_get_binding_table(struct brw_context *brw) if (bind_bo == NULL) { GLuint data_size = brw->wm.nr_surfaces * sizeof(GLuint); - uint32_t *data = malloc(data_size); + uint32_t data[BRW_WM_MAX_SURF]; int i; for (i = 0; i < brw->wm.nr_surfaces; i++) @@ -685,8 +685,6 @@ brw_wm_get_binding_table(struct brw_context *brw) brw->wm.surf_bo[i]); } } - - free(data); } return bind_bo; |