Commit 5a26da1d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Make the wined3d_shader_context shader pointer const.

parent 330ffc83
......@@ -944,7 +944,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction
{
/* oPos, oFog and oPts in D3D */
static const char * const rastout_reg_names[] = {"TMP_OUT", "result.fogcoord", "result.pointsize"};
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps;
BOOL pshader = shader_is_pshader_version(reg_maps->shader_version.type);
struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data;
......@@ -1337,10 +1337,10 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
{
struct wined3d_shader_buffer *buffer = ins->ctx->buffer;
DWORD sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx];
const struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_texture *texture;
const char *tex_type;
BOOL np2_fixup = FALSE;
struct wined3d_shader *shader = ins->ctx->shader;
struct wined3d_device *device = shader->device;
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
const char *mod;
......@@ -1742,7 +1742,7 @@ static void shader_hw_nop(const struct wined3d_shader_instruction *ins)
static void shader_hw_mov(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps;
BOOL pshader = shader_is_pshader_version(reg_maps->shader_version.type);
struct shader_arb_ctx_priv *ctx = ins->ctx->backend_data;
......@@ -3202,7 +3202,7 @@ static void shader_hw_ret(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader_buffer *buffer = ins->ctx->buffer;
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
BOOL vshader = shader_is_vshader_version(ins->ctx->reg_maps->shader_version.type);
if(priv->target_version == ARB) return;
......@@ -5257,7 +5257,7 @@ static void free_recorded_instruction(struct list *list)
static void shader_arb_handle_instruction(const struct wined3d_shader_instruction *ins) {
SHADER_HANDLER hw_fct;
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
struct control_frame *control_frame;
struct wined3d_shader_buffer *buffer = ins->ctx->buffer;
BOOL bool_const;
......
......@@ -1318,7 +1318,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
/* oPos, oFog and oPts in D3D */
static const char * const hwrastout_reg_names[] = {"OUT[10]", "OUT[11].x", "OUT[11].y"};
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader_reg_maps *reg_maps = ins->ctx->reg_maps;
const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
char pshader = shader_is_pshader_version(reg_maps->shader_version.type);
......@@ -2842,8 +2842,8 @@ static void shader_glsl_sgn(const struct wined3d_shader_instruction *ins)
static void shader_glsl_loop(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader_loop_state *loop_state = ins->ctx->loop_state;
const struct wined3d_shader *shader = ins->ctx->shader;
glsl_src_param_t src1_param;
struct wined3d_shader *shader = ins->ctx->shader;
const DWORD *control_values = NULL;
const local_constant *constant;
......@@ -2926,7 +2926,7 @@ static void shader_glsl_end(const struct wined3d_shader_instruction *ins)
static void shader_glsl_rep(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
struct wined3d_shader_loop_state *loop_state = ins->ctx->loop_state;
glsl_src_param_t src0_param;
const DWORD *control_values = NULL;
......@@ -3036,7 +3036,7 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins)
********************************************/
static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
struct wined3d_device *device = shader->device;
DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
ins->ctx->reg_maps->shader_version.minor);
......@@ -3126,7 +3126,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
glsl_sample_function_t sample_function;
......@@ -3159,7 +3159,7 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
const struct wined3d_shader *shader = ins->ctx->shader;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
glsl_sample_function_t sample_function;
......
......@@ -583,7 +583,7 @@ struct wined3d_shader_loop_state
struct wined3d_shader_context
{
struct wined3d_shader *shader;
const struct wined3d_shader *shader;
const struct wined3d_gl_info *gl_info;
const struct wined3d_shader_reg_maps *reg_maps;
struct wined3d_shader_buffer *buffer;
......
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