"Rogovin, Kevin" <kevin.rogo...@intel.com> writes: > Hi all, I will later submit a patch taking into account comments, however one > comment I will address *now*. > > Eric Anholt [e...@anholt.net] writes: > >>Kevin Rogovin <kevin.rogo...@intel.com> writes: >> >>> This patch adds a function interface for enabling no wrap on batch commands, >>>adds to it assert enforcement that the number bytes added to the >>> batch buffer does not exceed a passed value and finally this is used >>> in brw_try_draw_prims() to help make sure that estimated_max_prim_size >>> is a good value. >> >>I don't like adding overhead to every batch operation. You can just do >>an assert like I did in 185b5a54c94ce11487146042c8eec24909187ed6 > > That approach used in brw_blorp_exec.cpp will not work here because the > estimate > is (and should be) computed in brw_try_draw_prims() and the assert needs to > be done > whenever commands or state are added to the batch buffer. Additionally it is > literally an > overhead or exactly writing one boolean and two integers _per_ draw call. > This overhead > is literally insignificant next to the overhead of the call stack to reach > brw_try_draw_primis().
You added code to intel_batchbuffer_require_space, which is called from every BEGIN_BATCH. You should simply verify at the end of the brw_try_draw_prims that we didn't exceed the space we estimated, same as the strategy in blorp. It doesn't help to know which particular BEGIN_BATCH pushed you over the limit.
pgpfFlOSbobNb.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev