v3d/limits: add line width and point size limits

They will be the same for the OpenGL and Vulkan driver, so let's put
it on the commit limits header.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Alejandro Piñeiro 2020-08-16 00:13:20 +02:00 committed by Marge Bot
parent 7620a1b13f
commit ff02458aa8
2 changed files with 6 additions and 2 deletions

View File

@ -59,4 +59,7 @@
#define V3D_MAX_DRAW_BUFFERS 4
#define V3D_MAX_POINT_SIZE 512.0f
#define V3D_MAX_LINE_WIDTH 32
#endif /* V3D_LIMITS_H */

View File

@ -25,6 +25,7 @@
#include <sys/sysinfo.h>
#include "common/v3d_device_info.h"
#include "common/v3d_limits.h"
#include "util/os_misc.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
@ -279,11 +280,11 @@ v3d_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
switch (param) {
case PIPE_CAPF_MAX_LINE_WIDTH:
case PIPE_CAPF_MAX_LINE_WIDTH_AA:
return 32;
return V3D_MAX_LINE_WIDTH;
case PIPE_CAPF_MAX_POINT_WIDTH:
case PIPE_CAPF_MAX_POINT_WIDTH_AA:
return 512.0f;
return V3D_MAX_POINT_SIZE;
case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
return 0.0f;