wined3d: Rename bsize to content_size to reflect usage.

This commit is contained in:
Ričardas Barkauskas 2013-02-25 22:49:29 +02:00 committed by Alexandre Julliard
parent 2d449b76e1
commit b5ff0a6983
3 changed files with 11 additions and 11 deletions

View File

@ -3890,7 +3890,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
TRACE("Created hw pixel shader, prg=%d\n", retval);
/* Create the program and check for errors */
GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
buffer->bsize, buffer->buffer));
buffer->content_size, buffer->buffer));
checkGLcall("glProgramStringARB()");
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
@ -4303,7 +4303,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader,
TRACE("Created hw vertex shader, prg=%d\n", ret);
/* Create the program and check for errors */
GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
buffer->bsize, buffer->buffer));
buffer->content_size, buffer->buffer));
checkGLcall("glProgramStringARB()");
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);

View File

@ -238,7 +238,7 @@ static const struct wined3d_shader_frontend *shader_select_frontend(DWORD versio
void shader_buffer_clear(struct wined3d_shader_buffer *buffer)
{
buffer->buffer[0] = '\0';
buffer->bsize = 0;
buffer->content_size = 0;
buffer->lineNo = 0;
buffer->newline = TRUE;
}
@ -263,22 +263,22 @@ void shader_buffer_free(struct wined3d_shader_buffer *buffer)
int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *format, va_list args)
{
char *base = buffer->buffer + buffer->bsize;
char *base = buffer->buffer + buffer->content_size;
int rc;
rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args);
rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->content_size, format, args);
if (rc < 0 /* C89 */ || (unsigned int)rc > SHADER_PGMSIZE - 1 - buffer->bsize /* C99 */)
if (rc < 0 /* C89 */ || (unsigned int)rc > SHADER_PGMSIZE - 1 - buffer->content_size /* C99 */)
{
ERR("The buffer allocated for the shader program string "
"is too small at %d bytes.\n", SHADER_PGMSIZE);
buffer->bsize = SHADER_PGMSIZE - 1;
buffer->content_size = SHADER_PGMSIZE - 1;
return -1;
}
if (buffer->newline)
{
TRACE("GL HW (%u, %u) : %s", buffer->lineNo + 1, buffer->bsize, base);
TRACE("GL HW (%u, %u) : %s", buffer->lineNo + 1, buffer->content_size, base);
buffer->newline = FALSE;
}
else
@ -286,8 +286,8 @@ int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *format, va
TRACE("%s", base);
}
buffer->bsize += rc;
if (buffer->buffer[buffer->bsize-1] == '\n')
buffer->content_size += rc;
if (buffer->buffer[buffer->content_size-1] == '\n')
{
++buffer->lineNo;
buffer->newline = TRUE;

View File

@ -407,7 +407,7 @@ enum wined3d_shader_rel_op
struct wined3d_shader_buffer
{
char *buffer;
unsigned int bsize;
unsigned int content_size;
unsigned int lineNo;
BOOL newline;
};