diff options
-rw-r--r-- | shaders.h | 14 | ||||
-rw-r--r-- | vulkan.c | 4 |
2 files changed, 10 insertions, 8 deletions
@@ -3,12 +3,14 @@ #include <stddef.h> -extern size_t _binary_vertex_spv_size; -extern void *_binary_vertex_spv_start; -extern void *_binary_vertex_spv_end; +extern char _binary_vertex_spv_start[]; +extern char _binary_vertex_spv_end[]; +#define vertex_spv_data _binary_vertex_spv_start +#define vertex_spv_size (_binary_vertex_spv_end - _binary_vertex_spv_start) -extern size_t _binary_fragment_spv_size; -extern void *_binary_fragment_spv_start; -extern void *_binary_fragment_spv_end; +extern char _binary_fragment_spv_start[]; +extern char _binary_fragment_spv_end[]; +#define fragment_spv_data _binary_fragment_spv_start +#define fragment_spv_size (_binary_fragment_spv_end - _binary_fragment_spv_start) #endif // VULKAN_SHADERS_H @@ -520,8 +520,8 @@ static void createpipeline(struct ppln *ppln, VkDevice dev, const VkExtent2D *ex if (res != VK_SUCCESS) eprintf("Could not create pipeline layout"); - vsmod = createsmod(dev, _binary_vertex_spv_start, _binary_vertex_spv_size); - fsmod = createsmod(dev, _binary_fragment_spv_start, _binary_fragment_spv_size); + vsmod = createsmod(dev, vertex_spv_data, vertex_spv_size); + fsmod = createsmod(dev, fragment_spv_data, fragment_spv_size); gpcinf = (VkGraphicsPipelineCreateInfo){ .sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, |