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

This commit is contained in:
H. Verbeet 2007-01-15 19:30:41 +01:00 committed by Alexandre Julliard
parent b28bd67fd9
commit cb26d59d26
4 changed files with 14 additions and 2 deletions

View File

@ -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;
if (buffer->buffer[buffer->bsize-1] == '\n') {
buffer->lineNo++;
TRACE("GL HW (%u, %u) : %s", buffer->lineNo, buffer->bsize, base);
buffer->newline = TRUE;
}
return 0;
}

View File

@ -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) {

View File

@ -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) {

View File

@ -1491,6 +1491,7 @@ typedef struct SHADER_BUFFER {
char* buffer;
unsigned int bsize;
unsigned int lineNo;
BOOL newline;
} SHADER_BUFFER;
/* Undocumented opcode controls */