Mesa (master): ilo: remove ilo_image_disable_aux()

Chia-I Wu olv at kemper.freedesktop.org
Fri Jun 26 05:51:56 UTC 2015


Module: Mesa
Branch: master
Commit: f825fe8e13adfec4cd488bac3663b7e9c90a8c06
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f825fe8e13adfec4cd488bac3663b7e9c90a8c06

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Thu Jun 25 07:18:31 2015 +0800

ilo: remove ilo_image_disable_aux()

Fail resource creation when aux bo allocation fails.

---

 src/gallium/drivers/ilo/core/ilo_image.c |   19 -------------------
 src/gallium/drivers/ilo/core/ilo_image.h |    3 ---
 src/gallium/drivers/ilo/ilo_resource.c   |    8 ++------
 3 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/src/gallium/drivers/ilo/core/ilo_image.c b/src/gallium/drivers/ilo/core/ilo_image.c
index 0d837d8..ed9b288 100644
--- a/src/gallium/drivers/ilo/core/ilo_image.c
+++ b/src/gallium/drivers/ilo/core/ilo_image.c
@@ -1449,22 +1449,3 @@ ilo_image_init_for_imported(struct ilo_image *img,
 
    return true;
 }
-
-bool
-ilo_image_disable_aux(struct ilo_image *img, const struct ilo_dev *dev)
-{
-   /* HiZ is required for separate stencil on Gen6 */
-   if (ilo_dev_gen(dev) == ILO_GEN(6) &&
-       img->aux.type == ILO_IMAGE_AUX_HIZ &&
-       img->separate_stencil)
-      return false;
-
-   /* MCS is required for multisample images */
-   if (img->aux.type == ILO_IMAGE_AUX_MCS &&
-       img->sample_count > 1)
-      return false;
-
-   img->aux.enables = 0x0;
-
-   return true;
-}
diff --git a/src/gallium/drivers/ilo/core/ilo_image.h b/src/gallium/drivers/ilo/core/ilo_image.h
index 77747ed..e5dcc43 100644
--- a/src/gallium/drivers/ilo/core/ilo_image.h
+++ b/src/gallium/drivers/ilo/core/ilo_image.h
@@ -157,9 +157,6 @@ ilo_image_init_for_imported(struct ilo_image *img,
                             enum gen_surface_tiling tiling,
                             unsigned bo_stride);
 
-bool
-ilo_image_disable_aux(struct ilo_image *img, const struct ilo_dev *dev);
-
 static inline bool
 ilo_image_can_enable_aux(const struct ilo_image *img, unsigned level)
 {
diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
index a0074e5..3b8e607 100644
--- a/src/gallium/drivers/ilo/ilo_resource.c
+++ b/src/gallium/drivers/ilo/ilo_resource.c
@@ -283,8 +283,6 @@ tex_destroy(struct ilo_texture *tex)
 static bool
 tex_alloc_bos(struct ilo_texture *tex)
 {
-   struct ilo_screen *is = ilo_screen(tex->base.screen);
-
    if (!tex->imported && !tex_create_bo(tex))
       return false;
 
@@ -294,13 +292,11 @@ tex_alloc_bos(struct ilo_texture *tex)
 
    switch (tex->image.aux.type) {
    case ILO_IMAGE_AUX_HIZ:
-      if (!tex_create_hiz(tex) &&
-          !ilo_image_disable_aux(&tex->image, &is->dev))
+      if (!tex_create_hiz(tex))
          return false;
       break;
    case ILO_IMAGE_AUX_MCS:
-      if (!tex_create_mcs(tex) &&
-          !ilo_image_disable_aux(&tex->image, &is->dev))
+      if (!tex_create_mcs(tex))
          return false;
       break;
    default:




More information about the mesa-commit mailing list