crocus/gen8: add support for cherryview (env var for bdw)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507>
This commit is contained in:
Dave Airlie 2021-06-22 05:42:54 +10:00 committed by Marge Bot
parent c630304196
commit a0608b3efc

View file

@ -215,6 +215,7 @@ crocus_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_INT64_DIVMOD:
case PIPE_CAP_TGSI_BALLOT:
case PIPE_CAP_PACKED_UNIFORMS:
return devinfo->ver == 8;
case PIPE_CAP_GL_CLAMP:
return false;
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
@ -761,9 +762,16 @@ crocus_screen_create(int fd, const struct pipe_screen_config *config)
screen->pci_id = screen->devinfo.chipset_id;
screen->no_hw = screen->devinfo.no_hw;
if (screen->devinfo.ver >= 8)
if (screen->devinfo.ver > 8)
return NULL;
if (screen->devinfo.ver == 8) {
/* bind to cherryview or bdw if forced */
if (!screen->devinfo.is_cherryview &&
!getenv("CROCUS_GEN8"))
return NULL;
}
p_atomic_set(&screen->refcount, 1);
screen->aperture_bytes = get_aperture_size(fd);