<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 19, 2017 at 6:40 AM, Daniel Stone <span dir="ltr"><<a href="mailto:daniels@collabora.com" target="_blank">daniels@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Louis-Francis Ratté-Boulianne <<a href="mailto:lfrb@collabora.com">lfrb@collabora.com</a>><br>
<br>
The planar_format image property was always set even for<br>
non-planar formats. This was breaking CCS support as<br>
intel_from_planar is now making sure we can't have both<br>
a modifier and an planar format.<br></blockquote><div><br></div><div>Could you provide a bit more detail here? We did have issues at one point but I fixed them a while ago. That said, I think this patch is probably correct and a good idea. Also, how much testing of this patch have you done?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Signed-off-by: Louis-Francis Ratté-Boulianne <<a href="mailto:lfrb@collabora.com">lfrb@collabora.com</a>><br>
Reviewed-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
Signed-off-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
index bc2bba00b6..8382e571e3 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -915,7 +915,8 @@ intel_create_image_from_names(<wbr>__DRIscreen *dri_screen,<br>
if (image == NULL)<br>
return NULL;<br>
<br>
- image->planar_format = f;<br>
+ if (f->nplanes > 1)<br>
+ image->planar_format = f;<br>
for (i = 0; i < f->nplanes; i++) {<br>
index = f->planes[i].buffer_index;<br>
image->offsets[index] = offsets[index];<br>
@@ -963,7 +964,8 @@ intel_create_image_from_fds_<wbr>common(__DRIscreen *dri_screen,<br>
image->height = height;<br>
image->pitch = strides[0];<br>
<br>
- image->planar_format = f;<br>
+ if (f->nplanes > 1)<br>
+ image->planar_format = f;<br>
<br>
image->bo = brw_bo_gem_create_from_prime(<wbr>screen->bufmgr, fds[0]);<br>
if (image->bo == NULL) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.1<br>
<br>
</font></span></blockquote></div><br></div></div>