<div dir="ltr">For those of you who like branches. The whole series can be found here:<br><br><a href="https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/i965-isl-v1">https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/i965-isl-v1</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 11, 2016 at 9:02 AM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We would like to eventually start using ISL inside of the GL driver to<br>
replace the fairly sprawling layout code in brw_tex_layout.c and<br>
intel_mipmap_tree.c. However, that is a very big change that no one is<br>
ready to make yet. A smaller change, I thought, would be to start using<br>
ISL in blorp. In order to do that, I needed a function to get an isl_surf<br>
from an intel_mipmap_tree. How do you test such a function to ensure that<br>
it's working in all of the cases? Use ISL for emitting all surface states<br>
on everything and run it through Jenkins of course! Hence this series.<br>
<br>
This series is one of the most educational projects I've worked on in a<br>
bit. It turns out there are a lot of subtlties in surface layout and I<br>
found bugs in both the i965 and ISL state setup code. I've tried to keep<br>
all of the functional changes contained to the first 8 or so patches which<br>
only touch the GL driver. That way those fixes can be back-ported to<br>
stable and are bisectable.<br>
<br>
The next 20 patches or so are general ISL cleanups and fixes. If no one is<br>
too opposed, I'd like to back-port the whole pile to 12.0. There are two<br>
reasons for this: First, ISL is new and this is a substantial cleanup;<br>
back-porting it will make back-porting will keep the initial release of ISL<br>
cleaner and make back-porting other patches easier in the future. Second,<br>
in the middle of the series are a couple of changes that fix some 850<br>
Vulkan CTS tests on Haswell.<br>
<br>
The next 9 patches add support to ISL for filling out surface states on<br>
gen4, 4x, 5, and 6 as well as support for color compression. I'm not sure<br>
if the CCS formats are 100% correct or of that's even the exact approach we<br>
want to take. Chad, I'd like you to chip in here.<br>
<br>
Finally, starting with blorp, we replace almost all of the surface state<br>
setup code in i965 with paths based on ISL. For textures/renderbuffers we<br>
delete 1 path for gen4-5, 3 for gen6, 4 for gen7, and 3 for gen8 along with<br>
3 different paths for emitting buffer surfaces.<br>
<br>
As far as review goes, I'd like to get the i965 bugfixes and ISL cleanups<br>
landed soon-ish and back-ported for 12.0. Everything after that is a bit<br>
more up-in-the-air. It won't be all that hard to rebase because it's mosly<br>
just whole-sale replacing the code we have with new code.<br>
<br>
Cc: Chad Versace <<a href="mailto:chad.versace@intel.com">chad.versace@intel.com</a>><br>
Cc: Nanley Chery <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>><br>
Cc: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
Cc: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
<br>
Jason Ekstrand (64):<br>
i965: Drop Max3DTextureLevels to 512 on Sandy Bridge and prior<br>
i965/blorp/gen8: Use the correct max level and layer in<br>
emit_surface_states<br>
i965/gen8: Use the qpitch from the aux_mt for AUX_QPITCH<br>
i965/fs: Use a default Y coordinate of 0 for TXF on gen9+<br>
i965: Remove fake W-tiled render target support<br>
i965/gen4: Subtract 1 from buffer sizes<br>
i965/gen7,8: Set SURFACE_IS_ARRAY for all non-3D texture types<br>
i965/blorp: Only set src_z for gen8+ 3D textures<br>
genxml/gen8,9: Prefix the multisample format enum with MSFMT<br>
isl/state: Don't use designated initializers for the surface state<br>
isl/state: Remove some unused fields<br>
isl/state: Put surface format setup at the top<br>
isl/state: Put all dimension setup together and towards the top<br>
isl/state: Put pitch calculations together<br>
isl/state: Return an extent3d from the halign/valign helper<br>
isl/state: Refactor the per-gen isl_to_gen_h/valign tables<br>
isl/state: Refactor the setup of clear colors<br>
isl/state: Don't force-disable L2 bypass for everything<br>
isl/state: Set SurfaceArray based on the surface dimension<br>
isl/format: Mark R9G9B9E5 as containing 9-bit unsigned float channels<br>
isl/state: Set the IntegerSurfaceFormat bit on Haswell<br>
isl/state: Use the layout for computing qpitch rather than dimensions<br>
isl/state: Only set cube face enables if usage includes CUBE_BIT<br>
isl/state: Emit no-op mip tail setup on SKL<br>
isl/state: Use TILEWALK_XMAJOR for linear surfaces on gen7<br>
isl/state: Don't set SurfacePitch for gen9 1-D textures<br>
isl/state: Add assertions for buffer surface restrictions<br>
isl/state: Don't use designated initializers for buffer surface state<br>
isl/state: Allow for full 31-bit buffer texture sizes<br>
anv,isl: Lower storage image formats in anv<br>
genxml: Put append counter fields before MCS in RENDER_SURFACE_STATE<br>
on gen7<br>
genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE<br>
genxml: Make X/Y Offset field of SURFACE_STATE a uint<br>
genxml: Add macros and #includes for gens 4-6<br>
isl: Add an ISL_DEV_IS_G4X macro<br>
isl: Add support for filling out surface states all the way back to<br>
gen4<br>
isl: Add surface formats for on-MSAA CCS surfaces<br>
isl/state: Add support for handling color control surfaces<br>
isl/state: Add support for OffsetX/Y in surface state<br>
i965/miptree: Add a helper for getting an isl_surf from a miptree<br>
i965/miptree: Add a helper for getting the ISL clear color from a<br>
miptree<br>
i965/miptree: Add a helper for getting the aux isl_surf from a miptree<br>
i965/blorp: Add a generic ISL-based surface state emit path<br>
i965/blorp: Use the generic ISL path for renderbuffer surfaces on<br>
gen8-9<br>
i965/blorp: Use the generic ISL path for renderbuffer surfaces on gen7<br>
i965/blorp: Use the generic ISL path for texture surfaces on gen7<br>
i965/blorp: Use the generic ISL path for renderbuffer surfaces on gen6<br>
i965/blorp: Use the generic ISL path for texture surfaces on gen6<br>
i965/state: Add a helper for emitting a surface state using isl<br>
i965/blorp: Use a generic ISL path for texture surfaces on gen8<br>
i965/state: Use ISL for emitting image surfaces<br>
i965/surface_state: Rename brw_update to gen4_update<br>
i965/state: Add generic surface update functions based on ISL<br>
i965/gen8: Use the generic ISL-based path for texture surfaces<br>
i965/gen8: Use the generic ISL-based path for renderbuffer surfaces<br>
i965/gen7: Use the generic ISL-based path for texture surfaces<br>
i965/gen7: Use the generic ISL-based path for renderbuffer surfaces<br>
i965/gen6: Use the generic ISL-based path for renderbuffer surfaces<br>
i965/gen4-6: Use the generic ISL-based path for texture surfaces<br>
isl/formats: Mark RAW as having a block size of 1 byte<br>
i965/state: Account for the element size in emit_buffer_surface_state<br>
i965: Use ISL for emitting buffer surface states<br>
i965: Get rid of gen6_surface_state.c<br>
i965/context: Remove some unnecessary vfuncs<br>
<br>
src/intel/genxml/Makefile.am | 3 +<br>
src/intel/genxml/Makefile.sources | 3 +<br>
src/intel/genxml/gen4.xml | 52 +++<br>
src/intel/genxml/gen45.xml | 56 +++<br>
src/intel/genxml/gen5.xml | 56 +++<br>
src/intel/genxml/gen6.xml | 4 +-<br>
src/intel/genxml/gen7.xml | 8 +-<br>
src/intel/genxml/gen75.xml | 8 +-<br>
src/intel/genxml/gen8.xml | 8 +-<br>
src/intel/genxml/gen9.xml | 8 +-<br>
src/intel/genxml/genX_pack.h | 10 +-<br>
src/intel/genxml/gen_macros.h | 15 +-<br>
src/intel/isl/Makefile.am | 12 +<br>
src/intel/isl/Makefile.sources | 13 +-<br>
src/intel/isl/isl.c | 28 ++<br>
src/intel/isl/isl.h | 29 ++<br>
src/intel/isl/isl_format_layout.csv | 13 +-<br>
src/intel/isl/isl_priv.h | 24 +<br>
src/intel/isl/isl_surface_state.c | 462 +++++++++++--------<br>
src/intel/vulkan/anv_image.c | 3 +<br>
src/mesa/drivers/dri/i965/Makefile.sources | 1 -<br>
src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 +-<br>
src/mesa/drivers/dri/i965/brw_blorp.c | 146 ++++++<br>
src/mesa/drivers/dri/i965/brw_blorp.h | 6 +<br>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 11 +-<br>
src/mesa/drivers/dri/i965/brw_context.c | 5 +-<br>
src/mesa/drivers/dri/i965/brw_context.h | 25 -<br>
src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +<br>
src/mesa/drivers/dri/i965/brw_state.h | 55 ++-<br>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 532 ++++++++++++++--------<br>
src/mesa/drivers/dri/i965/gen6_blorp.c | 83 +---<br>
src/mesa/drivers/dri/i965/gen6_surface_state.c | 146 ------<br>
src/mesa/drivers/dri/i965/gen7_blorp.c | 105 +----<br>
src/mesa/drivers/dri/i965/gen7_cs_state.c | 2 +-<br>
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 408 +----------------<br>
src/mesa/drivers/dri/i965/gen8_blorp.c | 147 ++----<br>
src/mesa/drivers/dri/i965/gen8_surface_state.c | 509 +--------------------<br>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 265 ++++++++++-<br>
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 14 +<br>
39 files changed, 1474 insertions(+), 1805 deletions(-)<br>
create mode 100644 src/intel/genxml/gen4.xml<br>
create mode 100644 src/intel/genxml/gen45.xml<br>
create mode 100644 src/intel/genxml/gen5.xml<br>
delete mode 100644 src/mesa/drivers/dri/i965/gen6_surface_state.c<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>