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