Navigation Menu

Skip to content

Commit

Permalink
direct3d: Fix dirty textures failing to update
Browse files Browse the repository at this point in the history
Even if the texture itself has not changed since last time, the data may have
so we must call UpdateDirtyTexture() to handle that possibility.
  • Loading branch information
cgutman committed Jun 21, 2019
1 parent f322645 commit e681623
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/render/direct3d/SDL_render_d3d.c
Expand Up @@ -1127,6 +1127,13 @@ SetDrawState(D3D_RenderData *data, const SDL_RenderCommand *cmd)
}

data->drawstate.texture = texture;
} else if (texture) {
D3D_TextureData *texturedata = (D3D_TextureData *) texture->driverdata;
UpdateDirtyTexture(data->device, &texturedata->texture);
if (texturedata->yuv) {
UpdateDirtyTexture(data->device, &texturedata->utexture);
UpdateDirtyTexture(data->device, &texturedata->vtexture);
}
}

if (blend != data->drawstate.blend) {
Expand Down

0 comments on commit e681623

Please sign in to comment.