[PATCH 1/2] wined3d: Use the np2_fixup to find out if a RECT texture is used
Henri Verbeet
hverbeet at gmail.com
Thu Apr 11 06:40:46 CDT 2013
On 11 April 2013 11:32, Stefan Dösinger <stefan at codeweavers.com> wrote:
> @@ -1069,17 +1069,17 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
> shader_addline(buffer, "uniform sampler1D %s_sampler%u;\n", prefix, i);
> break;
> case WINED3DSTT_2D:
> - texture = state->textures[i];
> + tex_rect = version->type == WINED3D_SHADER_TYPE_PIXEL && (ps_args->np2_fixup & (1 << i));
The basic idea is ok, but the conditions for when np2_fixup is set are
a bit more complicated than that. Specifically, look at how the
WINED3D_TEXTURE_POW2_MAT_IDENT texture flag is set / cleared in
texture_init().
More information about the wine-devel
mailing list