blorp: Allocate fixed amount of space for blend state.

According to the simulator a cacheline of the blend state cache
corresponds to 3 cachelines of L3 that are always filled regardless of
the number of render targets in use.  Allocate enough space to avoid
pagefaults under simulation, since a scratch page isn't bound by
default.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28283>
This commit is contained in:
Francisco Jerez 2022-08-24 11:33:26 -07:00 committed by Marge Bot
parent b73638ae5e
commit b18e68fc25
1 changed files with 1 additions and 2 deletions

View File

@ -886,8 +886,7 @@ blorp_emit_blend_state(struct blorp_batch *batch,
if (!batch->blorp->config.use_cached_dynamic_states) {
struct GENX(BLEND_STATE) blend = { };
int size = GENX(BLEND_STATE_length) * 4;
size += GENX(BLEND_STATE_ENTRY_length) * 4 * params->num_draw_buffers;
const unsigned size = 96;
uint32_t *state = blorp_alloc_dynamic_state(batch, size, 64, &offset);
if (state == NULL)
return;