summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/iris/iris_program.c9
-rw-r--r--src/gallium/drivers/iris/iris_state.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index 9eb7a47e1f1..50ea72ab9ec 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -1522,8 +1522,15 @@ iris_compile_fs(struct iris_context *ice,
*/
brw_nir_lower_fs_outputs(nir);
+ /* On Gen11+, shader RT write messages have a "Null Render Target" bit
+ * and do not need a binding table entry with a null surface. Earlier
+ * generations need an entry for a null surface.
+ */
+ int null_rts = devinfo->gen < 11 ? 1 : 0;
+
struct iris_binding_table bt;
- iris_setup_binding_table(devinfo, nir, &bt, MAX2(key->nr_color_regions, 1),
+ iris_setup_binding_table(devinfo, nir, &bt,
+ MAX2(key->nr_color_regions, null_rts),
num_system_values, num_cbufs);
brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges);
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 3fca191937d..d45b1736af3 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -4337,7 +4337,7 @@ iris_populate_binding_table(struct iris_context *ice,
}
push_bt_entry(addr);
}
- } else {
+ } else if (GEN_GEN < 11) {
uint32_t addr = use_null_fb_surface(batch, ice);
push_bt_entry(addr);
}