mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
vulkan: Add a static assert
We don't want to make the push constants larger than what the spec guarantees. And that is 128 bytes, see value for maxPushConstantsSize in table 55 of https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minmax
This commit is contained in:
parent
186e056c56
commit
c479f93372
@ -15,6 +15,12 @@ struct _GskVulkanPushConstantsWire
|
||||
} common;
|
||||
};
|
||||
|
||||
/* This is the value we know every conformant GPU must provide.
|
||||
* See value for maxPushConstantsSize in table 55 of
|
||||
* https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minmax
|
||||
*/
|
||||
G_STATIC_ASSERT (sizeof (GskVulkanPushConstantsWire) <= 128);
|
||||
|
||||
void
|
||||
gsk_vulkan_push_constants_init (GskVulkanPushConstants *constants,
|
||||
const graphene_matrix_t *mvp,
|
||||
|
Loading…
Reference in New Issue
Block a user