This is one more series on the way to making blorp generic enough to be shared between the two drivers.
The way blorp works right now is that it takes a pair of miptrees and records a set of tweaks to those miptrees in a side data structure. At the last moment, when it goes to emit RENDER_SURFACE_STATE, it applies those changes. This series changes things so that it stars with an isl_surf and then modifies it as needed; by RENDER_SURFACE_STATE emit time, the isl_surf contains exactly what you want. This series also changes blorp to use base array slice and base miplevel wherever possible. Previously, on everything other than gen8+ textures, blorp always byte and tile x/y offsets to get at the particular miplevel and array slice. This series makes it use offset and other surface hacks as a last resort only when needed. This actually ends up fixing a few tests on gen7 and prevents us from doing illegal things on IVB. While I like the end result (and will like it more once I get it generalized further), I don't like the patch series. A lot of stuff seems out-of-order and hard to explain because it's a fairly fundamental change. However, I do believe that it's in more-or-less the right order mostly regression-free (no, I haven't run Jenkins on every commit). This series is available here: https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/blorp-isl Jason Ekstrand (36): isl: Fix the parameter names for get_intratile_offset i965/miptree: Remove the stencil_as_y_tiled parameter from get_tile_masks isl/state: Use a valid alignment for 1-D textures i965: Add an isl_device to the brw_context i965/blorp/clear: Initialize surface info after allocating an MCS i965/blorp: Create the isl_surf up-front i965/blorp: Remove compute_tile_offsets i965/blorp: Get rid of brw_blorp_surface_info::map_stencil_as_y_tiled i965/blorp: Make sample count asserts a bit more lazy i965/blorp: Get rid of brw_blorp_surface_info::num_samples i965/blorp: Use the ISL aux_layout for deciding whether to do an MCS fetch i965/blorp: Use isl_msaa_layout instead of intel_msaa_layout i965/blorp: Get rid of brw_blorp_surface_info::array_layout i965/blorp: Refactor interleaved multisample destination handling i965/blorp: Move intratile offset calculations out of surface state setup i965/blorp: Add an isl_view to blorp_surface_info isl: Fix get_image_offset_sa_gen4_2d for multisample surfaces isl: Add functions for computing surface offsets in samples i965/blorp: Use ISL to compute image offsets i965/blorp: Move surface offset calculations into a helper i965/blorp: Get rid of brw_blorp_surface_info::width/height i965/blorp: Use the isl_view from the blorp_surface_info isl: Use logical width/height for computing physical slice0 extent i965/miptree: Fill out the isl_surf::usage field i965/blorp: Map 1-D render targets with DIM_LAYOUT_GEN4_2D as 2D on gen9 i965/blorp: Rework hiz rect alignment calculations i965/blorp: Pass the Z component into all texture operations i965/blorp: Add a z_offset field to blorp_surface_info i965/blorp: Only do offset hacks for fake W-tiling and IMS isl: Add asserts for gen8+ X/YOffset rules i965/blorp: Use the generic surface state path for gen8 textures i965/blorp: Simplify depth buffer state setup a bit i965/blorp: Remove unused fields from blorp_surface_info isl: Add enum conversions that assert on invalid enums isl: Add a #define for DEV_IS_BAYTRAIL isl/state: Add an assertion for IVB multisample array textures src/intel/isl/isl.c | 76 ++-- src/intel/isl/isl.h | 58 ++- src/intel/isl/isl_surface_state.c | 149 ++++--- src/mesa/drivers/dri/i965/brw_blorp.c | 297 +++++++------- src/mesa/drivers/dri/i965/brw_blorp.h | 112 +----- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 469 +++++++++++++---------- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 12 +- src/mesa/drivers/dri/i965/brw_context.c | 2 + src/mesa/drivers/dri/i965/brw_context.h | 4 + src/mesa/drivers/dri/i965/brw_misc_state.c | 6 +- src/mesa/drivers/dri/i965/brw_state.h | 8 - src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 14 +- src/mesa/drivers/dri/i965/gen6_blorp.c | 44 +-- src/mesa/drivers/dri/i965/gen7_blorp.c | 48 +-- src/mesa/drivers/dri/i965/gen8_blorp.c | 73 +--- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 30 +- src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 1 - 17 files changed, 704 insertions(+), 699 deletions(-) -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev