summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-06-02 14:01:24 -0500
committerMarge Bot <eric+marge@anholt.net>2021-06-03 05:12:33 +0000
commitf63410eee68889f3c838906f99c28bdea42e9af2 (patch)
treeb07a85014912e37ec2c5760a110c0da989a6b086 /src/mesa/drivers/dri/i965/brw_context.c
parent8251bd216e7ff300b93788cd1e2d49c301f5fe49 (diff)
intel/nir,i965: Move HW generation check for UBO pushing to i965
Iris only runs on BDW+ and ANV already handles this by not even trying on anything older than HSW. The only driver benefiting from this common check is i965. Moving it out makes the pass more generic and if some driver comes along which can push UBOs on IVB, it should work for that. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11145>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index c2ab5c06cfa..464a54338eb 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1039,6 +1039,12 @@ brw_create_context(gl_api api,
brw->has_swizzling = screen->hw_has_swizzling;
+ /* We don't push UBOs on IVB and earlier because the restrictions on
+ * 3DSTATE_CONSTANT_* make it really annoying to use push constants
+ * without dynamic state base address.
+ */
+ brw->can_push_ubos = devinfo->verx10 >= 75;
+
brw->isl_dev = screen->isl_dev;
brw->vs.base.stage = MESA_SHADER_VERTEX;