pvr: make queries arch-agnostic

The only HW-definition we depend on here is the occlusion query minimum
alignment. But this value doesn't differ per arch, so let's just make it
a global define for now.

This should probably have a better name and location. But AFAICT, this
applies to a lot in this header. So let's untangle this down the road
instead.

Acked-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38832>
This commit is contained in:
Erik Faye-Lund
2025-11-14 12:02:05 +01:00
committed by Marge Bot
parent 70270348e8
commit 745d576516
2 changed files with 4 additions and 3 deletions

View File

@@ -48,6 +48,8 @@
#define ROGUE_ICACHE_ALIGN 8U
#define ROGUE_OQUERY_ALIGN 16U
#define ROGUE_MAX_ALU_INPUTS 6U
#define ROGUE_ALU_INPUT_GROUP_SIZE (ROGUE_MAX_ALU_INPUTS / 2)
#define ROGUE_MAX_ALU_OUTPUTS 2U

View File

@@ -76,8 +76,7 @@ VkResult pvr_CreateQueryPool(VkDevice _device,
if (!pool)
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
pool->result_stride =
ALIGN_POT(query_size, ROGUE_CR_ISP_OCLQRY_BASE_ADDR_ALIGNMENT);
pool->result_stride = ALIGN_POT(query_size, ROGUE_OQUERY_ALIGN);
pool->query_count = pCreateInfo->queryCount;
@@ -88,7 +87,7 @@ VkResult pvr_CreateQueryPool(VkDevice _device,
result = pvr_bo_suballoc(&device->suballoc_vis_test,
alloc_size,
ROGUE_CR_ISP_OCLQRY_BASE_ADDR_ALIGNMENT,
ROGUE_OQUERY_ALIGN,
false,
&pool->result_buffer);
if (result != VK_SUCCESS)