made rendering work
This commit is contained in:
@@ -72,12 +72,19 @@ void CSlangVulkanSpirvShaderCompiler::CompileShader( const char *szInput, CCompi
|
||||
ISession *pSession = NULL;
|
||||
IBlob *pShaderSourceBlob = NULL;
|
||||
|
||||
if (filesystem == NULL)
|
||||
{
|
||||
|
||||
CreateInterfaceFn pFilesystemFactory = Sys_GetFactory("filesystem_std");
|
||||
filesystem = (IFileSystem*)pFilesystemFactory(FILESYSTEM_INTERFACE_VERSION, NULL);
|
||||
filesystem->Init();
|
||||
}
|
||||
IFileHandle *pFile = filesystem->Open(szInput, FILEMODE_READ);
|
||||
const char *szShaderSource = filesystem->ReadString(pFile);
|
||||
|
||||
int i = 0;
|
||||
|
||||
pShaderSourceBlob = slang_createBlob(szShaderSource, pFile->Size());
|
||||
pShaderSourceBlob = slang_createBlob(szShaderSource, filesystem->Size(pFile));
|
||||
filesystem->Close(pFile);
|
||||
|
||||
printf(" SLANG %s\n", szInput);
|
||||
|
||||
Reference in New Issue
Block a user