summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen6.c5
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen7.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.c b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
index c3ba9e37147..4dd5f13982a 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
@@ -1684,6 +1684,8 @@ ilo_gpe_init_view_surface_null_gen6(const struct ilo_dev_info *dev,
ILO_GPE_VALID_GEN(dev, 6, 6);
+ assert(width >= 1 && height >= 1 && depth >= 1);
+
/*
* From the Sandy Bridge PRM, volume 4 part 1, page 71:
*
@@ -2359,7 +2361,8 @@ ilo_gpe_set_fb(const struct ilo_dev_info *dev,
util_copy_framebuffer_state(&fb->state, state);
ilo_gpe_init_view_surface_null(dev,
- state->width, state->height,
+ (state->width) ? state->width : 1,
+ (state->height) ? state->height : 1,
1, 0, &fb->null_rt);
first = NULL;
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.c b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
index 3d3953713da..6f7399b7f42 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
@@ -243,6 +243,8 @@ ilo_gpe_init_view_surface_null_gen7(const struct ilo_dev_info *dev,
ILO_GPE_VALID_GEN(dev, 7, 7.5);
+ assert(width >= 1 && height >= 1 && depth >= 1);
+
/*
* From the Ivy Bridge PRM, volume 4 part 1, page 62:
*