summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/si_cmd_buffer.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-03-01 02:14:08 +0100
committerBas Nieuwenhuizen <[email protected]>2017-03-30 22:21:14 +0200
commit76603aa90b884c91599595dfce36b833fb2409f7 (patch)
treea16eebefe338df9e36258534c4682aeec5d8d78b /src/amd/vulkan/si_cmd_buffer.c
parent4083a2ddcb02a6e79bcc21b3f5b20e10dcef73b1 (diff)
radv: Drop the default viewport when 0 viewports are given.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/si_cmd_buffer.c')
-rw-r--r--src/amd/vulkan/si_cmd_buffer.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index 49c99bcab77..357b5172cbe 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -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++) {