mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
i965: Fix buffer object segfault since removal of system memory BOs.
Commit cf31a19300 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 <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
parent
012ba47076
commit
6e5b80ee5a
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue