29 lines
734 B
C++
29 lines
734 B
C++
#include "shaderparser.h"
|
|
|
|
CUtlVector<VulkanDescriptor_t> CVkShaderParser::GetDescriptors( CCompiledShader *pShader, EShaderStage eStage )
|
|
{
|
|
CUtlVector<VulkanDescriptor_t> descriptors = {};
|
|
|
|
return descriptors;
|
|
};
|
|
CUtlBuffer<unsigned char> CVkShaderParser::GetShaderCode( CCompiledShader *pShader, EShaderStage eStage )
|
|
{
|
|
for ( auto &o: pShader->m_objects )
|
|
{
|
|
if (o.m_eStage != eStage)
|
|
continue;
|
|
|
|
CUtlBuffer<unsigned char> code = CUtlBuffer<unsigned char>(pShader->GetLumpSize(o.m_nDataLump));
|
|
V_memcpy(code, pShader->GetLumpPtr(o.m_nDataLump), code.GetSize());
|
|
return code;
|
|
}
|
|
|
|
return NULL;
|
|
};
|
|
|
|
CVkShaderParser *ShaderParser()
|
|
{
|
|
static CVkShaderParser s_shaderParser = CVkShaderParser();
|
|
return &s_shaderParser;
|
|
};
|