[Mesa-dev] [PATCH] nicer-no-wrap-patch
Eric Anholt
eric at anholt.net
Tue Nov 12 14:19:10 PST 2013
"Rogovin, Kevin" <kevin.rogovin at intel.com> writes:
> Hi all, I will later submit a patch taking into account comments, however one comment I will address *now*.
>
> Eric Anholt [eric at anholt.net] writes:
>
>>Kevin Rogovin <kevin.rogovin at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131112/029ffdf3/attachment.pgp>
More information about the mesa-dev
mailing list