From c2e3d0f1631b7895530c69c7728d0fc9325ffc1c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 16 Nov 2018 07:40:55 -0800 Subject: [PATCH] i915: Delete swizzling detection logic. This is all leftover from the i965 split. Reviewed-by: Jason Ekstrand Reviewed-by: Lionel Landwerlin --- src/mesa/drivers/dri/i915/intel_context.c | 2 -- src/mesa/drivers/dri/i915/intel_context.h | 1 - src/mesa/drivers/dri/i915/intel_screen.c | 26 ----------------------- src/mesa/drivers/dri/i915/intel_screen.h | 2 -- 4 files changed, 31 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index abc16d47491..c23e5ffb26e 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -442,8 +442,6 @@ intelInitContext(struct intel_context *intel, intel->is_945 = IS_945(devID); - intel->has_swizzling = intel->intelScreen->hw_has_swizzling; - memset(&ctx->TextureFormatSupported, 0, sizeof(ctx->TextureFormatSupported)); diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h index 580af53f956..b79288d29bc 100644 --- a/src/mesa/drivers/dri/i915/intel_context.h +++ b/src/mesa/drivers/dri/i915/intel_context.h @@ -159,7 +159,6 @@ struct intel_context */ int gen; bool is_945; - bool has_swizzling; struct intel_batchbuffer batch; diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 2cf7d9de4fb..79f2113a468 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -1020,30 +1020,6 @@ intel_init_bufmgr(struct intel_screen *intelScreen) return true; } -static bool -intel_detect_swizzling(struct intel_screen *screen) -{ - drm_intel_bo *buffer; - unsigned long flags = 0; - unsigned long aligned_pitch; - uint32_t tiling = I915_TILING_X; - uint32_t swizzle_mode = 0; - - buffer = drm_intel_bo_alloc_tiled(screen->bufmgr, "swizzle test", - 64, 64, 4, - &tiling, &aligned_pitch, flags); - if (buffer == NULL) - return false; - - drm_intel_bo_get_tiling(buffer, &tiling, &swizzle_mode); - drm_intel_bo_unreference(buffer); - - if (swizzle_mode == I915_BIT_6_SWIZZLE_NONE) - return false; - else - return true; -} - static __DRIconfig** intel_screen_make_configs(__DRIscreen *dri_screen) { @@ -1200,8 +1176,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) intelScreen->gen = 2; } - intelScreen->hw_has_swizzling = intel_detect_swizzling(intelScreen); - set_max_gl_versions(intelScreen); psp->extensions = intelScreenExtensions; diff --git a/src/mesa/drivers/dri/i915/intel_screen.h b/src/mesa/drivers/dri/i915/intel_screen.h index ac70d36553e..359cf313475 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.h +++ b/src/mesa/drivers/dri/i915/intel_screen.h @@ -44,8 +44,6 @@ struct intel_screen bool no_hw; - bool hw_has_swizzling; - bool no_vbo; dri_bufmgr *bufmgr; -- 2.30.2