freedreno: Clean up tests around ORing in the reloc flags.
gcc was surprisingly not seeing through this to just do an AND and an OR. Improves drawoverhead's few uniforms / 1 change throughput 1.64141% +/- 0.188152% (n=60). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4957>
This commit is contained in:
@@ -152,12 +152,11 @@ append_bo(struct msm_submit_sp *submit, struct fd_bo *bo, uint32_t flags)
|
||||
msm_bo->idx = idx;
|
||||
}
|
||||
|
||||
if (flags & FD_RELOC_READ)
|
||||
submit->submit_bos[idx].flags |= MSM_SUBMIT_BO_READ;
|
||||
if (flags & FD_RELOC_WRITE)
|
||||
submit->submit_bos[idx].flags |= MSM_SUBMIT_BO_WRITE;
|
||||
if (flags & FD_RELOC_DUMP)
|
||||
submit->submit_bos[idx].flags |= MSM_SUBMIT_BO_DUMP;
|
||||
STATIC_ASSERT(FD_RELOC_READ == MSM_SUBMIT_BO_READ);
|
||||
STATIC_ASSERT(FD_RELOC_WRITE == MSM_SUBMIT_BO_WRITE);
|
||||
STATIC_ASSERT(FD_RELOC_DUMP == MSM_SUBMIT_BO_DUMP);
|
||||
submit->submit_bos[idx].flags |=
|
||||
flags & (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP);
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
Reference in New Issue
Block a user