2 * Copyright © 2014-2017 Broadcom
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26 * V3D version-specific functions for submitting VC5 render jobs to the
30 #include "v3d_context.h"
31 #include "broadcom/cle/v3dx_pack.h"
33 void v3dX(bcl_epilogue
)(struct v3d_context
*v3d
, struct v3d_job
*job
)
35 v3d_cl_ensure_space_with_branch(&job
->bcl
,
37 cl_packet_length(TRANSFORM_FEEDBACK_SPECS
) +
39 cl_packet_length(FLUSH
));
41 /* Disable TF at the end of the CL, so that the TF block
42 * cleans up and finishes before it gets reset by the next
43 * frame's tile binning mode cfg packet. (SWVC5-718).
46 if (job
->tf_enabled
) {
47 cl_emit(&job
->bcl
, TRANSFORM_FEEDBACK_SPECS
, tfe
) {
51 #endif /* V3D_VERSION >= 41 */
53 /* We just FLUSH here to tell the HW to cap the bin CLs with a
54 * return. Any remaining state changes won't be flushed to
55 * the bins first -- you would need FLUSH_ALL for that, but
56 * the HW for hasn't been validated
58 cl_emit(&job
->bcl
, FLUSH
, flush
);