<p dir="ltr">Ack</p>
<div class="gmail_quote">On Dec 16, 2015 6:53 AM, "Neil Roberts" <<a href="mailto:neil@linux.intel.com">neil@linux.intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This reverts commit 839793680f99b8387bee9489733d5071c10f3ace.<br>
<br>
The patch was breaking DRI3 because driGLFormatToImageFormat does not<br>
handle MESA_FORMAT_B8G8R8X8_SRGB which ended up making it fail to<br>
create the renderbuffer and it would later crash. It's not trivial to<br>
add this format because there is no __DRI_IMAGE_FORMAT nor<br>
__DRI_IMAGE_FOURCC define for the format either. I'm not sure how<br>
difficult adding this would be and whether adding a new format would<br>
require some sort of new version for DRI. Seeing as this might take a<br>
while to fix I think it makes sense to just revert the patch in the<br>
meantime in order to avoid regressing master.<br>
<br>
It is also not handled in intel_gles3_srgb_workaround and there may be<br>
other cases where it breaks.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=93388" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=93388</a><br>
---<br>
src/mesa/drivers/dri/i965/intel_screen.c | 13 +++++++------<br>
1 file changed, 7 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c<br>
index 825a7c1..cc90efe 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_screen.c<br>
@@ -999,13 +999,14 @@ intelCreateBuffer(__DRIscreen * driScrnPriv,<br>
fb->Visual.samples = num_samples;<br>
}<br>
<br>
- if (mesaVis->redBits == 5) {<br>
+ if (mesaVis->redBits == 5)<br>
rgbFormat = MESA_FORMAT_B5G6R5_UNORM;<br>
- } else {<br>
- if (mesaVis->alphaBits == 0)<br>
- rgbFormat = MESA_FORMAT_B8G8R8X8_SRGB;<br>
- else<br>
- rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;<br>
+ else if (mesaVis->sRGBCapable)<br>
+ rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;<br>
+ else if (mesaVis->alphaBits == 0)<br>
+ rgbFormat = MESA_FORMAT_B8G8R8X8_UNORM;<br>
+ else {<br>
+ rgbFormat = MESA_FORMAT_B8G8R8A8_SRGB;<br>
fb->Visual.sRGBCapable = true;<br>
}<br>
<br>
--<br>
1.9.3<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" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>