mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Fix divide by zero (issue 0000022)
This commit is contained in:
parent
ece8e95853
commit
4be291fb61
2 changed files with 2 additions and 1 deletions
|
@ -647,6 +647,7 @@ namespace swrenderer
|
|||
|
||||
dc_x = x;
|
||||
dc_iscale = iscale;
|
||||
dc_textureheight = tex->GetHeight();
|
||||
|
||||
const FTexture::Span *span;
|
||||
const BYTE *column;
|
||||
|
|
|
@ -81,7 +81,6 @@ void DrawColumnCodegen::Generate(DrawColumnVariant variant, SSAValue args, SSAVa
|
|||
|
||||
stack_frac.store(texturefrac + iscale * skipped_by_thread(dest_y, thread));
|
||||
iscale = iscale * thread.num_cores;
|
||||
one = (1 << 30) / textureheight;
|
||||
|
||||
SSAIfBlock branch;
|
||||
branch.if_block(is_simple_shade);
|
||||
|
@ -97,6 +96,7 @@ void DrawColumnCodegen::LoopShade(DrawColumnVariant variant, bool isSimpleShade)
|
|||
branch.if_block(is_nearest_filter);
|
||||
Loop(variant, isSimpleShade, true);
|
||||
branch.else_block();
|
||||
one = (1 << 30) / textureheight;
|
||||
stack_frac.store(stack_frac.load() - (one >> 1));
|
||||
Loop(variant, isSimpleShade, false);
|
||||
branch.end_block();
|
||||
|
|
Loading…
Reference in a new issue