summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-04-09 16:54:55 +0200
committerJuan A. Suarez Romero <[email protected]>2018-04-12 21:49:31 +0200
commit362c4f4c72966e50b47999ea16225b095f52a38d (patch)
tree2f1313eb298db9a3a771de0302decff7874a6557
parentd2991fc2c6076a5efd2fd9e5a3ecd0f0e186807a (diff)
radv: Always reset draw user SGPRs after secondary command buffer.
As we sometimes reset them to -1, -1 does not mean that they are not written by the secondary command buffer. Fixes: ad11fc3571 "radv: don't emit unneeded vertex state." Reviewed-by: Samuel Pitoiset <[email protected]> (cherry picked from commit 41fbcc7901bc7a95fb7d5ccffdb3c18ba0361c40)
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 3e3b172da58..1fd208f483b 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -3006,20 +3006,9 @@ void radv_CmdExecuteCommands(
secondary->state.last_ia_multi_vgt_param;
}
- if (secondary->state.last_first_instance != -1) {
- primary->state.last_first_instance =
- secondary->state.last_first_instance;
- }
-
- if (secondary->state.last_num_instances != -1) {
- primary->state.last_num_instances =
- secondary->state.last_num_instances;
- }
-
- if (secondary->state.last_vertex_offset != -1) {
- primary->state.last_vertex_offset =
- secondary->state.last_vertex_offset;
- }
+ primary->state.last_first_instance = secondary->state.last_first_instance;
+ primary->state.last_num_instances = secondary->state.last_num_instances;
+ primary->state.last_vertex_offset = secondary->state.last_vertex_offset;
if (secondary->state.last_index_type != -1) {
primary->state.last_index_type =