Fix edge cases of various enumeration functions
- It is acceptable to pass a larger array to these functions than you
actually need. The functions are specified to overwrite the `count`
parameter with the number of elements actually written. Previously we
would assert in debug, or in release we would leave the input count
unmodified, which would lead an app which uses this pattern to
consider uninitialized junk to be valid elements.
- It is acceptable to provide a pointer to a result buffer *and* a
count of zero. This should return VK_INCOMPLETE if there are any
elements. We mishandled this in physical device and physical device
group queries.
Bug: b/117974925
Test: dEQP-VK.api.info.*
Change-Id: I2764831726bb4911ba4cab847fa4b404817508c5
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32749Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by:
Chris Forbes <chrisforbes@google.com>
Showing
Please
register
or
sign in
to comment