zink: check maxImageDimension1D as well as maxImageDimension2D

According to the docs for PIPE_CAP_MAX_TEXTURE_2D_SIZE, it's the limit
both for 2D *and* 1D textures. So let's take the min of the two vulkan
features here instead of assuming they're the same.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19780>
This commit is contained in:
Erik Faye-Lund
2022-11-16 13:18:54 +01:00
committed by Marge Bot
parent 1b892c5a7d
commit dc770eb9bb
3 changed files with 4 additions and 1 deletions

View File

@@ -157,6 +157,7 @@ supported:
* ``VkPhysicalDeviceLimits``
* ``maxImageDimension1D`` ≥ 16384
* ``maxImageDimension2D`` ≥ 16384
* ``maxViewports`` ≥ 16

View File

@@ -153,6 +153,7 @@
"properties": {
"VkPhysicalDeviceProperties": {
"limits": {
"maxImageDimension1D": 16384,
"maxImageDimension2D": 16384,
"maxViewports": 16
}

View File

@@ -676,7 +676,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
}
case PIPE_CAP_MAX_TEXTURE_2D_SIZE:
return screen->info.props.limits.maxImageDimension2D;
return MIN2(screen->info.props.limits.maxImageDimension1D,
screen->info.props.limits.maxImageDimension2D);
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
return 1 + util_logbase2(screen->info.props.limits.maxImageDimension3D);
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: