2018-10-15 23:37:09 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
#include "kernel/vc4_packet.h"
|
|
|
|
|
2019-05-06 17:58:34 +02:00
|
|
|
#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
|
|
|
{
|
2019-08-18 18:36:57 +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
|
|
|
}
|
2019-08-18 18:36:57 +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
|
|
|
}
|
|
|
|
}
|