anv: Remove unused field xfb_used from anv_pipeline
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 26 Feb 2020 23:54:33 +0000 (15:54 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 27 Feb 2020 18:44:11 +0000 (10:44 -0800)
Since we only use xfb_info for GEN >= 8, make the ifdef cover that
local variable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3973>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3973>

src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c

index b4d1a85ebe3e9c4b276af4afecda0456eb3b3a1e..e30a49a72a02b5b490335b0469ef1d610d2023df 100644 (file)
@@ -3180,8 +3180,6 @@ struct anv_pipeline {
       uint32_t                                  instance_divisor;
    } vb[MAX_VBS];
 
-   uint8_t                                      xfb_used;
-
    bool                                         primitive_restart;
    uint32_t                                     topology;
 
index 6e01377c6f418700865132047bed05d3bcdbcff4..8fcab77f8ad7cb96e5e6f6fdaaab9a62fbf2cb12 100644 (file)
@@ -1309,7 +1309,6 @@ emit_3dstate_streamout(struct anv_pipeline *pipeline,
    const struct brw_vue_prog_data *prog_data =
       anv_pipeline_get_last_vue_prog_data(pipeline);
    const struct brw_vue_map *vue_map = &prog_data->vue_map;
-#endif
 
    nir_xfb_info *xfb_info;
    if (anv_pipeline_has_stage(pipeline, MESA_SHADER_GEOMETRY))
@@ -1318,8 +1317,7 @@ emit_3dstate_streamout(struct anv_pipeline *pipeline,
       xfb_info = pipeline->shaders[MESA_SHADER_TESS_EVAL]->xfb_info;
    else
       xfb_info = pipeline->shaders[MESA_SHADER_VERTEX]->xfb_info;
-
-   pipeline->xfb_used = xfb_info ? xfb_info->buffers_written : 0;
+#endif
 
    anv_batch_emit(&pipeline->batch, GENX(3DSTATE_STREAMOUT), so) {
       so.RenderingDisable = rs_info->rasterizerDiscardEnable;