diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2015-06-26 11:38:46 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2015-06-26 13:45:28 +0800 |
commit | 7de85694fa606b112b8badd4f07969aef782efb8 (patch) | |
tree | 208854cf05d27ecbe3001755f270ae3e91294681 /src | |
parent | cbdc26aa3f76dc20285caa7e62ca8809cb2fe638 (diff) | |
download | external_mesa3d-7de85694fa606b112b8badd4f07969aef782efb8.zip external_mesa3d-7de85694fa606b112b8badd4f07969aef782efb8.tar.gz external_mesa3d-7de85694fa606b112b8badd4f07969aef782efb8.tar.bz2 |
ilo: define ILO_IMAGE_MAX_LEVEL_COUNT
Define ILO_IMAGE_MAX_LEVEL_COUNT for ilo_image and remove unnecessary header
includes.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/ilo/core/ilo_core.h | 4 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/core/ilo_image.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/core/ilo_image.h | 11 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_common.h | 5 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/gallium/drivers/ilo/core/ilo_core.h b/src/gallium/drivers/ilo/core/ilo_core.h index d95a80a..da7db90 100644 --- a/src/gallium/drivers/ilo/core/ilo_core.h +++ b/src/gallium/drivers/ilo/core/ilo_core.h @@ -29,13 +29,9 @@ #define ILO_CORE_H #include "pipe/p_compiler.h" -#include "pipe/p_defines.h" #include "util/u_debug.h" -#include "util/list.h" -#include "util/u_inlines.h" #include "util/u_math.h" #include "util/u_memory.h" -#include "util/u_pointer.h" #endif /* ILO_CORE_H */ diff --git a/src/gallium/drivers/ilo/core/ilo_image.c b/src/gallium/drivers/ilo/core/ilo_image.c index 7a11002..3209674 100644 --- a/src/gallium/drivers/ilo/core/ilo_image.c +++ b/src/gallium/drivers/ilo/core/ilo_image.c @@ -1029,8 +1029,8 @@ img_calculate_hiz_size(struct ilo_image *img, break; case ILO_IMAGE_WALK_LOD: { - unsigned lod_tx[PIPE_MAX_TEXTURE_LEVELS]; - unsigned lod_ty[PIPE_MAX_TEXTURE_LEVELS]; + unsigned lod_tx[ILO_IMAGE_MAX_LEVEL_COUNT]; + unsigned lod_ty[ILO_IMAGE_MAX_LEVEL_COUNT]; unsigned cur_tx, cur_ty; /* figure out the tile offsets of LODs */ diff --git a/src/gallium/drivers/ilo/core/ilo_image.h b/src/gallium/drivers/ilo/core/ilo_image.h index 0fe0d4d..cfe18b9 100644 --- a/src/gallium/drivers/ilo/core/ilo_image.h +++ b/src/gallium/drivers/ilo/core/ilo_image.h @@ -33,6 +33,13 @@ #include "ilo_core.h" #include "ilo_dev.h" +/* + * From the Ivy Bridge PRM, volume 4 part 1, page 75: + * + * "(MIP Count / LOD) representing [1,15] MIP levels" + */ +#define ILO_IMAGE_MAX_LEVEL_COUNT 15 + enum ilo_image_aux_type { ILO_IMAGE_AUX_NONE, ILO_IMAGE_AUX_HIZ, @@ -154,7 +161,7 @@ struct ilo_image { unsigned align_i; unsigned align_j; - struct ilo_image_lod lods[PIPE_MAX_TEXTURE_LEVELS]; + struct ilo_image_lod lods[ILO_IMAGE_MAX_LEVEL_COUNT]; /* physical layer height for ILO_IMAGE_WALK_LAYER */ unsigned walk_layer_height; @@ -173,7 +180,7 @@ struct ilo_image { unsigned enables; /* LOD offsets for ILO_IMAGE_WALK_LOD */ - unsigned walk_lod_offsets[PIPE_MAX_TEXTURE_LEVELS]; + unsigned walk_lod_offsets[ILO_IMAGE_MAX_LEVEL_COUNT]; unsigned walk_layer_height; unsigned bo_stride; diff --git a/src/gallium/drivers/ilo/ilo_common.h b/src/gallium/drivers/ilo/ilo_common.h index 4d6604b..3dbe79f 100644 --- a/src/gallium/drivers/ilo/ilo_common.h +++ b/src/gallium/drivers/ilo/ilo_common.h @@ -29,7 +29,12 @@ #define ILO_COMMON_H #include "pipe/p_format.h" +#include "pipe/p_defines.h" + +#include "util/list.h" #include "util/u_format.h" +#include "util/u_inlines.h" +#include "util/u_pointer.h" #include "core/ilo_core.h" #include "core/ilo_debug.h" |