projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d0fc3c
)
i965: Use a little stack space to avoid a malloc in wm_get_binding_table.
author
Eric Anholt
<eric@anholt.net>
Fri, 2 Oct 2009 17:53:56 +0000
(10:53 -0700)
committer
Eric Anholt
<eric@anholt.net>
Fri, 2 Oct 2009 18:42:19 +0000
(11:42 -0700)
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
patch
|
blob
|
history
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 4f651170c607da701f6851ade6b76a7ee45342bd..9c28a22a2989843734117046c34b321430fbed87 100644
(file)
--- 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;