iris: Make an IRIS_MAX_MIPLEVELS define
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 14 Feb 2019 00:41:46 +0000 (16:41 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:12 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_resource.h
src/gallium/drivers/iris/iris_screen.c

index 0edc1b6f3a9a1a5e6b2d0ba56bb666a552137022..060472f6df3997755add1fb483d258e295f0116e 100644 (file)
@@ -30,6 +30,8 @@
 struct iris_batch;
 struct iris_context;
 
+#define IRIS_MAX_MIPLEVELS 15
+
 struct iris_format_info {
    enum isl_format fmt;
    struct isl_swizzle swizzle;
index 89f6f1bb85e915614b14cd8d99ce8ec3c9384ea6..d831ffbc0a27e919cc666ecfc075cdc98f399cfd 100644 (file)
@@ -183,7 +183,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return BRW_MAX_DRAW_BUFFERS;
    case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
    case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
-      return 15; /* 16384x16384 */
+      return IRIS_MAX_MIPLEVELS; /* 16384x16384 */
    case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
       return 12; /* 2048x2048 */
    case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: