05/49: wined3d: Only add line numbers for new lines in shader_addline().
This commit is contained in:
parent
b28bd67fd9
commit
cb26d59d26
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue