[Mesa-dev] [PATCH 04/21] i965: Merge the two GEN >= 6 extension enable blocks
Kenneth Graunke
kenneth at whitecape.org
Thu Jun 27 21:33:19 PDT 2013
On 06/27/2013 06:20 PM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> There's no reason for these blocks to be separate.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_extensions.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
> index f9f4ad9..d70655b 100644
> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
> @@ -139,6 +139,8 @@ intelInitExtensions(struct gl_context *ctx)
> _mesa_override_glsl_version(ctx);
>
> if (intel->gen >= 6) {
> + uint64_t dummy;
> +
> ctx->Extensions.EXT_framebuffer_multisample = true;
> ctx->Extensions.EXT_transform_feedback = true;
> ctx->Extensions.ARB_blend_func_extended = !driQueryOptionb(&intel->optionCache, "disable_blend_func_extended");
> @@ -152,6 +154,10 @@ intelInitExtensions(struct gl_context *ctx)
> ctx->Extensions.ARB_shading_language_packing = true;
> ctx->Extensions.ARB_texture_multisample = true;
> ctx->Extensions.ARB_texture_storage_multisample = true;
> +
> + /* Test if the kernel has the ioctl. */
> + if (drm_intel_reg_read(intel->bufmgr, TIMESTAMP, &dummy) == 0)
> + ctx->Extensions.ARB_timer_query = true;
> }
>
> if (intel->gen >= 5) {
> @@ -159,13 +165,6 @@ intelInitExtensions(struct gl_context *ctx)
> ctx->Extensions.EXT_timer_query = true;
> }
>
> - if (intel->gen >= 6) {
> - uint64_t dummy;
> - /* Test if the kernel has the ioctl. */
> - if (drm_intel_reg_read(intel->bufmgr, TIMESTAMP, &dummy) == 0)
> - ctx->Extensions.ARB_timer_query = true;
> - }
I'm ambivalent about this change. It'd be nice if the ioctl test wasn't
necessary, but I just checked and it was introduced in v3.7. We
currently require v3.6, so...technically, it's necessary.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> -
> if (ctx->API == API_OPENGL_CORE)
> ctx->Extensions.ARB_base_instance = true;
> if (ctx->API != API_OPENGL_CORE)
>
More information about the mesa-dev
mailing list