diff options
author | Kenneth Graunke <[email protected]> | 2016-05-05 01:57:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-05-09 14:59:58 -0700 |
commit | 4c71c8a74ad29bd84ca16803672ad1e9e30e2fff (patch) | |
tree | 22aac660e6e354925429ec328f027405d24d9a9c /src/mesa/drivers/dri/i965/intel_screen.c | |
parent | 2d41eb313fa354560e92e60336e5b0cdd40137f2 (diff) |
i965: Only enable ARB_query_buffer_object for newer kernels on Haswell.
On Haswell, we need version 6 of the kernel command parser in order to
write the math registers. Our implementation of ARB_query_buffer_object
heavily relies on MI_MATH, so we should only advertise it when MI_MATH
is available. We also need MI_LOAD_REGISTER_REG, which requires version
7 of the command parser.
To make these checks easier, introduce a screen->has_mi_math_and_lrr
flag that will be set when both commands are supported.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index db9d94d3b34..f9b54842eb9 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1531,6 +1531,14 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) if (ret == -1) intelScreen->cmd_parser_version = 0; + /* Haswell requires command parser version 6 in order to write to the + * MI_MATH GPR registers, and version 7 in order to use + * MI_LOAD_REGISTER_REG (which all users of MI_MATH use). + */ + intelScreen->has_mi_math_and_lrr = intelScreen->devinfo->gen >= 8 || + (intelScreen->devinfo->is_haswell && + intelScreen->cmd_parser_version >= 7); + psp->extensions = !intelScreen->has_context_reset_notification ? intelScreenExtensions : intelRobustScreenExtensions; |