Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: Fix Crashes caused by not using NewXXX ctor #2041

Merged
merged 2 commits into from
Jul 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions gapis/api/vulkan/command_buffer_rebuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,7 @@ func rebuildVkCmdSetBlendConstants(
s *api.GlobalState,
d VkCmdSetBlendConstantsArgsʳ) (func(), api.Cmd, error) {

var constants F32ː4ᵃ
constants.Set(0, d.R())
constants.Set(1, d.G())
constants.Set(2, d.B())
constants.Set(3, d.A())
constants := NewF32ː4ᵃ(s.Arena, d.R(), d.G(), d.B(), d.A())

return func() {}, cb.VkCmdSetBlendConstants(commandBuffer, constants), nil
}
Expand Down Expand Up @@ -1130,11 +1126,7 @@ func rebuildVkCmdDebugMarkerInsertEXT(
a := s.Arena // TODO: Should this be a seperate temporary arena?

markerNameData := s.AllocDataOrPanic(ctx, d.MarkerName())
var color F32ː4ᵃ
color.Set(0, d.Color().Get(0))
color.Set(1, d.Color().Get(1))
color.Set(2, d.Color().Get(2))
color.Set(3, d.Color().Get(3))
color := NewF32ː4ᵃ(a, d.Color().Get(0), d.Color().Get(1), d.Color().Get(2), d.Color().Get(3))
markerInfoData := s.AllocDataOrPanic(ctx,
NewVkDebugMarkerMarkerInfoEXT(a,
VkStructureType_VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT,
Expand Down