[Mesa-dev] [PATCH 0/5] intel/isl: Set MOCS based on view usage

Jason Ekstrand jason at jlekstrand.net
Tue Aug 29 23:01:01 UTC 2017


On August 29, 2017 3:00:51 PM Kenneth Graunke <kenneth at whitecape.org> wrote:

> On Tuesday, August 1, 2017 3:48:29 PM PDT Jason Ekstrand wrote:
>> This little series changes things around so that, instead of passing MOCS
>> values into ISL, ISL knows how to set them itself.  This allows us to
>> centralize some of the decisions about how MOCS gets set for surfaces and
>> hopefully, if we ever do anything crazy in the future, we can share it
>> between GL and Vulkan.  Unfortunately, surfaces are not the only places
>> where MOCS is used.  It also shows up in vertex buffers, index buffers, and
>> streamout buffers.  However those are always set to the platform equivalent
>> of I915_MOCS_CACHED (and that's not all that liable to change) so they're
>> not particularly interesting.
>>
>> If people like this approach, I'd like to Cc it to stable for 17.2 because
>> it has the side-effect of making Vulkan MOCS a bit more sane.
>>
>> Jason Ekstrand (5):
>>   intel/isl: Set MOCS based on usage for surface states
>>   intel/blorp: Delete the MOCS plumbing
>>   i965: Stop passing MOCS information into ISL
>>   anv: Stop passing MOCS information into ISL
>>   intel/isl: Get rid of the mocs fields in fill/emit_info
>>
>>  src/intel/blorp/blorp.h                          |  6 ---
>>  src/intel/blorp/blorp_genX_exec.h                | 37 +++++++++++------
>>  src/intel/isl/isl.h                              | 22 ----------
>>  src/intel/isl/isl_emit_depth_stencil.c           | 12 +++---
>>  src/intel/isl/isl_genX_mocs.h                    | 53 ++++++++++++++++++++++++
>>  src/intel/isl/isl_surface_state.c                |  9 ++--
>>  src/intel/vulkan/anv_blorp.c                     |  3 --
>>  src/intel/vulkan/anv_device.c                    |  1 -
>>  src/intel/vulkan/anv_image.c                     | 12 ++----
>>  src/intel/vulkan/anv_private.h                   |  2 -
>>  src/intel/vulkan/genX_cmd_buffer.c               | 13 ++----
>>  src/intel/vulkan/genX_state.c                    |  3 --
>>  src/mesa/drivers/dri/i965/brw_blorp.c            | 15 -------
>>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 26 ++----------
>>  14 files changed, 101 insertions(+), 113 deletions(-)
>>  create mode 100644 src/intel/isl/isl_genX_mocs.h
>>
>>
>
> I guess this is okay.  I'm not crazy about it, mostly because the logic is
> still spread out in a bunch of places.  If there was a vertex buffer usage
> bit and we could handle that there, I think that would be nice, even if it
> doesn't otherwise seem relevant to ISL.  *shrug*

Yeah, vertex buffers make this a bit awkward.  I wish there were a better 
way than scattering things around more.  I'm honestly not sure if this 
series improves the scattering or not.

> Having ISL do this itself rather than passing in values makes sense.
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>




More information about the mesa-dev mailing list