Skip to content

Commit

Permalink
softgpu: Correct simple rectangles with mipmaps.
Browse files Browse the repository at this point in the history
Might be used for fonts, we could potentially check for bias/slope, but
mipmaps are uncommon in direct through draws anyway.
  • Loading branch information
unknownbrackets committed Jan 23, 2022
1 parent d8c5c35 commit 3010cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions GPU/Software/RasterizerRectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ bool RectangleFastPath(const VertexData &v0, const VertexData &v1, BinManager &b
// Currently only works for TL/BR, which is the most common but not required.
bool orient_check = xdiff >= 0 && ydiff >= 0;
// We already have a fast path for clear in ClearRectangle.
bool state_check = !state.pixelID.clearMode && NoClampOrWrap(v0.texturecoords) && NoClampOrWrap(v1.texturecoords);
// TODO: No mipmap levels? Might be a font at level 1...
bool state_check = !state.pixelID.clearMode && !state.samplerID.hasAnyMips && NoClampOrWrap(v0.texturecoords) && NoClampOrWrap(v1.texturecoords);
if ((coord_check || !state.enableTextures) && orient_check && state_check) {
binner.AddSprite(v0, v1);
return true;
Expand Down
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def target():
"gpu/texfunc/decal",
"gpu/texfunc/modulate",
"gpu/texfunc/replace",
"gpu/textures/mipmap",
"gpu/textures/rotate",
"hash/hash",
"hle/check_not_used_uids",
"intr/intr",
Expand Down Expand Up @@ -400,8 +402,6 @@ def target():
"gpu/signals/jumps",
"gpu/signals/simple",
"gpu/simple/simple",
"gpu/textures/mipmap",
"gpu/textures/rotate",
"gpu/triangle/triangle",
"gpu/vertices/colors",
"gpu/vertices/texcoords",
Expand Down

0 comments on commit 3010cd5

Please sign in to comment.