mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-12 09:48:30 +12:00
hack: don't attempt to compile shaders with errors
This commit is contained in:
parent
a6c8d83436
commit
bbed00751f
3 changed files with 17 additions and 0 deletions
|
@ -218,12 +218,20 @@ void RendererShaderMtl::Compile(const std::string& mslCode)
|
|||
if (m_function)
|
||||
m_function->release();
|
||||
|
||||
// HACK
|
||||
if (m_hasError)
|
||||
return;
|
||||
|
||||
NS::Error* error = nullptr;
|
||||
MTL::Library* library = m_mtlr->GetDevice()->newLibrary(ToNSString(mslCode), nullptr, &error);
|
||||
if (error)
|
||||
{
|
||||
printf("failed to create library (error: %s) -> source:\n%s\n", error->localizedDescription()->utf8String(), mslCode.c_str());
|
||||
error->release();
|
||||
|
||||
// HACK
|
||||
m_hasError = true;
|
||||
|
||||
return;
|
||||
}
|
||||
m_function = library->newFunction(ToNSString("main0"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue