1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2025-01-20 12:52:15 +01:00

42 lines
897 B
C
Raw Normal View History

2018-10-15 22:37:09 +01:00
#include "common.h"
#include "kernel/vc4_packet.h"
#include "QPUassembler/qpu_assembler.h"
2019-09-30 20:38:35 +01:00
#include "vkExt.h"
2018-10-15 22:37:09 +01:00
/*
* https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#vkCreateShaderModule
*/
2019-09-29 23:52:21 +01:00
VkResult rpi_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
2018-10-15 22:37:09 +01:00
{
2019-09-30 01:13:55 +01:00
UNSUPPORTED(rpi_vkCreateShaderModule);
2020-02-08 19:38:29 +00:00
return UNSUPPORTED_RETURN;
2018-10-15 22:37:09 +01:00
}
2019-09-29 23:52:21 +01:00
void rpi_vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator)
2018-10-15 22:37:09 +01:00
{
assert(device);
_shaderModule* shader = shaderModule;
2019-02-09 16:18:15 +00:00
if(shader)
2018-10-15 22:37:09 +01:00
{
for(int c = 0; c < RPI_ASSEMBLY_TYPE_MAX; ++c)
2018-10-15 22:37:09 +01:00
{
2019-02-09 16:18:15 +00:00
if(shader->bos[c])
{
vc4_bo_free(controlFd, shader->bos[c], 0, shader->sizes[c]);
}
2018-10-15 22:37:09 +01:00
}
if(shader->numMappings>0)
{
FREE(shader->mappings);
}
2019-02-09 23:53:32 +00:00
FREE(shader);
2018-10-15 22:37:09 +01:00
}
}