From 54cc1bd8016fdba5f42c3c730de5d3ad3904741c 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: (cherry picked from commit 1b890825f6df23988e44dd575b6e86f597f62e06) --- .pick_status.json | 2 +- src/gallium/drivers/i915/i915_screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4e153da60fe..1042ae868a4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3084,7 +3084,7 @@ "description": "i915: Fix value returned for PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0c31fe9ee743f699bcabcb638ccc83e515f0d1bd", "notes": null 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: