From: Kenneth Graunke Date: Thu, 14 Feb 2019 16:55:37 +0000 (-0800) Subject: anv: Put MOCS in the correct location X-Git-Tag: upstream/19.3.0~9810 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39aee57523a02552e7eae7df5da488e535aeb1eb;p=platform%2Fupstream%2Fmesa.git anv: Put MOCS in the correct location My patch to switch from struct-based MOCS to numeric MOCS accidentally divided all MOCS entries by 2 in the Vulkan driver. MOCS on Gen9+ is just an array index into a table. But in the hardware packets, the index starts at bit 1. So we need to shift it. Fixes: 0b44644ca68 (genxml: Consistently use a numeric "MOCS" field) Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 60da96a..faa2d9a 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1455,10 +1455,10 @@ _anv_combine_address(struct anv_batch *batch, void *location, */ /* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */ -#define GEN9_MOCS 2 +#define GEN9_MOCS (2 << 1) /* TC=LLC/eLLC, LeCC=WB, LRUM=3, L3CC=WB */ -#define GEN9_EXTERNAL_MOCS 1 +#define GEN9_EXTERNAL_MOCS (1 << 1) /* Cannonlake MOCS defines are duplicates of Skylake MOCS defines. */ #define GEN10_MOCS GEN9_MOCS