[Mesa-dev] [PATCH 3/5] i965: disable repacking for compression for applicable gen

Anuj Phogat anuj.phogat at gmail.com
Mon Jul 1 22:36:18 UTC 2019


On Thu, Jun 27, 2019 at 9:55 AM Dongwon Kim <dongwon.kim at intel.com> wrote:
>
> set bit15 (Disable Rebacking for Compression) of CACHE_MODE_0 register
Disable Repacking
> if the gen attribute, 'disable_ccs_repack' is set.
>
> Signed-off-by: Dongwon Kim <dongwon.kim at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_defines.h      | 1 +
>  src/mesa/drivers/dri/i965/brw_state_upload.c | 9 +++++++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
> index 17bca1991f1..e8507b7e5ff 100644
> --- a/src/mesa/drivers/dri/i965/brw_defines.h
> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> @@ -1576,6 +1576,7 @@ enum brw_pixel_shader_coverage_mask_mode {
>  # define GEN9_PARTIAL_RESOLVE_DISABLE_IN_VC (1 << 1)
>  # define GEN8_HIZ_PMA_MASK_BITS \
>     REG_MASK(GEN8_HIZ_NP_PMA_FIX_ENABLE | GEN8_HIZ_NP_EARLY_Z_FAILS_DISABLE)
> +# define GEN11_DISABLE_REPACKING_FOR_COMPRESSION (1 << 15)
>
>  #define GEN7_GT_MODE                    0x7008
>  # define GEN9_SUBSLICE_HASHING_8x8      (0 << 8)
> diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
> index 938b9defeda..09303600308 100644
> --- a/src/mesa/drivers/dri/i965/brw_state_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
> @@ -121,6 +121,15 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
>                                 REG_MASK(GEN11_STATE_CACHE_REDIRECT_TO_CS_SECTION_ENABLE));
>     }
>
> +   /* hardware specification recommends disabling repacking for
> +    * the compatibility with decompression mechanism in display controller.
> +    */
> +   if (devinfo->disable_ccs_repack) {
> +      brw_load_register_imm32(brw, GEN7_CACHE_MODE_0,
> +                              GEN11_DISABLE_REPACKING_FOR_COMPRESSION |
> +                              REG_MASK(GEN11_DISABLE_REPACKING_FOR_COMPRESSION));
> +   }
> +
>     if (devinfo->gen == 10 || devinfo->gen == 11) {
>        /* From gen10 workaround table in h/w specs:
>         *
> --
> 2.17.1
>


More information about the mesa-dev mailing list