File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -292,6 +292,7 @@ SPS* CResourceManager::_CreatePS(LPCSTR _name)
292292 // TODO: DX10: HACK: Implement all shaders. Remove this for PS
293293 if (!file)
294294 {
295+ fallback:
295296 string1024 tmp;
296297 // TODO: HACK: Test failure
297298 // Memory.mem_compact();
@@ -315,6 +316,12 @@ SPS* CResourceManager::_CreatePS(LPCSTR _name)
315316
316317 VERIFY (SUCCEEDED (_hr));
317318
319+ if (!SUCCEEDED (_hr))
320+ {
321+ Log (" Can't create shader, replacing it with stub.." );
322+ goto fallback;
323+ }
324+
318325 // Parse constant, texture, sampler binding
319326 if (SUCCEEDED (_hr))
320327 {
@@ -368,6 +375,7 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
368375 // TODO: DX10: HACK: Implement all shaders. Remove this for PS
369376 if (!file)
370377 {
378+ fallback:
371379 string1024 tmp;
372380 // TODO: HACK: Test failure
373381 // Memory.mem_compact();
@@ -387,6 +395,12 @@ SGS* CResourceManager::_CreateGS(LPCSTR name)
387395
388396 VERIFY (SUCCEEDED (_hr));
389397
398+ if (!SUCCEEDED (_hr))
399+ {
400+ Log (" Can't create shader, replacing it with stub.." );
401+ goto fallback;
402+ }
403+
390404 // Parse constant, texture, sampler binding
391405 if (SUCCEEDED (_hr))
392406 {
You can’t perform that action at this time.
0 commit comments