<div dir="ltr">On 1 August 2013 15:11, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This prevents a crash in a future patch.<br>
<br>
_mesa_initialize_context() creates a default transform feedback object<br>
by calling the NewTransformFeedbackObject() driver hook. Eventually,<br>
we'll want to subclass that and allocate a buffer object. This means<br>
passing brw->bufmgr to drm_intel_alloc_bo(), and crashing if it isn't<br>
initialized yet.<br>
<br>
The buffer manager is actually already initialized; we just hadn't<br>
copied the pointer from intel_screet to intel_context quite early<br></blockquote><div><br></div><div>s/screet/screen/<br><br></div><div>Other than that, series is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
enough.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/mesa/drivers/dri/i965/intel_context.c | 3 +--<br>
1 file changed, 1 insertion(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c<br>
index 7860e1f..461d493 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_context.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_context.c<br>
@@ -481,6 +481,7 @@ intelInitContext(struct brw_context *brw,<br>
}<br>
<br>
brw->intelScreen = intelScreen;<br>
+ brw->bufmgr = intelScreen->bufmgr;<br>
<br>
if (!_mesa_initialize_context(&brw->ctx, api, mesaVis, shareCtx,<br>
functions)) {<br>
@@ -540,8 +541,6 @@ intelInitContext(struct brw_context *brw,<br>
*/<br>
brw->max_gtt_map_object_size = gtt_size / 4;<br>
<br>
- brw->bufmgr = intelScreen->bufmgr;<br>
-<br>
bo_reuse_mode = driQueryOptioni(&brw->optionCache, "bo_reuse");<br>
switch (bo_reuse_mode) {<br>
case DRI_CONF_BO_REUSE_DISABLED:<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>