-
Notifications
You must be signed in to change notification settings - Fork 327
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: Allocation optimization for byte slice during state rebuilding #2017
Vulkan: Allocation optimization for byte slice during state rebuilding #2017
Conversation
gapis/api/vulkan/state_rebuilder.go
Outdated
func (sb *stateBuilder) allocAndFillScratchBuffer(device DeviceObjectʳ, data []uint8, usages ...VkBufferUsageFlagBits) (VkBuffer, VkDeviceMemory) { | ||
buffer := VkBuffer(newUnusedID(true, func(x uint64) bool { return sb.s.Buffers().Contains(VkBuffer(x)) })) | ||
deviceMemory := VkDeviceMemory(newUnusedID(true, func(x uint64) bool { return sb.s.DeviceMemories().Contains(VkDeviceMemory(x)) })) | ||
type bufSubRngFillInfo struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For class names, can we use the full words, bufferSubRangeFillInfo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor requests.
For a typical Vulkan application, this saves ~300MB memory used for storing the slice data.
8ec5077
to
b113ceb
Compare
Do not handle the data used in "image priming through imageStore", as
|
For a typical Vulkan application, this saves ~200MB memory used for
storing the slice data.