anv: fix primitives generated queries values

Numbers in some situations are incorrect because we don't stall
properly before capturing the register value.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6412
Fixes: a468f26ca5 ("anv: implement VK_EXT_primitives_generated_query")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16505>
This commit is contained in:
Lionel Landwerlin 2022-05-13 23:22:30 +03:00 committed by Marge Bot
parent 058823906e
commit 17fc7b20b1

View file

@ -932,6 +932,10 @@ void genX(CmdBeginQueryIndexedEXT)(
break;
case VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT:
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
pc.CommandStreamerStallEnable = true;
pc.StallAtPixelScoreboard = true;
}
mi_store(&b, mi_mem64(anv_address_add(query_addr, 8)),
mi_reg64(GENX(CL_INVOCATION_COUNT_num)));
break;