wined3d: Pass an IWineD3DBaseTextureImpl array to pixelshader_update_samplers().

This commit is contained in:
Henri Verbeet 2010-12-15 21:06:23 +01:00 committed by Alexandre Julliard
parent eda1787b3c
commit 7bc7caf423
4 changed files with 6 additions and 7 deletions

View File

@ -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;
pixelshader_update_samplers(&shader->baseShader.reg_maps,
(IWineD3DBaseTexture **)device->stateBlock->state.textures);
pixelshader_update_samplers(&shader->baseShader.reg_maps, device->stateBlock->state.textures);
if (!shader_buffer_init(&buffer))
{

View File

@ -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));
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);
ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup);

View File

@ -2313,7 +2313,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de
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;
unsigned int i;
@ -2332,7 +2332,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine
continue;
}
switch (((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target)
switch (textures[i]->baseTexture.target)
{
case GL_TEXTURE_RECTANGLE_ARB:
case GL_TEXTURE_2D:
@ -2352,7 +2352,7 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, IWine
default:
FIXME("Unrecognized texture type %#x, using 2D.\n",
((IWineD3DBaseTextureImpl *)textures[i])->baseTexture.target);
textures[i]->baseTexture.target);
sampler_type[i] = WINED3DSTT_2D;
}
}

View File

@ -2932,7 +2932,7 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
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,
IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN;