Commit 40b41195 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Rename "SHADER_BUFFER" to something sane.

parent bddc4d3f
......@@ -138,7 +138,7 @@ const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token
}
}
void shader_buffer_clear(struct SHADER_BUFFER *buffer)
void shader_buffer_clear(struct wined3d_shader_buffer *buffer)
{
buffer->buffer[0] = '\0';
buffer->bsize = 0;
......@@ -146,18 +146,18 @@ void shader_buffer_clear(struct SHADER_BUFFER *buffer)
buffer->newline = TRUE;
}
void shader_buffer_init(struct SHADER_BUFFER *buffer)
void shader_buffer_init(struct wined3d_shader_buffer *buffer)
{
buffer->buffer = HeapAlloc(GetProcessHeap(), 0, SHADER_PGMSIZE);
shader_buffer_clear(buffer);
}
void shader_buffer_free(struct SHADER_BUFFER *buffer)
void shader_buffer_free(struct wined3d_shader_buffer *buffer)
{
HeapFree(GetProcessHeap(), 0, buffer->buffer);
}
int shader_vaddline(SHADER_BUFFER* buffer, const char *format, va_list args)
int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *format, va_list args)
{
char* base = buffer->buffer + buffer->bsize;
int rc;
......@@ -187,7 +187,7 @@ int shader_vaddline(SHADER_BUFFER* buffer, const char *format, va_list args)
return 0;
}
int shader_addline(SHADER_BUFFER* buffer, const char *format, ...)
int shader_addline(struct wined3d_shader_buffer *buffer, const char *format, ...)
{
int ret;
va_list args;
......@@ -1034,7 +1034,7 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param,
/* Shared code in order to generate the bulk of the shader string.
* NOTE: A description of how to parse tokens can be found on msdn */
void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer,
const shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx)
{
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
......
......@@ -505,12 +505,14 @@ typedef enum COMPARISON_TYPE
#define MAX_LABELS 16
#define SHADER_PGMSIZE 65535
typedef struct SHADER_BUFFER {
char* buffer;
struct wined3d_shader_buffer
{
char *buffer;
unsigned int bsize;
unsigned int lineNo;
BOOL newline;
} SHADER_BUFFER;
};
enum WINED3D_SHADER_INSTRUCTION_HANDLER
{
......@@ -659,7 +661,7 @@ struct wined3d_shader_context
{
IWineD3DBaseShader *shader;
const struct shader_reg_maps *reg_maps;
SHADER_BUFFER *buffer;
struct wined3d_shader_buffer *buffer;
void *backend_data;
};
......@@ -2548,12 +2550,9 @@ typedef struct SHADER_PARSE_STATE {
#define PRINTF_ATTR(fmt,args)
#endif
/* Base Shader utility functions.
* (may move callers into the same file in the future) */
extern int shader_addline(
SHADER_BUFFER* buffer,
const char* fmt, ...) PRINTF_ATTR(2,3);
int shader_vaddline(SHADER_BUFFER *buffer, const char *fmt, va_list args);
/* Base Shader utility functions. */
int shader_addline(struct wined3d_shader_buffer *buffer, const char *fmt, ...) PRINTF_ATTR(2,3);
int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *fmt, va_list args);
/* Vertex shader utility functions */
extern BOOL vshader_get_input(
......@@ -2601,15 +2600,15 @@ typedef struct IWineD3DBaseShaderImpl {
IWineD3DBaseShaderClass baseShader;
} IWineD3DBaseShaderImpl;
void shader_buffer_clear(struct SHADER_BUFFER *buffer);
void shader_buffer_init(struct SHADER_BUFFER *buffer);
void shader_buffer_free(struct SHADER_BUFFER *buffer);
void shader_buffer_clear(struct wined3d_shader_buffer *buffer);
void shader_buffer_init(struct wined3d_shader_buffer *buffer);
void shader_buffer_free(struct wined3d_shader_buffer *buffer);
void shader_cleanup(IWineD3DBaseShader *iface);
void shader_dump_src_param(const struct wined3d_shader_src_param *param,
const struct wined3d_shader_version *shader_version);
void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
const struct wined3d_shader_version *shader_version);
void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer,
const shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx);
HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe,
struct shader_reg_maps *reg_maps, struct wined3d_shader_attribute *attributes,
......
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