<div dir="ltr">On 5 June 2013 10:37, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</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"><div class="im">On 05/30/2013 07:44 AM, Paul Berry wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
The patch that follows will fix a bug that prevents<br>
intel_flush_front() from being called often enough. In doing so, it<br>
will create a situation where intel_flush_front() during the initial<br></div>
call to glXMakeCurrent().In this circumstance, ctx->DrawBuffer<div class="im"><br>
hasn't been initialized yet and is NULL. Fortunately,<br>
intel->front_buffer_dirty is false, so intel_flush_front() doesn't<br>
actually need to do anything. To avoid a segfault, swap the order of<br>
terms in intel_flush_front()'s if statement.<br>
</div></blockquote>
<br>
The sentence that begins with "In doing so" seems incomplete and I don't<br>
understand its intent.<br></blockquote><div><br></div><div>Sorry about that. I appear to have experienced some packet loss in between my brain and my fingers. What I meant to say was "In doing so, it will create a situation where intel_flush_front() *is called* during the initial call to glXMakeCurrent."<br>
<br>I'll fix the commit message before pushing.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Other than that, these two patches are<br>
Reviewed-by: Chad Versace <<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mesa/drivers/dri/intel/<u></u>intel_context.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/intel/<u></u>intel_context.c b/src/mesa/drivers/dri/intel/<u></u>intel_context.c<br>
index 88cc247..495cc73 100644<br>
--- a/src/mesa/drivers/dri/intel/<u></u>intel_context.c<br>
+++ b/src/mesa/drivers/dri/intel/<u></u>intel_context.c<br>
@@ -286,7 +286,7 @@ intel_flush_front(struct gl_context *ctx)<br>
__DRIdrawable *driDrawable = driContext->driDrawablePriv;<br>
__DRIscreen *const screen = intel->intelScreen-><u></u>driScrnPriv;<br>
<br>
- if (_mesa_is_winsys_fbo(ctx-><u></u>DrawBuffer) && intel->front_buffer_dirty) {<br>
+ if (intel->front_buffer_dirty && _mesa_is_winsys_fbo(ctx-><u></u>DrawBuffer)) {<br>
if (screen->dri2.loader-><u></u>flushFrontBuffer != NULL &&<br>
driDrawable &&<br>
driDrawable->loaderPrivate) {<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>