Module: Mesa
Branch: master
Commit: 4c77e21c814145e845bac64cce40eadfd7ac0bd9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4c77e21c814145e845bac64cce40eadfd7ac0bd9

Author: Jason Ekstrand <jason.ekstr...@intel.com>
Date:   Mon Feb 12 08:17:57 2018 -0800

anv: Move setting current_pipeline to cmd_state_init

We were setting current_pipeline to UINT32_MAX and then calling
cmd_cmd_state_reset which memsets the entire state struct to 0 which
implicitly resets current_pipeline to 3D.  I have no idea how this
hasn't caused everything to explode.

Fixes: cd3feea74582 "anv/cmd_buffer: Rework anv_cmd_state_reset"
cc: mesa-sta...@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>

---

 src/intel/vulkan/anv_cmd_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_cmd_buffer.c 
b/src/intel/vulkan/anv_cmd_buffer.c
index 698028123c..160ff5323d 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -119,6 +119,7 @@ anv_cmd_state_init(struct anv_cmd_buffer *cmd_buffer)
 
    memset(state, 0, sizeof(*state));
 
+   state->current_pipeline = UINT32_MAX;
    state->restart_index = UINT32_MAX;
    state->gfx.dynamic = default_dynamic_state;
 }
@@ -292,7 +293,6 @@ VkResult
 anv_cmd_buffer_reset(struct anv_cmd_buffer *cmd_buffer)
 {
    cmd_buffer->usage_flags = 0;
-   cmd_buffer->state.current_pipeline = UINT32_MAX;
    anv_cmd_buffer_reset_batch_bo_chain(cmd_buffer);
    anv_cmd_state_reset(cmd_buffer);
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to