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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user