summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-05-23 15:17:02 -0700
committerIan Romanick <[email protected]>2016-06-01 11:11:39 -0700
commitb27dfa5403ed1884999524417c08d2bc50365965 (patch)
tree6e5a5efece055145b771f7546f481e8e67522c93
parent049bb94d2e177f7415e7dddd71907be3e7f153c6 (diff)
i965: If control_data_header_size_bits is zero, don't do EndPrimitive
This can occur when max_vertices=0 is explicitly specified. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 58191fc5611..e9f6999f9c3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1668,6 +1668,9 @@ fs_visitor::emit_gs_end_primitive(const nir_src &vertex_count_nir_src)
struct brw_gs_prog_data *gs_prog_data =
(struct brw_gs_prog_data *) prog_data;
+ if (gs_compile->control_data_header_size_bits == 0)
+ return;
+
/* We can only do EndPrimitive() functionality when the control data
* consists of cut bits. Fortunately, the only time it isn't is when the
* output type is points, in which case EndPrimitive() is a no-op.
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
index 76a80a54f44..927438f9345 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
@@ -539,6 +539,9 @@ vec4_gs_visitor::gs_end_primitive()
return;
}
+ if (c->control_data_header_size_bits == 0)
+ return;
+
/* Cut bits use one bit per vertex. */
assert(c->control_data_bits_per_vertex == 1);