freedreno: Add an early out for preparing to read a resource.
nohw drawoverhead 8 UBOs test throughput 1.06093% +/- 0.363376% (n=10). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4996>
This commit is contained in:
parent
3e424bcdfc
commit
d393837332
|
@ -460,6 +460,13 @@ fd_batch_resource_read(struct fd_batch *batch, struct fd_resource *rsc)
|
||||||
{
|
{
|
||||||
fd_screen_assert_locked(batch->ctx->screen);
|
fd_screen_assert_locked(batch->ctx->screen);
|
||||||
|
|
||||||
|
/* Early out, if we hit this then we know we don't have anyone else
|
||||||
|
* writing to it (since both _write and _read flush other writers), and
|
||||||
|
* that we've already recursed for stencil.
|
||||||
|
*/
|
||||||
|
if (likely(fd_batch_references_resource(batch, rsc)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (rsc->stencil)
|
if (rsc->stencil)
|
||||||
fd_batch_resource_read(batch, rsc->stencil);
|
fd_batch_resource_read(batch, rsc->stencil);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue