<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 29, 2016 at 3:03 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@intel.com" target="_blank">chad.versace@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu 23 Jun 2016, Jason Ekstrand wrote:<br>
> ---<br>
> src/intel/isl/isl.h | 21 +++++++++++++++++++++<br>
> src/intel/isl/isl_format_layout.csv | 14 ++++++++++++++<br>
> 2 files changed, 35 insertions(+)<br>
><br>
> diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h<br>
> index f2128d8..4aedb11 100644<br>
> --- a/src/intel/isl/isl.h<br>
> +++ b/src/intel/isl/isl.h<br>
> @@ -349,6 +349,27 @@ enum isl_format {<br>
> ISL_FORMAT_ASTC_LDR_2D_12X10_FLT16 = 638,<br>
> ISL_FORMAT_ASTC_LDR_2D_12X12_FLT16 = 639,<br>
><br>
> + /* The formats that follow are internal to ISL and as such don't have an<br>
> + * explicit number. We'll just let the C compiler assign it for us. Any<br>
> + * actual hardware formats *must* come before these in the list.<br>
> + */<br>
> +<br>
> + /* Formats for color compression surfaces */<br>
> + ISL_FORMAT_HIZ,<br>
> + ISL_FORMAT_MCS_2X,<br>
> + ISL_FORMAT_MCS_4X,<br>
> + ISL_FORMAT_MCS_8X,<br>
> + ISL_FORMAT_MCS_16X,<br>
> + ISL_FORMAT_GEN7_CCS_32BPP_X,<br>
> + ISL_FORMAT_GEN7_CCS_64BPP_X,<br>
> + ISL_FORMAT_GEN7_CCS_128BPP_X,<br>
> + ISL_FORMAT_GEN7_CCS_32BPP_Y,<br>
> + ISL_FORMAT_GEN7_CCS_64BPP_Y,<br>
> + ISL_FORMAT_GEN7_CCS_128BPP_Y,<br>
> + ISL_FORMAT_GEN9_CCS_32BPP,<br>
> + ISL_FORMAT_GEN9_CCS_64BPP,<br>
> + ISL_FORMAT_GEN9_CCS_128BPP,<br>
> +<br>
<br>
</div></div>The names look good to me.<br>
<span class=""><br>
> /* Hardware doesn't understand this out-of-band value */<br>
> ISL_FORMAT_UNSUPPORTED = UINT16_MAX,<br>
> };<br>
> diff --git a/src/intel/isl/isl_format_layout.csv b/src/intel/isl/isl_format_layout.csv<br>
> index f90fbe0..bf86b05 100644<br>
> --- a/src/intel/isl/isl_format_layout.csv<br>
> +++ b/src/intel/isl/isl_format_layout.csv<br>
> @@ -314,3 +314,17 @@ ASTC_LDR_2D_10X8_FLT16 , 128, 10, 8, 1, sf16, sf16, sf16, sf16, ,<br>
> ASTC_LDR_2D_10X10_FLT16 , 128, 10, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc<br>
> ASTC_LDR_2D_12X10_FLT16 , 128, 12, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc<br>
> ASTC_LDR_2D_12X12_FLT16 , 128, 12, 12, 1, sf16, sf16, sf16, sf16, , , , linear, astc<br>
> +HIZ , 128, 8, 4, 1, , , , , , , , ,<br>
<br>
</span>HIZ looks correct. Though, as we discussed, maybe 16x8 is the better<br>
choice. But 8x4 is good for now.<span class=""><br></span></blockquote><div><br></div><div>As mentioned on IRC, I'm pretty sure we need 8x4 with ISL_TILING_HIZ. Also, Nanley pointed out that we need different formats for multisampling on gen8 and prior. MSAA on gen9 should just be ISL_FORMAT_HIZ. We can talk about it more when you're actually in the office if that works better.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> +MCS_2X , 8, 1, 1, 1, , , , , , , , ,<br>
> +MCS_4X , 8, 1, 1, 1, , , , , , , , ,<br>
> +MCS_8X , 32, 1, 1, 1, , , , , , , , ,<br>
> +MCS_16X , 64, 1, 1, 1, , , , , , , , ,<br>
<br>
</span>MCS looks correct.<br>
<span class=""><br>
> +GEN7_CCS_32BPP_X , 8, 8, 4, 1, , , , , , , , ,<br>
> +GEN7_CCS_64BPP_X , 8, 4, 4, 1, , , , , , , , ,<br>
> +GEN7_CCS_128BPP_X , 8, 2, 4, 1, , , , , , , , ,<br>
> +GEN7_CCS_32BPP_Y , 8, 16, 2, 1, , , , , , , , ,<br>
> +GEN7_CCS_64BPP_Y , 8, 8, 2, 1, , , , , , , , ,<br>
> +GEN7_CCS_128BPP_Y , 8, 4, 2, 1, , , , , , , , ,<br>
> +GEN9_CCS_32BPP , 16, 16, 2, 1, , , , , , , , ,<br>
> +GEN9_CCS_64BPP , 16, 8, 2, 1, , , , , , , , ,<br>
> +GEN9_CCS_128BPP , 16, 4, 2, 1, , , , , , , , ,<br>
<br>
</span>The gen9 css layouts look very wrong.<br>
<br>
First, the compression ratio looks wrong. The Skylake PRM, Volume 12<br>
"Display", p159 says:<br>
<br>
The Color Control Surface (CCS) contains the compression status of the<br>
cache-line pairs. The compression state of the cache-line pair is<br>
specified by 2 bits in the CCS. Each CCS cache-line represents an<br>
area on the main surface of 16 x16 sets of 128 byte Y-tiled<br>
cache-line-pairs. CCS is always Y tiled.<br>
<br>
So, the memory compression ratio is actually<br>
<br>
Main / CCS = 2cl / 2b = 128B / 2b = 1024b / 2b = 512<br>
<br>
but the patch claims<br>
<br>
Main / CCS = 1024b / 16b = 64<br>
<br>
Second, how did you determine that the block layout was Nx2? I highly<br>
expected that the CCS compression block would comprise an entire<br>
CCS cacheline, and therefore the the block layout would be larger.<br>
<br>
I expected the CSV to look like below. PLEASE take my expectation with<br>
a hunk of salt. I'm not confident that the CCS block is a full CCS<br>
cacheline. However, the below table does preserve the memory ratio<br>
Main/CCS = 512.<br>
<br>
bpb, bw, bh, bd<br>
GEN9_CCS_32BPP 512, 128, 64, 1<br>
GEN9_CCS_64BPP 512, 64, 64, 1<br>
GEN9_CCS_128BPP 512, 32, 64, 1<br>
</blockquote></div><br></div><div class="gmail_extra">I'll just use that and we'll fix it when we get around to actually doing CCS.<br></div></div>