Mesa (master): i965: Reduce passing 2x32b of reloc_domains to 2 bits
Kenneth Graunke
kwg at kemper.freedesktop.org
Fri Aug 4 18:45:34 UTC 2017
Module: Mesa
Branch: master
Commit: 6c530ad1160518d9f035da4aba5a9d4df7369972
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c530ad1160518d9f035da4aba5a9d4df7369972
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Jul 21 16:36:52 2017 +0100
i965: Reduce passing 2x32b of reloc_domains to 2 bits
The kernel only cares about whether the object is to be written to or
not, only reduces (reloc.read_domains, reloc.write_domain) down to just
!!reloc.write_domain. When we use NO_RELOC, the kernel doesn't even read
those relocs and instead userspace has to pass that information in the
execobject.flags. We can simplify our reloc api by also removing the
unused read/write domains and only pass the resultant flags.
The caveat to the above are when we need to make the kernel aware that
certain objects need to take into account different work arounds.
Previously, this was done using the magic (INSTRUCTION, INSTRUCTION)
reloc domains. NO_RELOC requires this to be passed in the execobject
flags as well, and now we push that up the callstack.
The API is more compact, more expressive of what happens underneath, but
unfortunately requires more knowledge of the system at the point of use.
Conversely it also means that knowledge is specific and not generally
applied and so not overused.
text data bss dec hex filename
8502991 356912 424944 9284847 8dacef lib/i965_dri.so (before)
8500455 356912 424944 9282311 8da307 lib/i965_dri.so (after)
v2: (by Ken) Rebase.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/intel/blorp/blorp.h | 3 +-
src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 +-
src/mesa/drivers/dri/i965/brw_blorp.c | 8 +--
src/mesa/drivers/dri/i965/brw_compute.c | 24 +++------
src/mesa/drivers/dri/i965/brw_conditional_render.c | 14 +----
src/mesa/drivers/dri/i965/brw_context.h | 3 +-
src/mesa/drivers/dri/i965/brw_curbe.c | 3 +-
src/mesa/drivers/dri/i965/brw_draw.c | 7 ---
src/mesa/drivers/dri/i965/brw_misc_state.c | 51 +++++++-----------
src/mesa/drivers/dri/i965/brw_pipe_control.c | 12 ++---
src/mesa/drivers/dri/i965/brw_state.h | 2 +-
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 47 ++++++++---------
src/mesa/drivers/dri/i965/gen4_blorp_exec.h | 4 --
src/mesa/drivers/dri/i965/gen6_depth_state.c | 12 ++---
src/mesa/drivers/dri/i965/gen7_misc_state.c | 13 ++---
src/mesa/drivers/dri/i965/gen7_sol_state.c | 8 +--
src/mesa/drivers/dri/i965/gen8_depth_state.c | 9 ++--
src/mesa/drivers/dri/i965/genX_blorp_exec.c | 7 +--
src/mesa/drivers/dri/i965/genX_state_upload.c | 24 +++------
src/mesa/drivers/dri/i965/hsw_queryobj.c | 43 +++------------
src/mesa/drivers/dri/i965/hsw_sol.c | 12 +----
src/mesa/drivers/dri/i965/intel_batchbuffer.c | 61 ++++++++--------------
src/mesa/drivers/dri/i965/intel_batchbuffer.h | 20 +++----
src/mesa/drivers/dri/i965/intel_blit.c | 32 +++---------
24 files changed, 128 insertions(+), 293 deletions(-)
Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=6c530ad1160518d9f035da4aba5a9d4df7369972
More information about the mesa-commit
mailing list