aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-10-30 15:53:11 -0500
committerJason Ekstrand <[email protected]>2019-10-31 21:07:15 +0000
commitc765e2156a8fb52bdcda758e7c2b0cbdc791d1a9 (patch)
tree0afb67d3d8094afffd7a12be134abd4771e4afab /src/intel
parentdf7a730b4f694f6a07e7d6fd673453b8315ae867 (diff)
anv: Don't claim the null RT as a valid color target
If it's NULL, we can let the compiler go ahead and delete it or flag it as NULL. Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_pipeline.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 1a2eb4599c8..63e6e6e3fea 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -1008,6 +1008,12 @@ anv_pipeline_link_fs(const struct brw_compiler *compiler,
if (deleted_output)
nir_fixup_deref_modes(stage->nir);
+ /* Now that we've determined the actual number of render targets, adjust
+ * the key accordingly.
+ */
+ stage->key.wm.nr_color_regions = num_rts;
+ stage->key.wm.color_outputs_valid = (1 << num_rts) - 1;
+
if (num_rts == 0) {
/* If we have no render targets, we need a null render target */
rt_bindings[0] = (struct anv_pipeline_binding) {
@@ -1018,12 +1024,6 @@ anv_pipeline_link_fs(const struct brw_compiler *compiler,
num_rts = 1;
}
- /* Now that we've determined the actual number of render targets, adjust
- * the key accordingly.
- */
- stage->key.wm.nr_color_regions = num_rts;
- stage->key.wm.color_outputs_valid = (1 << num_rts) - 1;
-
assert(num_rts <= max_rt);
assert(stage->bind_map.surface_count == 0);
typed_memcpy(stage->bind_map.surface_to_descriptor,