<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 16/07/16 16:29, Jason Ekstrand wrote:<br>
<blockquote
cite="mid:CAOFGe94-z3syHi8MZ1T3j6Sz31_nexPMZt8v-R85tH0-gDTybg@mail.gmail.com"
type="cite">
<p dir="ltr">On Jul 16, 2016 3:59 AM, "Alejandro Piñeiro" <<a
moz-do-not-send="true" href="mailto:apinheiro@igalia.com"><a class="moz-txt-link-abbreviated" href="mailto:apinheiro@igalia.com">apinheiro@igalia.com</a></a>>
wrote:<br>
><br>
> Don't know if there are still some missing patches to be
submitted to<br>
> master, but this patch caused regressions on skylake on the
following<br>
> CTS tests:<br>
><br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_compute_sh<br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_fragment_sh<br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_geometry_sh<br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_tesselation_con_sh<br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_tesselation_ev_sh<br>
> *<br>
>
GL44-CTS.texture_cube_map_array.image_texture_size.texture_size_vertex_sh</p>
<p dir="ltr">Thanks, I'll take a look on Monday. If textureSize
is returning the wrong thing, do you know what it is returning?
<br>
</p>
</blockquote>
<br>
The error messages for all the cases are like this:<br>
<br>
textureSize() for samplerCubeArray returned wrong values of
[width][height][layers]. They are equal to[32][32][0] but should be
[32][32][3].<br>
textureSize() for samplerCubeArrayShadow returned wrong values of
[width][height][layers]. They are equal to[32][32][0] but should be
[32][32][3].<br>
textureSize() for samplerCubeArray returned wrong values of
[width][height][layers]. They are equal to[64][64][0] but should be
[64][64][1]<br>
textureSize() for samplerCubeArrayShadow returned wrong values of
[width][height][layers]. They are equal to[64][64][0] but should be
[64][64][1].<br>
textureSize() for samplerCubeArray returned wrong values of
[width][height][layers]. They are equal to[128][128][0] but should
be [128][128][2].<br>
textureSize() for samplerCubeArrayShadow returned wrong values of
[width][height][layers]. They are equal to[128][128][0] but should
be [128][128][2].<br>
textureSize() for samplerCubeArray returned wrong values of
[width][height][layers]. They are equal to[256][256][0] but should
be [256][256][2]<br>
textureSize() for samplerCubeArrayShadow returned wrong values of
[width][height][layers]. They are equal to[256][256][0] but should
be [256][256][2].<br>
<br>
So the regression seems to be related with layers.<br>
<br>
<blockquote
cite="mid:CAOFGe94-z3syHi8MZ1T3j6Sz31_nexPMZt8v-R85tH0-gDTybg@mail.gmail.com"
type="cite">
<p dir="ltr"> Also, are you sure it's this patch and not the
similarly titled one for gen8? <br>
</p>
</blockquote>
<br>
Yes, you are right, I replied the wrong email. So in order to be
clear, when I did git-bisect this is the commit I found:<br>
<br>
commit 7e951cd56228a726397d59286bf97287df36dc27<br>
Author: Jason Ekstrand <a class="moz-txt-link-rfc2396E" href="mailto:jason.ekstrand@intel.com"><jason.ekstrand@intel.com></a><br>
Date: Mon Jun 6 20:31:38 2016 -0700<br>
<br>
i965/gen8: Use the generic ISL-based path for texture surfaces<br>
<br>
Signed-off-by: Jason Ekstrand <a class="moz-txt-link-rfc2396E" href="mailto:jason@jlekstrand.net"><jason@jlekstrand.net></a><br>
Reviewed-by: Topi Pohjolainen <a class="moz-txt-link-rfc2396E" href="mailto:topi.pohjolainen@intel.com"><topi.pohjolainen@intel.com></a><br>
Reviewed-by: Chad Versace <a class="moz-txt-link-rfc2396E" href="mailto:chad.versace@intel.com"><chad.versace@intel.com></a><br>
<br>
Sorry for the noise.<br>
<br>
<blockquote
cite="mid:CAOFGe94-z3syHi8MZ1T3j6Sz31_nexPMZt8v-R85tH0-gDTybg@mail.gmail.com"
type="cite">
<p dir="ltr"> When I go to reproduce this, will I need a special
branch of the CTS?</p>
</blockquote>
<br>
Nothing really special. I used gl45 tarball with some minor local
changes that are related to help it to properly built, not on the
tests themselves.<br>
<br>
BR<br>
<blockquote
cite="mid:CAOFGe94-z3syHi8MZ1T3j6Sz31_nexPMZt8v-R85tH0-gDTybg@mail.gmail.com"
type="cite">
<p dir="ltr">--Jason</p>
<p dir="ltr">> On 14/07/16 02:16, Jason Ekstrand wrote:<br>
> > Reviewed-by: Topi Pohjolainen <<a
moz-do-not-send="true"
href="mailto:topi.pohjolainen@intel.com"><a class="moz-txt-link-abbreviated" href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a></a>><br>
> > ---<br>
> > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 94
+-----------------------<br>
> > 1 file changed, 1 insertion(+), 93 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 084bd8c..01c9802 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>
> > @@ -550,98 +550,6 @@
brw_update_buffer_texture_surface(struct gl_context *ctx,<br>
> > false /* rw
*/);<br>
> > }<br>
> ><br>
> > -static void<br>
> > -gen4_update_texture_surface(struct gl_context *ctx,<br>
> > - unsigned unit,<br>
> > - uint32_t *surf_offset,<br>
> > - bool for_gather,<br>
> > - uint32_t plane)<br>
> > -{<br>
> > - struct brw_context *brw = brw_context(ctx);<br>
> > - struct gl_texture_object *tObj =
ctx->Texture.Unit[unit]._Current;<br>
> > - struct intel_texture_object *intelObj =
intel_texture_object(tObj);<br>
> > - struct intel_mipmap_tree *mt = intelObj->mt;<br>
> > - struct gl_sampler_object *sampler =
_mesa_get_samplerobj(ctx, unit);<br>
> > - uint32_t *surf;<br>
> > -<br>
> > - /* BRW_NEW_TEXTURE_BUFFER */<br>
> > - if (tObj->Target == GL_TEXTURE_BUFFER) {<br>
> > - brw_update_buffer_texture_surface(ctx, unit,
surf_offset);<br>
> > - return;<br>
> > - }<br>
> > -<br>
> > - if (plane > 0) {<br>
> > - if (mt->plane[plane - 1] == NULL)<br>
> > - return;<br>
> > - mt = mt->plane[plane - 1];<br>
> > - }<br>
> > -<br>
> > - surf = brw_state_batch(brw,
AUB_TRACE_SURFACE_STATE,<br>
> > - 6 * 4, 32, surf_offset);<br>
> > -<br>
> > - mesa_format mesa_fmt = plane == 0 ?
intelObj->_Format : mt->format;<br>
> > - uint32_t tex_format = translate_tex_format(brw,
mesa_fmt,<br>
> > -
sampler->sRGBDecode);<br>
> > -<br>
> > - if (for_gather) {<br>
> > - /* Sandybridge's gather4 message is broken for
integer formats.<br>
> > - * To work around this, we pretend the surface
is UNORM for<br>
> > - * 8 or 16-bit formats, and emit shader
instructions to recover<br>
> > - * the real INT/UINT value. For 32-bit
formats, we pretend<br>
> > - * the surface is FLOAT, and simply reinterpret
the resulting<br>
> > - * bits.<br>
> > - */<br>
> > - switch (tex_format) {<br>
> > - case BRW_SURFACEFORMAT_R8_SINT:<br>
> > - case BRW_SURFACEFORMAT_R8_UINT:<br>
> > - tex_format = BRW_SURFACEFORMAT_R8_UNORM;<br>
> > - break;<br>
> > -<br>
> > - case BRW_SURFACEFORMAT_R16_SINT:<br>
> > - case BRW_SURFACEFORMAT_R16_UINT:<br>
> > - tex_format = BRW_SURFACEFORMAT_R16_UNORM;<br>
> > - break;<br>
> > -<br>
> > - case BRW_SURFACEFORMAT_R32_SINT:<br>
> > - case BRW_SURFACEFORMAT_R32_UINT:<br>
> > - tex_format = BRW_SURFACEFORMAT_R32_FLOAT;<br>
> > - break;<br>
> > -<br>
> > - default:<br>
> > - break;<br>
> > - }<br>
> > - }<br>
> > -<br>
> > - surf[0] = (translate_tex_target(tObj->Target)
<< BRW_SURFACE_TYPE_SHIFT |<br>
> > - BRW_SURFACE_MIPMAPLAYOUT_BELOW <<
BRW_SURFACE_MIPLAYOUT_SHIFT |<br>
> > - BRW_SURFACE_CUBEFACE_ENABLES |<br>
> > - tex_format <<
BRW_SURFACE_FORMAT_SHIFT);<br>
> > -<br>
> > - surf[1] = mt->bo->offset64 + mt->offset;
/* reloc */<br>
> > -<br>
> > - surf[2] = ((intelObj->_MaxLevel -
tObj->BaseLevel) << BRW_SURFACE_LOD_SHIFT |<br>
> > - (mt->logical_width0 - 1) <<
BRW_SURFACE_WIDTH_SHIFT |<br>
> > - (mt->logical_height0 - 1) <<
BRW_SURFACE_HEIGHT_SHIFT);<br>
> > -<br>
> > - surf[3] =
(brw_get_surface_tiling_bits(mt->tiling) |<br>
> > - (mt->logical_depth0 - 1) <<
BRW_SURFACE_DEPTH_SHIFT |<br>
> > - (mt->pitch - 1) <<
BRW_SURFACE_PITCH_SHIFT);<br>
> > -<br>
> > - const unsigned min_lod = tObj->MinLevel +
tObj->BaseLevel - mt->first_level;<br>
> > - surf[4] =
(brw_get_surface_num_multisamples(mt->num_samples) |<br>
> > - SET_FIELD(min_lod, BRW_SURFACE_MIN_LOD)
|<br>
> > - SET_FIELD(tObj->MinLayer,
BRW_SURFACE_MIN_ARRAY_ELEMENT));<br>
> > -<br>
> > - surf[5] = mt->valign == 4 ?
BRW_SURFACE_VERTICAL_ALIGN_ENABLE : 0;<br>
> > -<br>
> > - /* Emit relocation to surface contents */<br>
> > - drm_intel_bo_emit_reloc(brw-><a
moz-do-not-send="true" href="http://batch.bo">batch.bo</a>,<br>
> > - *surf_offset + 4,<br>
> > - mt->bo,<br>
> > - surf[1] -
mt->bo->offset64,<br>
> > - I915_GEM_DOMAIN_SAMPLER,
0);<br>
> > -}<br>
> > -<br>
> > /**<br>
> > * Create the constant buffer surface.
Vertex/fragment shader constants will be<br>
> > * read from this buffer with Data Port Read
instructions/messages.<br>
> > @@ -1678,7 +1586,7 @@ const struct brw_tracked_state
brw_wm_image_surfaces = {<br>
> > void<br>
> > gen4_init_vtable_surface_functions(struct brw_context
*brw)<br>
> > {<br>
> > - brw->vtbl.update_texture_surface =
gen4_update_texture_surface;<br>
> > + brw->vtbl.update_texture_surface =
brw_update_texture_surface;<br>
> > brw->vtbl.update_renderbuffer_surface =
gen4_update_renderbuffer_surface;<br>
> > brw->vtbl.emit_null_surface_state =
brw_emit_null_surface_state;<br>
> > brw->vtbl.emit_buffer_surface_state =
gen4_emit_buffer_surface_state;<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a moz-do-not-send="true"
href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a moz-do-not-send="true"
href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>
</blockquote>
<br>
</body>
</html>