From: Jonathan Marek Date: Thu, 27 Feb 2020 16:20:59 +0000 (-0500) Subject: turnip: remove unnecessary fb size check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de3230e0a5d90911f8a4e376629e264278dffc00;p=mesa.git turnip: remove unnecessary fb size check Framebuffer with 0 width or height is not valid. Signed-off-by: Jonathan Marek Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index f8e1ffe1c9d..a3d5a93f3a3 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -1480,13 +1480,9 @@ tu6_sysmem_render_begin(struct tu_cmd_buffer *cmd, struct tu_cs *cs, const struct VkRect2D *renderArea) { const struct tu_framebuffer *fb = cmd->state.framebuffer; - if (fb->width > 0 && fb->height > 0) { - tu6_emit_window_scissor(cmd, cs, - 0, 0, fb->width - 1, fb->height - 1); - } else { - tu6_emit_window_scissor(cmd, cs, 0, 0, 0, 0); - } + assert(fb->width > 0 && fb->height > 0); + tu6_emit_window_scissor(cmd, cs, 0, 0, fb->width - 1, fb->height - 1); tu6_emit_window_offset(cmd, cs, 0, 0); tu6_emit_bin_size(cs, 0, 0, 0xc00000); /* 0xc00000 = BYPASS? */