summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 6131cfb60e3..0c638d6b02d 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2159,8 +2159,8 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
db.SurfaceType = SURFTYPE_2D;
}
db.SurfaceFormat = D32_FLOAT;
- db.Width = fb->width - 1;
- db.Height = fb->height - 1;
+ db.Width = MAX2(fb->width, 1) - 1;
+ db.Height = MAX2(fb->height, 1) - 1;
db.StencilWriteEnable = has_stencil;
}
}