diff options
author | Kenneth Graunke <[email protected]> | 2013-07-01 22:08:22 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-07-03 10:48:12 -0700 |
commit | 6e5b80ee5a11d13556d30b551d4a16e94ab0ff58 (patch) | |
tree | f09fdc5fef4bee8f637ef2e925ec6fedf4b6587f /src/mesa/drivers/dri | |
parent | 012ba47076dbc80742d4755f5c39909d0c4753f3 (diff) |
i965: Fix buffer object segfault since removal of system memory BOs.
Commit cf31a19300cbcecddb6bd0f878abb9316ebad2a1 removed support for BOs
backed by system memory, as it was only useful for i915. However, it
removed a little too much code: intel_bufferobj_buffer() used to call
intel_bufferobj_alloc_buffer(), and after that commit, it didn't.
This led to NULL pointer dereferences in several test cases, such as
es3conform's transform_feedback_state_variables test.
This commit restores the allocation, preserving the original behavior.
It may not be the cleanest approach, but tidying should come later.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66432
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_buffer_objects.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c index a8cd713aa9f..3f55122823e 100644 --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -417,6 +417,9 @@ intel_bufferobj_buffer(struct intel_context *intel, if (intel_obj->source) release_buffer(intel_obj); + if (intel_obj->buffer == NULL) + intel_bufferobj_alloc_buffer(intel, intel_obj); + return intel_obj->buffer; } |