MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / SafeDivision

Function SafeDivision

layers/utils/math_utils.h:171–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static inline VkDeviceSize SafeDivision(VkDeviceSize dividend, VkDeviceSize divisor) {
172 VkDeviceSize result = 0;
173 if (divisor != 0) {
174 result = dividend / divisor;
175 }
176 return result;
177}
178
179// For spots we care if one pointer is null, or if both are not null, are the same values
180static inline bool EqualValuesOrBothNull(const uint32_t* a, const uint32_t* b) {

Calls

no outgoing calls

Tested by

no test coverage detected