Shader errors:

Count line from beginning of the whole shader source instead of each
string sepatately since it helps with finding out the error line in most
tested platforms
This commit is contained in:
2015-03-23 15:19:54 +01:00
parent e8b6d86f95
commit f5c33a2d48

View File

@@ -1407,12 +1407,12 @@ struct GPUShader {
static void shader_print_errors(const char *task, char *log, const char **code, int totcode)
{
int i;
int line = 1;
fprintf(stderr, "GPUShader: %s error:\n", task);
for (i = 0; i < totcode; i++) {
const char *c, *pos, *end = code[i] + strlen(code[i]);
int line = 1;
if ((G.debug & G_DEBUG)) {
fprintf(stderr, "===== shader string %d ====\n", i + 1);