mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 16:40:13 +01:00
i965: Use BDW_MOCS_PTE for renderbuffers.
Write-back caching cannot be used for buffers being scanned out by the display engine; surfaces used for scan-out must be write-through or uncached. I originally chose WT for render targets because it works in all cases. However, we really want to use write-back caching where possible, as it is more efficient. Most renderbuffers are not used for scanout - off-screen FBOs certainly are fine, and non-pageflipped backbuffers should be fine as well. So in most cases WB will work. However, we don't know what will be used for scan-out, so we instead simply use the PTE value specified by the kernel, as it knows these things. This matches our MOCS choice on Haswell. Fixes performance regressions since commitee4484be3din a microbenchmark (spotted by Eero Tamminen). Improves performance in GLBenchmark 2.7/EgyptHD by 7.44362% +/- 0.496939% (n=55) on a Broadwell GT2. Improves performance in a bunch of other microbenchmarks by ~15% or so. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reported-by: Eero Tamminen <eero.t.tamminen@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commitb7844d1248)
This commit is contained in:
parent
85d7eb730a
commit
5e6ee119c0
1 changed files with 1 additions and 1 deletions
|
|
@ -377,7 +377,7 @@ gen8_update_renderbuffer_surface(struct brw_context *brw,
|
|||
horizontal_alignment(mt) |
|
||||
surface_tiling_mode(tiling);
|
||||
|
||||
surf[1] = SET_FIELD(BDW_MOCS_WT, GEN8_SURFACE_MOCS) | mt->qpitch >> 2;
|
||||
surf[1] = SET_FIELD(BDW_MOCS_PTE, GEN8_SURFACE_MOCS) | mt->qpitch >> 2;
|
||||
|
||||
surf[2] = SET_FIELD(width - 1, GEN7_SURFACE_WIDTH) |
|
||||
SET_FIELD(height - 1, GEN7_SURFACE_HEIGHT);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue