projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bba767a
)
vk/x11: Allow for the client querying the size of the format properties
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 1 Jul 2015 21:17:52 +0000
(14:17 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 1 Jul 2015 21:18:07 +0000
(14:18 -0700)
src/vulkan/x11.c
patch
|
blob
|
history
diff --git
a/src/vulkan/x11.c
b/src/vulkan/x11.c
index d49b93331a824946350613fefbca6e5f2a6307f5..a98d5e2607b431bed61ee39988b17aa1c5853ffa 100644
(file)
--- a/
src/vulkan/x11.c
+++ b/
src/vulkan/x11.c
@@
-48,10
+48,17
@@
VkResult anv_GetDisplayInfoWSI(
switch (infoType) {
case VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI:
size = sizeof(properties[0]) * ARRAY_SIZE(formats);
- if (pData && *pDataSize < size)
+
+ if (pData == NULL) {
+ *pDataSize = size;
+ return VK_SUCCESS;
+ }
+
+ if (*pDataSize < size)
return vk_error(VK_ERROR_INVALID_VALUE);
*pDataSize = size;
+
for (uint32_t i = 0; i < ARRAY_SIZE(formats); i++)
properties[i].swapChainFormat = formats[i];