i965: Remove unnecessary malloc/free in VS binding table setup.

This commit is contained in:
Eric Anholt
2010-01-19 15:26:56 -08:00
parent a098fd71d7
commit 5e1851b144
2 changed files with 3 additions and 4 deletions
@@ -155,7 +155,7 @@ brw_vs_get_binding_table(struct brw_context *brw)
if (bind_bo == NULL) {
GLuint data_size = BRW_VS_MAX_SURF * sizeof(GLuint);
uint32_t *data = malloc(data_size);
uint32_t data[BRW_VS_MAX_SURF];
int i;
for (i = 0; i < BRW_VS_MAX_SURF; i++)
@@ -180,8 +180,6 @@ brw_vs_get_binding_table(struct brw_context *brw)
I915_GEM_DOMAIN_INSTRUCTION, 0);
}
}
free(data);
}
return bind_bo;
@@ -167,7 +167,8 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
struct intel_context *intel = batch->intel;
GLuint used = batch->ptr - batch->map;
if (intel->first_post_swapbuffers_batch == NULL) {
if (!intel->using_dri2_swapbuffers &&
intel->first_post_swapbuffers_batch == NULL) {
intel->first_post_swapbuffers_batch = intel->batch->buf;
drm_intel_bo_reference(intel->first_post_swapbuffers_batch);
}