wined3d: Read transform flags from the compile args in pshader_hw_texm3x2tex().

Instead of directly from the stateblock. Note that the GLSL backend doesn't
take these flags into account at all. That's probably a bug in the GLSL
backend, but needs tests.
This commit is contained in:
Henri Verbeet 2010-10-26 09:11:08 +02:00 committed by Alexandre Julliard
parent 8c36e4ce1d
commit db156977dd
1 changed files with 2 additions and 3 deletions

View File

@ -2090,8 +2090,7 @@ static void pshader_hw_texm3x2pad(const struct wined3d_shader_instruction *ins)
static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins)
{
IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device;
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
DWORD flags;
DWORD reg = ins->dst[0].reg.idx;
struct wined3d_shader_buffer *buffer = ins->ctx->buffer;
@ -2106,7 +2105,7 @@ static void pshader_hw_texm3x2tex(const struct wined3d_shader_instruction *ins)
shader_arb_get_dst_param(ins, &ins->dst[0], dst_str);
shader_arb_get_src_param(ins, &ins->src[0], 0, src0_name);
shader_addline(buffer, "DP3 %s.y, fragment.texcoord[%u], %s;\n", dst_reg, reg, src0_name);
flags = reg < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0;
flags = reg < MAX_TEXTURES ? priv->cur_ps_args->super.tex_transform >> reg * WINED3D_PSARGS_TEXTRANSFORM_SHIFT : 0;
shader_hw_sample(ins, reg, dst_str, dst_reg, flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL);
}