equal
deleted
inserted
replaced
556 SDL_SetError("No shader matching the requested characteristics was found"); |
556 SDL_SetError("No shader matching the requested characteristics was found"); |
557 return NULL; |
557 return NULL; |
558 } |
558 } |
559 |
559 |
560 /* Find a matching shader instance that's supported on this hardware */ |
560 /* Find a matching shader instance that's supported on this hardware */ |
561 for (i = 0; i < shader->instance_count; ++i) |
561 for (i = 0; i < shader->instance_count && !instance; ++i) |
562 { |
562 { |
563 for (j = 0; j < rdata->shader_format_count; ++j) |
563 for (j = 0; j < rdata->shader_format_count && !instance; ++j) |
564 { |
564 { |
565 if (!shader->instances) |
565 if (!shader->instances) |
|
566 continue; |
|
567 if (!shader->instances[i]) |
566 continue; |
568 continue; |
567 if (shader->instances[i]->format != rdata->shader_formats[j]) |
569 if (shader->instances[i]->format != rdata->shader_formats[j]) |
568 continue; |
570 continue; |
569 instance = shader->instances[i]; |
571 instance = shader->instances[i]; |
570 break; |
|
571 } |
572 } |
572 } |
573 } |
573 if (!instance) |
574 if (!instance) |
574 { |
575 { |
575 SDL_SetError("The specified shader cannot be loaded on the current platform"); |
576 SDL_SetError("The specified shader cannot be loaded on the current platform"); |