working on rendering
This commit is contained in:
28
materialsystem/vulkan/shaderparser.cpp
Normal file
28
materialsystem/vulkan/shaderparser.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user