Commit cb26d59d authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

05/49: wined3d: Only add line numbers for new lines in shader_addline().

parent b28bd67f
......@@ -57,9 +57,18 @@ int shader_addline(
return -1;
}
if (buffer->newline) {
TRACE("GL HW (%u, %u) : %s", buffer->lineNo + 1, buffer->bsize, base);
buffer->newline = FALSE;
} else {
TRACE(base);
}
buffer->bsize += rc;
buffer->lineNo++;
TRACE("GL HW (%u, %u) : %s", buffer->lineNo, buffer->bsize, base);
if (buffer->buffer[buffer->bsize-1] == '\n') {
buffer->lineNo++;
buffer->newline = TRUE;
}
return 0;
}
......
......@@ -832,6 +832,7 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateShader(
#endif
buffer.bsize = 0;
buffer.lineNo = 0;
buffer.newline = TRUE;
if (This->baseShader.shader_mode == SHADER_GLSL) {
......
......@@ -715,6 +715,7 @@ static VOID IWineD3DVertexShaderImpl_GenerateShader(
#endif
buffer.bsize = 0;
buffer.lineNo = 0;
buffer.newline = TRUE;
if (This->baseShader.shader_mode == SHADER_GLSL) {
......
......@@ -1491,6 +1491,7 @@ typedef struct SHADER_BUFFER {
char* buffer;
unsigned int bsize;
unsigned int lineNo;
BOOL newline;
} SHADER_BUFFER;
/* Undocumented opcode controls */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment