panfrost: Enable NV_primitive_restart on Valhall
Unlike literally every other mesa/st emulation, for some inexplicable reason we
need to pretend to support the CAP and then set a different EMULATE cap instead
of the emulation keying off the lack of support for the CAP. Set the CAPs
accordingly so we get NV_primitive_restart (with emulation of non-fixed
indices).
This gets Mesa to advertise GL 3.1 on Mali-G57 as intended.
Fixes: 30c14f54cf
("panfrost: Disable PIPE_CAP_PRIMITIVE_RESTART on v9")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20702>
This commit is contained in:

committed by
Marge Bot

parent
2f97883276
commit
fe4dc59e99
@@ -135,6 +135,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_OCCLUSION_QUERY:
|
||||
case PIPE_CAP_PRIMITIVE_RESTART:
|
||||
case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
|
||||
return true;
|
||||
|
||||
@@ -312,8 +313,8 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
|
||||
/* Removed in v9 (Valhall). PRIMTIIVE_RESTART_FIXED_INDEX is of course
|
||||
* still supported as it is core GLES3.0 functionality
|
||||
*/
|
||||
case PIPE_CAP_PRIMITIVE_RESTART:
|
||||
return dev->arch <= 7;
|
||||
case PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART:
|
||||
return dev->arch >= 9;
|
||||
|
||||
case PIPE_CAP_FLATSHADE:
|
||||
case PIPE_CAP_TWO_SIDED_COLOR:
|
||||
|
Reference in New Issue
Block a user