From 1b890825f6df23988e44dd575b6e86f597f62e06 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 26 Feb 2024 08:43:54 -0800 Subject: [PATCH] i915: Fix value returned for PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS Found by inspection. Original code was returning the size instead of the number of levels. This was probably an over zealous search-and-replace when PIPE_CAP_MAX_TEXTURE_2D_LEVELS was changed to _SIZE. Reviewed-by: David Heidelberg Fixes: 0c31fe9ee74 ("gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.") Part-of: --- src/gallium/drivers/i915/i915_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index a6d6d67a39c..bfa7ea04b9f 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -456,7 +456,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap) case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: return I915_MAX_TEXTURE_3D_LEVELS; case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: - return 1 << (I915_MAX_TEXTURE_2D_LEVELS - 1); + return I915_MAX_TEXTURE_2D_LEVELS; /* Render targets. */ case PIPE_CAP_MAX_RENDER_TARGETS: