mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 20:25:33 +00:00
GLES2: prevent batching if blend mode changes (see bug #4964)
This commit is contained in:
parent
92f2fdfc84
commit
d4df5d33c5
|
@ -1144,6 +1144,7 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
|
||||||
/* let's group non joined lines */
|
/* let's group non joined lines */
|
||||||
SDL_RenderCommand *finalcmd = cmd;
|
SDL_RenderCommand *finalcmd = cmd;
|
||||||
SDL_RenderCommand *nextcmd = cmd->next;
|
SDL_RenderCommand *nextcmd = cmd->next;
|
||||||
|
SDL_BlendMode thisblend = cmd->data.draw.blend;
|
||||||
|
|
||||||
while (nextcmd != NULL) {
|
while (nextcmd != NULL) {
|
||||||
const SDL_RenderCommandType nextcmdtype = nextcmd->command;
|
const SDL_RenderCommandType nextcmdtype = nextcmd->command;
|
||||||
|
@ -1151,6 +1152,8 @@ GLES2_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
|
||||||
break; /* can't go any further on this draw call, different render command up next. */
|
break; /* can't go any further on this draw call, different render command up next. */
|
||||||
} else if (nextcmd->data.draw.count != 2) {
|
} else if (nextcmd->data.draw.count != 2) {
|
||||||
break; /* can't go any further on this draw call, those are joined lines */
|
break; /* can't go any further on this draw call, those are joined lines */
|
||||||
|
} else if (nextcmd->data.draw.blend != thisblend) {
|
||||||
|
break; /* can't go any further on this draw call, different blendmode copy up next. */
|
||||||
} else {
|
} else {
|
||||||
finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */
|
finalcmd = nextcmd; /* we can combine copy operations here. Mark this one as the furthest okay command. */
|
||||||
count += cmd->data.draw.count;
|
count += cmd->data.draw.count;
|
||||||
|
|
Loading…
Reference in a new issue