<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - weston-subsurfaces does not render/display"
href="https://bugs.freedesktop.org/show_bug.cgi?id=72612#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - weston-subsurfaces does not render/display"
href="https://bugs.freedesktop.org/show_bug.cgi?id=72612">bug 72612</a>
from <span class="vcard"><a class="email" href="mailto:krh@bitplanet.net" title="Kristian Høgsberg <krh@bitplanet.net>"> <span class="fn">Kristian Høgsberg</span></a>
</span></b>
<pre>I'll post this to mesa-dev for review, fixes the problem here:
commit fad655f0ce208ae985c62c936d26e20d8a22f897
Author: Kristian Høgsberg <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>>
Date: Fri Jan 17 16:55:31 2014 -0800
i965: Only update renderbuffers on initial intelMakeCurrent
We call intel_prepare_render() in intelMakeCurrent() to make sure we have
renderbuffers before calling _mesa_make_current(). The only reason we
do this is so that we can have valid defaults for width and height.
If we already have buffers for the drawable we're making current, we
don't need to do this.
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Unable to unlock Weston when context menu or tooltip exists"
href="show_bug.cgi?id=72540">https://bugs.freedesktop.org/show_bug.cgi?id=72540</a>
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - weston-subsurfaces does not render/display"
href="show_bug.cgi?id=72612">https://bugs.freedesktop.org/show_bug.cgi?id=72612</a>
Signed-off-by: Kristian Høgsberg <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>>
diff --git a/src/mesa/drivers/dri/i965/brw_context.c
b/src/mesa/drivers/dri/i965/brw_context.c
index 78c06fc..b23cdef 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -911,6 +911,7 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
if (driContextPriv) {
struct gl_context *ctx = &brw->ctx;
struct gl_framebuffer *fb, *readFb;
+ struct intel_renderbuffer *rb = NULL;
if (driDrawPriv == NULL && driReadPriv == NULL) {
fb = _mesa_get_incomplete_framebuffer();
@@ -918,6 +919,7 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
} else {
fb = driDrawPriv->driverPrivate;
readFb = driReadPriv->driverPrivate;
+ rb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT);
driContextPriv->dri2.draw_stamp = driDrawPriv->dri2.stamp - 1;
driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1;
}
@@ -929,7 +931,12 @@ intelMakeCurrent(__DRIcontext * driContextPriv,
intel_gles3_srgb_workaround(brw, fb);
intel_gles3_srgb_workaround(brw, readFb);
- intel_prepare_render(brw);
+ if (rb && !rb->mt) {
+ /* If we don't have buffers for the drawable yet, force a call to
+ * getbuffers here so we can have a default drawable size. */
+ intel_prepare_render(brw);
+ }
+
_mesa_make_current(ctx, fb, readFb);
} else {
_mesa_make_current(NULL, NULL, NULL);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>