On Tue, Oct 4, 2016 at 8:55 AM, Tapani Pälli <tapani.pa...@intel.com> wrote:
> On 10/04/2016 06:09 PM, Jason Ekstrand wrote: > > On Thu, Sep 29, 2016 at 11:27 PM, Xu,Randy <randy...@intel.com> wrote: > >> Add the miptree level/slice x/y_offset when count the surface offset >> in brw_emit_surface_state. The surface offset has two parts, one is >> from mt->offset, which should be 32 aligned in width/height for tiled >> buffer; another is from mt->level[current_level].slice[current_slice]. >> x/y_offset. >> >> This fix will solve 12 deqp failure >> dEQP-EGL.functional.image.create.gles2_cubemap_negative_*_texture >> >> Signed-off-by: Xu,Randy <randy...@intel.com> >> --- >> src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c >> b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c >> index 61a4b94..3a5c573 100644 >> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c >> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c >> @@ -85,7 +85,8 @@ brw_emit_surface_state(struct brw_context *brw, >> unsigned read_domains, unsigned write_domains) >> { >> const struct surface_state_info ss_info = >> surface_state_infos[brw->gen]; >> - uint32_t tile_x = 0, tile_y = 0; >> + uint32_t tile_x = mt->level[0].slice[0].x_offset; >> + uint32_t tile_y = mt->level[0].slice[0].y_offset; >> > > This isn't correct. First off, there are some fairly strict restrictions > on what we can do with tile_x and tile_y and we can't just shove x/y_offset > in there. We need to use intel_miptree_get_tile_offsets to get both a byte > offset and an intratile offset. Second, we should already be taking slices > into account for cube maps via base_array_layer where needed. > > Unfortunately, I'm not 100% sure what the correct patch is without a bit > more information about what the test is doing that causes a problem. > > > I did take a brief look and when running the set mentioned above (for > example with ./deqp-egl --deqp-case=*EGL.functional. > image.create.gles2_cubemap_negative_*_texture) what happens is that we > never end up to the part of code calling intel_miptree_get_tile_offsets in > that function (because surf.dim_layout != dim_layout condition does not > trigger). This is just what I observed, should we just call > intel_miptree_get_tile_offsets() unconditionally then? > No. Very much no. The intel_miptree_get_tile_offsets() stuff is a hack that lets us convert non-2D things to 2D things and it comes with piles of restrictions. > > --Jason > > >> uint32_t offset = mt->offset; >> >> struct isl_surf surf; >> -- >> 2.7.4 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev >> > > > > _______________________________________________ > mesa-dev mailing > listmesa-dev@lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/mesa-dev > > >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev