[Mesa-dev] [PATCH 2/2] intel/isl/gen4: Make depth/stencil buffers Y-Tiled

Kenneth Graunke kenneth at whitecape.org
Tue Jul 17 20:29:26 UTC 2018


On Tuesday, July 17, 2018 10:45:28 AM PDT Nanley Chery wrote:
> On Tue, Jul 17, 2018 at 08:19:30AM -0700, Kenneth Graunke wrote:
> > Wow, I had no idea we were actually using linear depth buffers.
> 
> Neither did I until Mark let me know that I regressed some tests after
> landing commit fbe01625f6bf2cef6742e1ff0d3d44a2afec003e. Whoops!
> 
> I've included the Bugzilla tag locally.
> https://bugs.freedesktop.org/show_bug.cgi?id=107248
> 
> > Is there any compelling reason to use them?  I can't think of one.
> > 
> 
> Yes. They give us the best performance and memory usage for 1D textures
> (see isl_surf_choose_tiling()).

While 1D depth textures are certainly supported, I don't think I have
ever seen one.  shader-db has no instances of them in any shader.

It doesn't make much sense...when you use a depth buffer, you draw
objects in a scene and record their distance from the camera.  Doing
that with a 1D surface just seems...unlikely?

> > Y-tiling should offer better performance.  PBO upload needs to be
> > done with a R32_UINT format anyway, as R24_X8 isn't renderable.
> > 
> 
> I don't understand how the PBO format comes into play here. Care to
> elaborate?

PBO upload/download of texture data uses linear buffers.  I was thinking
of glTexImage2D with data in a PBO.  Not sure if you can do that with
depth...

> > I'm pretty sure that we used to always use Y-tiling in the old
> > miptree code...maybe this regressed when we switched to ISL?
> 
> Yeah, we did always use Y-tiling. I caused the regression when I pushed
> that commit.
> 
> > The hardware timeline looks like:
> > 
> >    BROKEN     /-------------- Works??? -----------\    DISALLOWED
> > [Broadwater, Crestline, Eaglelake, Cantiga, Ironlake, Sandybridge, ...]
> > 
> > Given that it was broken and ultimately became disallowed, I'm a bit
> > skeptical whether it really works, or is useful, in the meantime.
> > 
> 
> It seems to work. We're getting testing from these piglit tests:
> * piglit.spec.arb_shader_texture_lod.execution.tex-miplevel-selection *projgradarb 1dshadow
> * piglit.spec.arb_shader_texture_lod.execution.tex-miplevel-selection *gradarb 1dshadow
> * piglit.spec.arb_shader_texture_lod.execution.tex-miplevel-selection *lod 1dshadow
> * piglit.spec.!opengl 1_1.copyteximage 1d
> * piglit.spec.ext_texture_array.copyteximage 1d_array
> * piglit.spec.arb_shader_texture_lod.execution.tex-miplevel-selection *projlod 1dshadow
> 
> On ILK and g45 they go from fail->pass with the last patch. But g965
> needed the linear option removed completely.

I guess if it's working and useful for 1D, while being basically no
code, we can do it, but...I have a real hard time caring about 1D depth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180717/13ac5828/attachment.sig>


More information about the mesa-dev mailing list