From c4564f62aa8fce78eb4be0fe4a342b677ddcd9c7 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Fri, 17 Jul 2020 12:28:46 +0200 Subject: [PATCH] v3dv: emit new shader state if viewport is dirty If we have a dirty viewport then we need to re-emit our uniforms to update QUNIFORM_VIEWPORT_*. Part-of: --- src/broadcom/vulkan/v3dv_cmd_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c index bd960a8dff4..8dc29aa16f7 100644 --- a/src/broadcom/vulkan/v3dv_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c @@ -3896,11 +3896,15 @@ cmd_buffer_emit_pre_draw(struct v3dv_cmd_buffer *cmd_buffer) /* GL shader state binds shaders, uniform and vertex attribute state. The * compiler injects uniforms to handle some descriptor types (such as * textures), so we need to regen that when descriptor state changes. + * + * We also need to emit new shader state if we have a dirty viewport since + * that will require that we new uniform state for QUNIFORM_VIEWPORT_*. */ if (*dirty & (V3DV_CMD_DIRTY_PIPELINE | V3DV_CMD_DIRTY_VERTEX_BUFFER | V3DV_CMD_DIRTY_DESCRIPTOR_SETS | - V3DV_CMD_DIRTY_PUSH_CONSTANTS)) { + V3DV_CMD_DIRTY_PUSH_CONSTANTS | + V3DV_CMD_DIRTY_VIEWPORT)) { emit_gl_shader_state(cmd_buffer); }