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 <david.heidelberg@collabora.com>
Fixes: 0c31fe9ee7 ("gallium: Redefine the max texture 2d cap from _LEVELS to _SIZE.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27800>
(cherry picked from commit 1b890825f6)
This commit is contained in:
Ian Romanick 2024-02-26 08:43:54 -08:00 committed by Eric Engestrom
parent fdea6e7194
commit 54cc1bd801
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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: