Module: Mesa Branch: 17.1 Commit: 3f3e925d404c8524c342b72c32e4c151e293b2c9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f3e925d404c8524c342b72c32e4c151e293b2c9
Author: Dave Airlie <[email protected]> Date: Thu Aug 17 02:08:46 2017 +0100 radv: don't crash if we have no framebuffer Recording secondaries with no framebuffer attachment may make this happen, though this might not be the complete solution. (esp if someone does meta stuff in there, would we have to save things, not sure). Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 4a091b0788664f73bbb35c14d04c00cebf37e17a) [Andres Gomez: resolve trivial conflicts] Signed-off-by: Andres Gomez <[email protected]> Conflicts: src/amd/vulkan/radv_cmd_buffer.c --- src/amd/vulkan/radv_cmd_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 303a3da2bd..4d8a27f98d 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1106,6 +1106,10 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer) const struct radv_subpass *subpass = cmd_buffer->state.subpass; int dst_resolve_micro_tile_mode = -1; + /* this may happen for inherited secondary recording */ + if (!framebuffer) + return; + if (subpass->has_resolve) { uint32_t a = subpass->resolve_attachments[0].attachment; const struct radv_image *image = framebuffer->attachments[a].attachment->image; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
