Commit 7bc7caf4 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass an IWineD3DBaseTextureImpl array to pixelshader_update_samplers().

parent eda1787b
...@@ -4296,8 +4296,7 @@ static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl * ...@@ -4296,8 +4296,7 @@ static struct arb_ps_compiled_shader *find_arb_pshader(IWineD3DPixelShaderImpl *
shader_data->gl_shaders[shader_data->num_gl_shaders].args = *args; shader_data->gl_shaders[shader_data->num_gl_shaders].args = *args;
pixelshader_update_samplers(&shader->baseShader.reg_maps, pixelshader_update_samplers(&shader->baseShader.reg_maps, device->stateBlock->state.textures);
(IWineD3DBaseTexture **)device->stateBlock->state.textures);
if (!shader_buffer_init(&buffer)) if (!shader_buffer_init(&buffer))
{ {
......
...@@ -4195,7 +4195,7 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, ...@@ -4195,7 +4195,7 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context,
memset(&shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup, 0, sizeof(struct ps_np2fixup_info)); memset(&shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup, 0, sizeof(struct ps_np2fixup_info));
if (args->np2_fixup) np2fixup = &shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup; if (args->np2_fixup) np2fixup = &shader_data->gl_shaders[shader_data->num_gl_shaders].np2fixup;
pixelshader_update_samplers(&shader->baseShader.reg_maps, (IWineD3DBaseTexture **)state->textures); pixelshader_update_samplers(&shader->baseShader.reg_maps, state->textures);
shader_buffer_clear(buffer); shader_buffer_clear(buffer);
ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup); ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup);
......
...@@ -2313,7 +2313,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de ...@@ -2313,7 +2313,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de
return WINED3D_OK; return WINED3D_OK;
} }
void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures) void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWineD3DBaseTextureImpl * const *textures)
{ {
WINED3DSAMPLER_TEXTURE_TYPE *sampler_type = reg_maps->sampler_type; WINED3DSAMPLER_TEXTURE_TYPE *sampler_type = reg_maps->sampler_type;
unsigned int i; unsigned int i;
...@@ -2332,7 +2332,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine ...@@ -2332,7 +2332,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine
continue; continue;
} }
switch (((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target) switch (textures[i]->baseTexture.target)
{ {
case GL_TEXTURE_RECTANGLE_ARB: case GL_TEXTURE_RECTANGLE_ARB:
case GL_TEXTURE_2D: case GL_TEXTURE_2D:
...@@ -2352,7 +2352,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine ...@@ -2352,7 +2352,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine
default: default:
FIXME("Unrecognized texture type %#x, using 2D.\n", FIXME("Unrecognized texture type %#x, using 2D.\n",
((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target); textures[i]->baseTexture.target);
sampler_type[i] = WINED3DSTT_2D; sampler_type[i] = WINED3DSTT_2D;
} }
} }
......
...@@ -2932,7 +2932,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de ...@@ -2932,7 +2932,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature, const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps,
IWineD3DBaseTexture * const *textures) DECLSPEC_HIDDEN; IWineD3DBaseTextureImpl * const *textures) DECLSPEC_HIDDEN;
void find_ps_compile_args(const struct wined3d_state *state, void find_ps_compile_args(const struct wined3d_state *state,
IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN; IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN;
......
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