panfrost: add PAN_MAX_TEXEL_BUFFER_ELEMENTS define

We're going to be repeating this value a few places, so let's use a
single define to keep thing simple.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28908>
This commit is contained in:
Erik Faye-Lund
2024-04-24 22:08:43 +02:00
committed by Marge Bot
parent 1277f58d8a
commit 19aa0b9473
2 changed files with 3 additions and 1 deletions
@@ -62,6 +62,8 @@ extern "C" {
*/
#define PAN_MAX_MIP_LEVELS 14
#define PAN_MAX_TEXEL_BUFFER_ELEMENTS 65536
/* How many power-of-two levels in the BO cache do we want? 2^12
* minimum chosen as it is the page size that all allocations are
* rounded to */
+1 -1
View File
@@ -214,7 +214,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_MAX_TEXEL_BUFFER_ELEMENTS_UINT:
return 65536;
return PAN_MAX_TEXEL_BUFFER_ELEMENTS;
/* Must be at least 64 for correct behaviour */
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: