<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 18, 2016 at 9:50 AM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016-07-18 09:14:48, Jason Ekstrand wrote:<br>
> Thanks to rebase fail, recent surface state changes effectively reverted<br>
<br>
</span>This happened in 09b5a71517fadd6c20b72e7ad9ea1f7539c93a42, right?<br>
Should we mention that commit?<br></blockquote><div><br></div><div>Done<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reviewed-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
> 727a9b24933 and 367cf3a2e3e which was unintentional. This should bring it<br>
> back.<br>
><br>
> Signed-off-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> Cc: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
> ---<br>
> src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 18 ++++++++++--------<br>
> 1 file changed, 10 insertions(+), 8 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> index c1a7579..d896789 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c<br>
> @@ -385,6 +385,13 @@ brw_update_texture_surface(struct gl_context *ctx,<br>
> } else {<br>
> struct intel_texture_object *intel_obj = intel_texture_object(obj);<br>
> struct intel_mipmap_tree *mt = intel_obj->mt;<br>
> +<br>
> + if (plane > 0) {<br>
> + if (mt->plane[plane - 1] == NULL)<br>
> + return;<br>
> + mt = mt->plane[plane - 1];<br>
> + }<br>
> +<br>
> struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, unit);<br>
> /* If this is a view with restricted NumLayers, then our effective depth<br>
> * is not just the miptree depth.<br>
> @@ -406,8 +413,9 @@ brw_update_texture_surface(struct gl_context *ctx,<br>
> const unsigned swizzle = (unlikely(alpha_depth) ? SWIZZLE_XYZW :<br>
> brw_get_texture_swizzle(&brw->ctx, obj));<br>
><br>
> - unsigned format = translate_tex_format(<br>
> - brw, intel_obj->_Format, sampler->sRGBDecode);<br>
> + mesa_format mesa_fmt = plane == 0 ? intel_obj->_Format : mt->format;<br>
> + unsigned format = translate_tex_format(brw, mesa_fmt,<br>
> + sampler->sRGBDecode);<br>
><br>
> /* Implement gen6 and gen7 gather work-around */<br>
> bool need_green_to_blue = false;<br>
> @@ -449,12 +457,6 @@ brw_update_texture_surface(struct gl_context *ctx,<br>
> assert(brw->gen >= 8);<br>
> mt = mt->stencil_mt;<br>
> format = BRW_SURFACEFORMAT_R8_UINT;<br>
> - } else if (obj->Target == GL_TEXTURE_EXTERNAL_OES) {<br>
> - if (plane > 0)<br>
> - mt = mt->plane[plane - 1];<br>
> - if (mt == NULL)<br>
> - return;<br>
> - format = translate_tex_format(brw, mt->format, sampler->sRGBDecode);<br>
> }<br>
><br>
> const int surf_index = surf_offset - &brw->wm.base.surf_offset[0];<br>
> --<br>
> 2.5.0.400.gff86faf<br>
><br>
</div></div></blockquote></div><br></div></div>