summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-01-16 17:59:43 -0600
committerDylan Baker <dylan@pnwbakers.com>2020-02-03 08:33:02 -0800
commit30472cca00e3da02f4b624f893e71d33cce06637 (patch)
tree3f3323ccf62f4c99882387264a4933e87bb697eb
parent9fc714c5ec12e4f9095fac6df053b9f7d48c3a82 (diff)
downloadmesa-30472cca00e3da02f4b624f893e71d33cce06637.tar.gz
anv,iris: Set 3DSTATE_SF::DerefBlockSize to per-poly on Gen12+
According to the BSpec, this should prevent hangs when using shaders with large URB entries. A more precise fix can be done but it requires re-arranging URB setup. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454> (cherry picked from commit e1bdb127b6875df602bd736465d597725f326621)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/iris/iris_state.c4
-rw-r--r--src/intel/blorp/blorp_genX_exec.h6
-rw-r--r--src/intel/vulkan/genX_pipeline.c4
4 files changed, 14 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index f4490be64a2..441fa2de7d9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -661,7 +661,7 @@
"description": "anv,iris: Set 3DSTATE_SF::DerefBlockSize to per-poly on Gen12+",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index d266c9fd81f..1c5e21f993f 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1689,6 +1689,10 @@ iris_create_rasterizer_state(struct pipe_context *ctx,
sf.PointWidthSource = state->point_size_per_vertex ? Vertex : State;
sf.PointWidth = state->point_size;
+#if GEN_GEN >= 12
+ sf.DerefBlockSize = PerPolyDerefMode;
+#endif
+
if (state->flatshade_first) {
sf.TriangleFanProvokingVertexSelect = 1;
} else {
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 045217969f5..e2838fcaa6c 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -670,7 +670,11 @@ blorp_emit_sf_config(struct blorp_batch *batch,
#if GEN_GEN >= 8
- blorp_emit(batch, GENX(3DSTATE_SF), sf);
+ blorp_emit(batch, GENX(3DSTATE_SF), sf) {
+#if GEN_GEN >= 12
+ sf.DerefBlockSize = PerPolyDerefMode;
+#endif
+ }
blorp_emit(batch, GENX(3DSTATE_RASTER), raster) {
raster.CullMode = CULLMODE_NONE;
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index ea2e38834e8..464a684f0d4 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -597,6 +597,10 @@ emit_rs_state(struct anv_pipeline *pipeline,
sf.LineStippleEnable = line_info && line_info->stippledLineEnable;
#endif
+#if GEN_GEN >= 12
+ sf.DerefBlockSize = PerPolyDerefMode;
+#endif
+
const struct brw_vue_prog_data *last_vue_prog_data =
anv_pipeline_get_last_vue_prog_data(pipeline);