1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-12-01 13:24:20 +01:00
rpi-vk-driver/driver/shader.c

42 lines
897 B
C
Raw Normal View History

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