wined3d: Const correctness fixes for arb_program_shader.c.
Henri Verbeet
hverbeet at codeweavers.com
Tue Nov 25 07:36:09 CST 2008
---
dlls/wined3d/arb_program_shader.c | 84 +++++++++++++++++-----------------
dlls/wined3d/ati_fragment_shader.c | 3 +-
dlls/wined3d/baseshader.c | 14 ++---
dlls/wined3d/glsl_shader.c | 6 ++-
dlls/wined3d/nvidia_texture_shader.c | 3 +-
dlls/wined3d/state.c | 3 +-
dlls/wined3d/wined3d_private.h | 15 ++----
7 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 54b4771..9194673 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -66,8 +66,9 @@ struct shader_arb_priv {
* @target_type should be either GL_VERTEX_PROGRAM_ARB (for vertex shaders)
* or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders)
*/
-static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, WineD3D_GL_Info *gl_info, GLuint target_type,
- unsigned int max_constants, float* constants, char *dirty_consts) {
+static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, const WineD3D_GL_Info *gl_info,
+ GLuint target_type, unsigned int max_constants, const float *constants, char *dirty_consts)
+{
local_constant* lconst;
DWORD i, j;
unsigned int ret;
@@ -173,7 +174,7 @@ static void shader_arb_load_constants(
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
- WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
unsigned char i;
if (useVertexShader) {
@@ -205,7 +206,7 @@ static void shader_arb_load_constants(
for(i = 0; i < psi->numbumpenvmatconsts; i++) {
/* The state manager takes care that this function is always called if the bump env matrix changes
*/
- float *data = (float *) &stateBlock->textureState[(int) psi->bumpenvmatconst[i].texunit][WINED3DTSS_BUMPENVMAT00];
+ const float *data = (const float *)&stateBlock->textureState[(int) psi->bumpenvmatconst[i].texunit][WINED3DTSS_BUMPENVMAT00];
GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, psi->bumpenvmatconst[i].const_num, data));
deviceImpl->activeContext->pshader_const_dirty[psi->bumpenvmatconst[i].const_num] = 1;
@@ -215,7 +216,7 @@ static void shader_arb_load_constants(
* don't care about them. The pointers are valid for sure because the stateblock is bigger.
* (they're WINED3DTSS_TEXTURETRANSFORMFLAGS and WINED3DTSS_ADDRESSW, so most likely 0 or NaN
*/
- float *scale = (float *) &stateBlock->textureState[(int) psi->luminanceconst[i].texunit][WINED3DTSS_BUMPENVLSCALE];
+ const float *scale = (const float *)&stateBlock->textureState[(int) psi->luminanceconst[i].texunit][WINED3DTSS_BUMPENVLSCALE];
GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, psi->luminanceconst[i].const_num, scale));
deviceImpl->activeContext->pshader_const_dirty[psi->luminanceconst[i].const_num] = 1;
}
@@ -224,12 +225,9 @@ static void shader_arb_load_constants(
}
/* Generate the variable & register declarations for the ARB_vertex_program output target */
-static void shader_generate_arb_declarations(
- IWineD3DBaseShader *iface,
- shader_reg_maps* reg_maps,
- SHADER_BUFFER* buffer,
- WineD3D_GL_Info* gl_info) {
-
+static void shader_generate_arb_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps,
+ SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_info)
+{
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device;
DWORD i, cur;
@@ -237,7 +235,7 @@ static void shader_generate_arb_declarations(
unsigned max_constantsF = min(This->baseShader.limits.constant_float,
(pshader ? GL_LIMITS(pshader_constantsF) : GL_LIMITS(vshader_constantsF)));
UINT extra_constants_needed = 0;
- local_constant* lconst;
+ const local_constant *lconst;
/* Temporary Output register */
shader_addline(buffer, "TEMP TMP_OUT;\n");
@@ -599,7 +597,8 @@ static void shader_hw_sample(const SHADER_OPCODE_ARG *arg, DWORD sampler_idx, co
static void gen_color_correction(SHADER_BUFFER *buffer, const char *reg, const char *writemask,
const char *one, const char *two, WINED3DFORMAT fmt,
- WineD3D_GL_Info *gl_info) {
+ const WineD3D_GL_Info *gl_info)
+{
switch(fmt) {
case WINED3DFMT_V8U8:
case WINED3DFMT_V16U16:
@@ -744,10 +743,11 @@ static void gen_color_correction(SHADER_BUFFER *buffer, const char *reg, const c
}
}
-static void shader_arb_color_correction(SHADER_OPCODE_ARG* arg) {
+static void shader_arb_color_correction(const SHADER_OPCODE_ARG* arg)
+{
IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) shader->baseShader.device;
- WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
WINED3DFORMAT fmt;
WINED3DFORMAT conversion_group;
IWineD3DBaseTextureImpl *texture;
@@ -886,13 +886,9 @@ static void pshader_gen_input_modifier_line (
sprintf(outregstr, "T%c%s", 'A' + tmpreg, swzstr);
}
-static inline void pshader_gen_output_modifier_line(
- SHADER_BUFFER* buffer,
- int saturate,
- char *write_mask,
- int shift,
- char *regstr) {
-
+static inline void pshader_gen_output_modifier_line(SHADER_BUFFER *buffer, int saturate, const char *write_mask,
+ int shift, const char *regstr)
+{
/* Generate a line that does the output modifier computation */
shader_addline(buffer, "MUL%s %s%s, %s, %s;\n", saturate ? "_SAT" : "",
regstr, write_mask, regstr, shift_tab[shift]);
@@ -1752,7 +1748,8 @@ static void shader_hw_sincos(const SHADER_OPCODE_ARG *arg)
}
-static GLuint create_arb_blt_vertex_program(WineD3D_GL_Info *gl_info) {
+static GLuint create_arb_blt_vertex_program(const WineD3D_GL_Info *gl_info)
+{
GLuint program_id = 0;
const char *blt_vprogram =
"!!ARBvp1.0\n"
@@ -1776,7 +1773,7 @@ static GLuint create_arb_blt_vertex_program(WineD3D_GL_Info *gl_info) {
return program_id;
}
-static GLuint create_arb_blt_fragment_program(WineD3D_GL_Info *gl_info, enum tex_types tex_type)
+static GLuint create_arb_blt_fragment_program(const WineD3D_GL_Info *gl_info, enum tex_types tex_type)
{
GLuint program_id = 0;
const char *blt_fprograms[tex_type_count] =
@@ -1828,7 +1825,7 @@ static GLuint create_arb_blt_fragment_program(WineD3D_GL_Info *gl_info, enum tex
static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
- WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
if (useVS) {
TRACE("Using vertex shader\n");
@@ -1882,7 +1879,7 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
GLuint *blt_fprogram = &priv->depth_blt_fprogram_id[tex_type];
- WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info);
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->depth_blt_vprogram_id));
@@ -1896,7 +1893,7 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te
static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
- WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
if (priv->current_vprogram_id) {
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
@@ -1927,14 +1924,14 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
static void shader_arb_cleanup(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
- WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
if (GL_SUPPORT(ARB_VERTEX_PROGRAM)) glDisable(GL_VERTEX_PROGRAM_ARB);
if (GL_SUPPORT(ARB_FRAGMENT_PROGRAM)) glDisable(GL_FRAGMENT_PROGRAM_ARB);
}
static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface;
- WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *) baseShader->baseShader.device)->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)baseShader->baseShader.device)->adapter->gl_info;
char pshader = shader_is_pshader_version(baseShader->baseShader.hex_version);
if(pshader) {
@@ -1970,7 +1967,7 @@ static HRESULT shader_arb_alloc(IWineD3DDevice *iface) {
static void shader_arb_free(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
- WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
+ const WineD3D_GL_Info *gl_info = &This->adapter->gl_info;
struct shader_arb_priv *priv = (struct shader_arb_priv *) This->shader_priv;
int i;
@@ -2014,11 +2011,11 @@ static void arbfp_add_sRGB_correction(SHADER_BUFFER *buffer, const char *fragcol
static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer) {
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
- shader_reg_maps* reg_maps = &This->baseShader.reg_maps;
+ const shader_reg_maps* reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function;
const char *fragcolor;
- WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
- local_constant* lconst;
+ const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
+ const local_constant *lconst;
GLuint retval;
/* Create the hw ARB shader */
@@ -2088,7 +2085,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUF
/* Load immediate constants */
if(!This->baseShader.load_local_constsF) {
LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
- float *value = (float *) lconst->value;
+ const float *value = (const float *)lconst->value;
GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, lconst->idx, value));
checkGLcall("glProgramLocalParameter4fvARB");
}
@@ -2099,11 +2096,11 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShader *iface, SHADER_BUF
static void shader_arb_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
- shader_reg_maps* reg_maps = &This->baseShader.reg_maps;
+ const shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
- WineD3D_GL_Info *gl_info = &device->adapter->gl_info;
- local_constant* lconst;
+ const WineD3D_GL_Info *gl_info = &device->adapter->gl_info;
+ const local_constant *lconst;
/* Create the hw ARB shader */
shader_addline(buffer, "!!ARBvp1.0\n");
@@ -2196,13 +2193,14 @@ static void shader_arb_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUFF
/* Load immediate constants */
if(!This->baseShader.load_local_constsF) {
LIST_FOR_EACH_ENTRY(lconst, &This->baseShader.constantsF, local_constant, entry) {
- float *value = (float *) lconst->value;
+ const float *value = (const float *)lconst->value;
GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, lconst->idx, value));
}
}
}
-static void shader_arb_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) {
+static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps)
+{
/* We don't have an ARB fixed function pipeline yet, so let the none backend set its caps,
* then overwrite the shader specific ones
*/
@@ -2387,7 +2385,7 @@ static HRESULT arbfp_alloc(IWineD3DDevice *iface) {
}
static void arbfp_free_ffpshader(void *value, void *gli) {
- WineD3D_GL_Info *gl_info = gli;
+ const WineD3D_GL_Info *gl_info = gli;
struct arbfp_ffp_desc *entry_arb = value;
ENTER_GL();
@@ -2409,7 +2407,8 @@ static void arbfp_free(IWineD3DDevice *iface) {
}
}
-static void arbfp_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct fragment_caps *caps) {
+static void arbfp_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps)
+{
caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE |
WINED3DTEXOPCAPS_SELECTARG1 |
WINED3DTEXOPCAPS_SELECTARG2 |
@@ -2772,7 +2771,8 @@ static void gen_ffp_instr(SHADER_BUFFER *buffer, unsigned int stage, BOOL color,
}
/* The stateblock is passed for GLINFO_LOCATION */
-static GLuint gen_arbfp_ffp_shader(struct ffp_frag_settings *settings, IWineD3DStateBlockImpl *stateblock) {
+static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWineD3DStateBlockImpl *stateblock)
+{
unsigned int stage;
SHADER_BUFFER buffer;
BOOL tex_read[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c
index f70800e..4cb551b 100644
--- a/dlls/wined3d/ati_fragment_shader.c
+++ b/dlls/wined3d/ati_fragment_shader.c
@@ -1019,7 +1019,8 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) {
}
}
-static void atifs_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct fragment_caps *caps) {
+static void atifs_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps)
+{
caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE |
WINED3DTEXOPCAPS_SELECTARG1 |
WINED3DTEXOPCAPS_SELECTARG2 |
diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c
index 292fede..1427faa 100644
--- a/dlls/wined3d/baseshader.c
+++ b/dlls/wined3d/baseshader.c
@@ -782,12 +782,9 @@ void shader_dump_param(
Use the shader_header_fct & shader_footer_fct to add strings
that are specific to pixel or vertex functions
NOTE: A description of how to parse tokens can be found on msdn */
-void shader_generate_main(
- IWineD3DBaseShader *iface,
- SHADER_BUFFER* buffer,
- shader_reg_maps* reg_maps,
- CONST DWORD* pFunction) {
-
+void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
+ const shader_reg_maps* reg_maps, CONST DWORD* pFunction)
+{
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) This->baseShader.device; /* To access shader backend callbacks */
const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table;
@@ -1096,7 +1093,7 @@ static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types t
static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {}
static void shader_none_load_constants(IWineD3DDevice *iface, char usePS, char useVS) {}
static void shader_none_cleanup(IWineD3DDevice *iface) {}
-static void shader_none_color_correction(SHADER_OPCODE_ARG* arg) {}
+static void shader_none_color_correction(const SHADER_OPCODE_ARG *arg) {}
static void shader_none_destroy(IWineD3DBaseShader *iface) {}
static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;}
static void shader_none_free(IWineD3DDevice *iface) {}
@@ -1110,7 +1107,8 @@ static void shader_none_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
}
#define GLINFO_LOCATION (*gl_info)
-static void shader_none_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) {
+static void shader_none_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps)
+{
/* Set the shader caps to 0 for the none shader backend */
pCaps->VertexShaderVersion = 0;
pCaps->PixelShaderVersion = 0;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index faa21bd..156e8ab 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1186,7 +1186,8 @@ static void shader_glsl_get_sample_function(DWORD sampler_type, BOOL projected,
}
}
-static void shader_glsl_color_correction(SHADER_OPCODE_ARG* arg) {
+static void shader_glsl_color_correction(const SHADER_OPCODE_ARG *arg)
+{
IWineD3DBaseShaderImpl* shader = (IWineD3DBaseShaderImpl*) arg->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) shader->baseShader.device;
WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info;
@@ -3805,7 +3806,8 @@ static void shader_glsl_generate_vshader(IWineD3DVertexShader *iface, SHADER_BUF
This->prgId = shader_obj;
}
-static void shader_glsl_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) {
+static void shader_glsl_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps)
+{
/* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support using
* vs_nv_version which is based on NV_vertex_program.
diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c
index 29c4e98..9fe69f0 100644
--- a/dlls/wined3d/nvidia_texture_shader.c
+++ b/dlls/wined3d/nvidia_texture_shader.c
@@ -610,7 +610,8 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) {
}
}
-static void nvrc_fragment_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps) {
+static void nvrc_fragment_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps)
+{
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED |
WINED3DTEXOPCAPS_ADDSIGNED2X |
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f3cdb88..6e50267 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -5437,7 +5437,8 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
#define GLINFO_LOCATION (*gl_info)
static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { }
-static void ffp_fragment_get_caps(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps) {
+static void ffp_fragment_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps)
+{
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED |
WINED3DTEXOPCAPS_ADDSIGNED2X |
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9d348d8..a26ddc7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -345,14 +345,14 @@ typedef struct {
void (*shader_deselect_depth_blt)(IWineD3DDevice *iface);
void (*shader_load_constants)(IWineD3DDevice *iface, char usePS, char useVS);
void (*shader_cleanup)(IWineD3DDevice *iface);
- void (*shader_color_correction)(struct SHADER_OPCODE_ARG *arg);
+ void (*shader_color_correction)(const struct SHADER_OPCODE_ARG *arg);
void (*shader_destroy)(IWineD3DBaseShader *iface);
HRESULT (*shader_alloc_private)(IWineD3DDevice *iface);
void (*shader_free_private)(IWineD3DDevice *iface);
BOOL (*shader_dirtifyable_constants)(IWineD3DDevice *iface);
GLuint (*shader_generate_pshader)(IWineD3DPixelShader *iface, SHADER_BUFFER *buffer);
void (*shader_generate_vshader)(IWineD3DVertexShader *iface, SHADER_BUFFER *buffer);
- void (*shader_get_caps)(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct shader_caps *caps);
+ void (*shader_get_caps)(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *caps);
BOOL (*shader_conv_supported)(WINED3DFORMAT conv);
} shader_backend_t;
@@ -642,7 +642,7 @@ struct fragment_caps {
struct fragment_pipeline {
void (*enable_extension)(IWineD3DDevice *iface, BOOL enable);
- void (*get_caps)(WINED3DDEVTYPE devtype, WineD3D_GL_Info *gl_info, struct fragment_caps *caps);
+ void (*get_caps)(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps);
HRESULT (*alloc_private)(IWineD3DDevice *iface);
void (*free_private)(IWineD3DDevice *iface);
BOOL (*conv_supported)(WINED3DFORMAT conv);
@@ -2066,7 +2066,7 @@ typedef struct SHADER_OPCODE {
typedef struct SHADER_OPCODE_ARG {
IWineD3DBaseShader* shader;
- shader_reg_maps* reg_maps;
+ const shader_reg_maps *reg_maps;
CONST SHADER_OPCODE* opcode;
DWORD opcode_token;
DWORD dst;
@@ -2194,11 +2194,8 @@ extern HRESULT shader_get_registers_used(
CONST DWORD* pToken,
IWineD3DStateBlockImpl *stateBlock);
-extern void shader_generate_main(
- IWineD3DBaseShader *iface,
- SHADER_BUFFER* buffer,
- shader_reg_maps* reg_maps,
- CONST DWORD* pFunction);
+extern void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER *buffer,
+ const shader_reg_maps *reg_maps, const DWORD *pFunction);
extern void shader_dump_ins_modifiers(
const DWORD output);
--
1.5.6.4
--------------080007060800060200050707--
More information about the wine-patches
mailing list