mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
panvk: Bump the max image size on v11+
We have more bits to encode the resource size there, so let's increase the max limits. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Tested-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35731>
This commit is contained in:
parent
c2c91e78fd
commit
d36e6af329
2 changed files with 9 additions and 5 deletions
|
|
@ -764,7 +764,9 @@ panvk_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
|
||||||
static VkExtent3D
|
static VkExtent3D
|
||||||
get_max_2d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
|
get_max_2d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
|
||||||
{
|
{
|
||||||
const uint32_t max_img_size_B = UINT32_MAX;
|
const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_prod_id);
|
||||||
|
const uint64_t max_img_size_B =
|
||||||
|
arch <= 10 ? u_uintN_max(32) : u_uintN_max(48);
|
||||||
const enum pipe_format pfmt = vk_format_to_pipe_format(format);
|
const enum pipe_format pfmt = vk_format_to_pipe_format(format);
|
||||||
const uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
|
const uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
|
||||||
/* Evenly split blocks across all axis. */
|
/* Evenly split blocks across all axis. */
|
||||||
|
|
@ -785,7 +787,9 @@ get_max_2d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
|
||||||
static VkExtent3D
|
static VkExtent3D
|
||||||
get_max_3d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
|
get_max_3d_image_size(struct panvk_physical_device *phys_dev, VkFormat format)
|
||||||
{
|
{
|
||||||
const uint32_t max_img_size_B = UINT32_MAX;
|
const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_prod_id);
|
||||||
|
const uint64_t max_img_size_B =
|
||||||
|
arch <= 10 ? u_uintN_max(32) : u_uintN_max(48);
|
||||||
enum pipe_format pfmt = vk_format_to_pipe_format(format);
|
enum pipe_format pfmt = vk_format_to_pipe_format(format);
|
||||||
uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
|
uint32_t fmt_blksize = util_format_get_blocksize(pfmt);
|
||||||
/* Evenly split blocks across each axis. */
|
/* Evenly split blocks across each axis. */
|
||||||
|
|
|
||||||
|
|
@ -552,9 +552,9 @@ panvk_per_arch(get_physical_device_properties)(
|
||||||
* patched to handle the size/stride field extension.
|
* patched to handle the size/stride field extension.
|
||||||
*/
|
*/
|
||||||
.maxImageDimension1D = (1 << 16),
|
.maxImageDimension1D = (1 << 16),
|
||||||
.maxImageDimension2D = (1 << 14) - 1,
|
.maxImageDimension2D = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
|
||||||
.maxImageDimension3D = (1 << 9),
|
.maxImageDimension3D = PAN_ARCH <= 10 ? (1 << 9) : (1 << 14),
|
||||||
.maxImageDimensionCube = (1 << 14) - 1,
|
.maxImageDimensionCube = PAN_ARCH <= 10 ? (1 << 14) - 1 : (1 << 16),
|
||||||
.maxImageArrayLayers = (1 << 16),
|
.maxImageArrayLayers = (1 << 16),
|
||||||
/* Currently limited by the 1D texture size, which is 2^16.
|
/* Currently limited by the 1D texture size, which is 2^16.
|
||||||
* TODO: If we expose buffer views as 2D textures, we can increase the
|
* TODO: If we expose buffer views as 2D textures, we can increase the
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue