radv: Drop the default viewport when 0 viewports are given.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 1 Mar 2017 01:14:08 +0000 (02:14 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 30 Mar 2017 20:21:14 +0000 (22:21 +0200)
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/si_cmd_buffer.c

index 49c99bcab77892ffacf7d5eaaaee46071586a9ca..357b5172cbe2faeef8c686f558d65e8a0567da6a 100644 (file)
@@ -506,21 +506,7 @@ si_write_viewport(struct radeon_winsys_cs *cs, int first_vp,
 {
        int i;
 
-       if (count == 0) {
-               radeon_set_context_reg_seq(cs, R_02843C_PA_CL_VPORT_XSCALE, 6);
-               radeon_emit(cs, fui(1.0));
-               radeon_emit(cs, fui(0.0));
-               radeon_emit(cs, fui(1.0));
-               radeon_emit(cs, fui(0.0));
-               radeon_emit(cs, fui(1.0));
-               radeon_emit(cs, fui(0.0));
-
-               radeon_set_context_reg_seq(cs, R_0282D0_PA_SC_VPORT_ZMIN_0, 2);
-               radeon_emit(cs, fui(0.0));
-               radeon_emit(cs, fui(1.0));
-
-               return;
-       }
+       assert(count);
        radeon_set_context_reg_seq(cs, R_02843C_PA_CL_VPORT_XSCALE +
                                   first_vp * 4 * 6, count * 6);
 
@@ -552,8 +538,7 @@ si_write_scissors(struct radeon_winsys_cs *cs, int first,
                   int count, const VkRect2D *scissors)
 {
        int i;
-       if (count == 0)
-               return;
+       assert(count);
 
        radeon_set_context_reg_seq(cs, R_028250_PA_SC_VPORT_SCISSOR_0_TL + first * 4 * 2, count * 2);
        for (i = 0; i < count; i++) {