Disable optimization when there are some ST objects on the line
This commit is contained in:
parent
fef2b89e87
commit
b026ea626a
5
video.cc
5
video.cc
|
@ -935,8 +935,9 @@ static void render_scanline_objects(
|
||||||
) {
|
) {
|
||||||
// TODO move this to another place?
|
// TODO move this to another place?
|
||||||
// Skip alpha pass if you can do a regular color32 pass
|
// Skip alpha pass if you can do a regular color32 pass
|
||||||
if (rdtype == STCKCOLOR && ((read_ioreg(REG_BLDCNT) >> 4) & 1) == 0) {
|
bool layer_has_blending = ((read_ioreg(REG_BLDCNT) >> 4) & 1) != 0;
|
||||||
// We cannot skip if there's some object being rendered TODO TODO
|
bool has_trans_obj = obj_alpha_count[read_ioreg(REG_VCOUNT)];
|
||||||
|
if (rdtype == STCKCOLOR && (!has_trans_obj && !layer_has_blending)) {
|
||||||
render_scanline_objects<stype, INDXCOLOR, copyfn>(priority, start, end, raw_ptr);
|
render_scanline_objects<stype, INDXCOLOR, copyfn>(priority, start, end, raw_ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue