mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
i965: Initialize the intel_context::bufmgr pointer earlier.
This prevents a crash in a future patch. _mesa_initialize_context() creates a default transform feedback object by calling the NewTransformFeedbackObject() driver hook. Eventually, we'll want to subclass that and allocate a buffer object. This means passing brw->bufmgr to drm_intel_alloc_bo(), and crashing if it isn't initialized yet. The buffer manager is actually already initialized; we just hadn't copied the pointer from intel_screen to intel_context quite early enough. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
263ebe1a71
commit
c047ad000b
1 changed files with 1 additions and 2 deletions
|
|
@ -481,6 +481,7 @@ intelInitContext(struct brw_context *brw,
|
|||
}
|
||||
|
||||
brw->intelScreen = intelScreen;
|
||||
brw->bufmgr = intelScreen->bufmgr;
|
||||
|
||||
if (!_mesa_initialize_context(&brw->ctx, api, mesaVis, shareCtx,
|
||||
functions)) {
|
||||
|
|
@ -540,8 +541,6 @@ intelInitContext(struct brw_context *brw,
|
|||
*/
|
||||
brw->max_gtt_map_object_size = gtt_size / 4;
|
||||
|
||||
brw->bufmgr = intelScreen->bufmgr;
|
||||
|
||||
bo_reuse_mode = driQueryOptioni(&brw->optionCache, "bo_reuse");
|
||||
switch (bo_reuse_mode) {
|
||||
case DRI_CONF_BO_REUSE_DISABLED:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue