iris: Enable non coherent framebuffer fetch on broadwell
authorSagar Ghuge <sagar.ghuge@intel.com>
Tue, 16 Jul 2019 18:29:47 +0000 (11:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Aug 2019 07:50:58 +0000 (00:50 -0700)
v2: Use GEN_GEN in iris_state (Kenneth Graunke)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_state.c

index 90d7492f0e8cc48490abd36f0d36ba34cd4c135d..7a64951d0bd145b23b62b478a6df20cbc314f090 100644 (file)
@@ -2131,7 +2131,7 @@ iris_create_fs_state(struct pipe_context *ctx,
       struct brw_wm_prog_key key = {
          KEY_INIT(devinfo->gen),
          .nr_color_regions = util_bitcount(color_outputs),
-         .coherent_fb_fetch = true,
+         .coherent_fb_fetch = devinfo->gen >= 9,
          .input_slots_valid =
             can_rearrange_varyings ? 0 : info->inputs_read | VARYING_BIT_POS,
       };
index e92685d4ae67abc8606446892ed503fb2feb84b7..fa528a0d67ac4d070e2eff51083aa113eef356bf 100644 (file)
@@ -202,8 +202,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_SHADER_SAMPLES_IDENTICAL:
       return true;
    case PIPE_CAP_FBFETCH:
-      /* TODO: Support non-coherent FB fetch on Broadwell */
-      return devinfo->gen >= 9 ? BRW_MAX_DRAW_BUFFERS : 0;
+      return BRW_MAX_DRAW_BUFFERS;
    case PIPE_CAP_FBFETCH_COHERENT:
    case PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE:
    case PIPE_CAP_POST_DEPTH_COVERAGE:
index 98fe87c7f0681de4a7ef974ecf45383e901737aa..529165bafa938c9ae22dd499228793687e76bc94 100644 (file)
@@ -3624,7 +3624,7 @@ iris_populate_fs_key(const struct iris_context *ice,
    key->persample_interp = rast->force_persample_interp;
    key->multisample_fbo = rast->multisample && fb->samples > 1;
 
-   key->coherent_fb_fetch = true;
+   key->coherent_fb_fetch = GEN_GEN >= 9;
 
    key->force_dual_color_blend =
       screen->driconf.dual_color_blend_by_location &&