mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wined3d: Revert uses of wined3d_state_get_ffp_texture() for non-FFP textures.
This fixes a crash when loading a world in Spore.
Fixes: 831a41ee34
This commit is contained in:
parent
bdc6132658
commit
02b3a8cb7b
3 changed files with 5 additions and 5 deletions
|
@ -490,7 +490,7 @@ static void shader_arb_load_np2fixup_constants(const struct arb_ps_np2fixup_info
|
|||
while (active)
|
||||
{
|
||||
i = wined3d_bit_scan(&active);
|
||||
if (!(tex = wined3d_state_get_ffp_texture(state, i)))
|
||||
if (!(tex = state->textures[i]))
|
||||
{
|
||||
ERR("Nonexistent texture is flagged for NP2 texcoord fixup.\n");
|
||||
continue;
|
||||
|
|
|
@ -1299,7 +1299,7 @@ static void shader_glsl_load_np2fixup_constants(const struct glsl_ps_program *ps
|
|||
|
||||
for (i = 0; fixup; fixup >>= 1, ++i)
|
||||
{
|
||||
const struct wined3d_texture *tex = wined3d_state_get_ffp_texture(state, i);
|
||||
const struct wined3d_texture *tex = state->textures[i];
|
||||
unsigned char idx = ps->np2_fixup_info->idx[i];
|
||||
|
||||
if (!tex)
|
||||
|
|
|
@ -2858,7 +2858,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
|||
/* Treat unbound textures as 2D. The dummy texture will provide
|
||||
* the proper sample value. The tex_types bitmap defaults to
|
||||
* 2D because of the memset. */
|
||||
if (!(texture = wined3d_state_get_ffp_texture(state, i)))
|
||||
if (!(texture = state->textures[i]))
|
||||
continue;
|
||||
|
||||
switch (wined3d_texture_gl(texture)->target)
|
||||
|
@ -2900,7 +2900,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
|||
break;
|
||||
}
|
||||
|
||||
if ((texture = wined3d_state_get_ffp_texture(state, i)))
|
||||
if ((texture = state->textures[i]))
|
||||
{
|
||||
/* Star Wars: The Old Republic uses mismatched samplers for rendering water. */
|
||||
if (texture->resource.type == WINED3D_RTYPE_TEXTURE_2D
|
||||
|
@ -2930,7 +2930,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
|
|||
if (!shader->reg_maps.resource_info[i].type)
|
||||
continue;
|
||||
|
||||
if (!(texture = wined3d_state_get_ffp_texture(state, i)))
|
||||
if (!(texture = state->textures[i]))
|
||||
{
|
||||
args->color_fixup[i] = COLOR_FIXUP_IDENTITY;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue