diff options
| author | Bob Ellison <bob@lunarg.com> | 2019-01-22 15:32:24 -0700 |
|---|---|---|
| committer | Bob Ellison <45772930+lunarpapillo@users.noreply.github.com> | 2019-01-22 16:04:22 -0700 |
| commit | 01402386ecc9080f0f8e0c4e194958a0868d1027 (patch) | |
| tree | aca41d10fbf3545ae7fef2f5133cd9d304c075c7 | |
| parent | 927e74eb8e0c89619f5db999ea9d0f2d0e117934 (diff) | |
| download | usermoji-01402386ecc9080f0f8e0c4e194958a0868d1027.tar.xz | |
issue 126: fix vulkaninfo segfault on 1.0 devices
We didn't quite get the check on whether a format can be legally
queried on a particular GPU quite right. We were checking against
the instance version only. We need to check agains the driver's
supported API version as well.
| -rw-r--r-- | vulkaninfo/vulkaninfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vulkaninfo/vulkaninfo.c b/vulkaninfo/vulkaninfo.c index 4fa2acf1..7857d2c3 100644 --- a/vulkaninfo/vulkaninfo.c +++ b/vulkaninfo/vulkaninfo.c @@ -1987,8 +1987,10 @@ static struct FormatRange { // Helper function to determine whether a format range is currently supported. bool FormatRangeSupported(const struct FormatRange *format_range, const struct AppGpu *gpu) { - // True if standard and supported by this instance - if (format_range->minimum_instance_version > 0 && gpu->inst->instance_version >= format_range->minimum_instance_version) { + // True if standard and supported by both this instance and this GPU + if (format_range->minimum_instance_version > 0 && + gpu->inst->instance_version >= format_range->minimum_instance_version && + gpu->props.apiVersion >= format_range->minimum_instance_version) { return true; } |
