mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
anv: Set MOCS on NULL stream output buffers
We'd like to add safeguards against accidental use of MOCS 0 (uncached), which can have large performance implications. One case where we use MOCS of 0 is disabled stream output targets, MOCS shouldn't matter, as there's no actual buffer to be cached. That said, it should be harmless to set MOCS for these null stream output buffers; we can just assume a MOCS for generic internal buffers. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>
This commit is contained in:
parent
818b5d2b9e
commit
dfe455b6df
1 changed files with 2 additions and 0 deletions
|
|
@ -3657,6 +3657,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
|
|||
sob.SurfaceEndAddress = anv_address_add(xfb->buffer->address,
|
||||
xfb->offset + xfb->size);
|
||||
#endif
|
||||
} else {
|
||||
sob.MOCS = anv_mocs(cmd_buffer->device, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue