mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
pvr: return the OS page size for minMemoryMapAlignment
The driver was returning the wrong limit. The spec says that after calling
vkMapMemory: "subtracting offset bytes from the returned pointer will
always produce an integer multiple of this limit", which is in fact the OS
page size.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10767
Fixes 8991e6464 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28044>
This commit is contained in:
parent
433a3c262a
commit
24cedcf838
1 changed files with 6 additions and 6 deletions
|
|
@ -375,10 +375,12 @@ pvr_get_physical_device_descriptor_limits(
|
|||
}
|
||||
|
||||
static bool pvr_physical_device_get_properties(
|
||||
const struct pvr_device_info *const dev_info,
|
||||
const struct pvr_device_runtime_info *const dev_runtime_info,
|
||||
const struct pvr_physical_device *const pdevice,
|
||||
struct vk_properties *const properties)
|
||||
{
|
||||
const struct pvr_device_info *const dev_info = &pdevice->dev_info;
|
||||
const struct pvr_device_runtime_info *const dev_runtime_info =
|
||||
&pdevice->dev_runtime_info;
|
||||
const struct pvr_descriptor_limits *descriptor_limits =
|
||||
pvr_get_physical_device_descriptor_limits(dev_info, dev_runtime_info);
|
||||
|
||||
|
|
@ -539,7 +541,7 @@ static bool pvr_physical_device_get_properties(
|
|||
.viewportBoundsRange[1] = 2U * max_render_size,
|
||||
|
||||
.viewportSubPixelBits = 0,
|
||||
.minMemoryMapAlignment = 64U,
|
||||
.minMemoryMapAlignment = pdevice->ws->page_size,
|
||||
.minTexelBufferOffsetAlignment = 16U,
|
||||
.minUniformBufferOffsetAlignment = 4U,
|
||||
.minStorageBufferOffsetAlignment = 4U,
|
||||
|
|
@ -762,9 +764,7 @@ static VkResult pvr_physical_device_init(struct pvr_physical_device *pdevice,
|
|||
pvr_physical_device_get_supported_extensions(&supported_extensions);
|
||||
pvr_physical_device_get_supported_features(&pdevice->dev_info,
|
||||
&supported_features);
|
||||
if (!pvr_physical_device_get_properties(&pdevice->dev_info,
|
||||
&pdevice->dev_runtime_info,
|
||||
&supported_properties)) {
|
||||
if (!pvr_physical_device_get_properties(pdevice, &supported_properties)) {
|
||||
result = vk_errorf(instance,
|
||||
VK_ERROR_INITIALIZATION_FAILED,
|
||||
"Failed to collect physical device properties");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue