Skip to content

Commit

Permalink
direct3d: Fix possibly-incorrect scissor test when clearing.
Browse files Browse the repository at this point in the history
Thanks to @JayFoxRox who did the detective work on this!

Fixes #3357.
  • Loading branch information
icculus committed Jul 30, 2021
1 parent 6f684f6 commit 585c11c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/direct3d/SDL_render_d3d.c
Expand Up @@ -1319,9 +1319,9 @@ D3D_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *verti
const int backw = istarget ? renderer->target->w : data->pparams.BackBufferWidth;
const int backh = istarget ? renderer->target->h : data->pparams.BackBufferHeight;

if (data->drawstate.cliprect_enabled) {
if (data->drawstate.cliprect_enabled || data->drawstate.cliprect_enabled_dirty) {
IDirect3DDevice9_SetRenderState(data->device, D3DRS_SCISSORTESTENABLE, FALSE);
data->drawstate.cliprect_enabled_dirty = SDL_TRUE;
data->drawstate.cliprect_enabled_dirty = data->drawstate.cliprect_enabled;
}

/* Don't reset the viewport if we don't have to! */
Expand Down

0 comments on commit 585c11c

Please sign in to comment.