summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-03-16 17:20:10 -0700
committerKenneth Graunke <[email protected]>2017-03-24 12:21:06 -0700
commit652d521408f4d680d17d6f36c78594bedee8c91e (patch)
tree5b4f3afe89f7336bfa178ff1834e358fc63b9481 /src/mesa/drivers/dri/i965
parent61926733f979dc397e9011878e478fcb75aaa7cb (diff)
i965: Remove pointless NULL check from Gen6 primitive counting code.
We create the BO when creating a transform feedback object, and only destroy it when deleting that object. So it won't be NULL. CID: 1401410 Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c
index d117e1c0eca..b769a715f02 100644
--- a/src/mesa/drivers/dri/i965/gen6_sol.c
+++ b/src/mesa/drivers/dri/i965/gen6_sol.c
@@ -284,9 +284,10 @@ brw_save_primitives_written_counters(struct brw_context *brw,
const struct gl_context *ctx = &brw->ctx;
const int streams = ctx->Const.MaxVertexStreams;
+ assert(obj->prim_count_bo != NULL);
+
/* Check if there's enough space for a new pair of four values. */
- if (obj->prim_count_bo != NULL &&
- obj->prim_count_buffer_index + 2 * streams >= 4096 / sizeof(uint64_t)) {
+ if (obj->prim_count_buffer_index + 2 * streams >= 4096 / sizeof(uint64_t)) {
/* Gather up the results so far and release the BO. */
tally_prims_generated(brw, obj);
}