Merge pull request #2112 from lioncash/shadowing
gl_rasterizer_cache: Get rid of variable shadowing
This commit is contained in:
commit
4327f430f1
|
@ -36,7 +36,6 @@ using PixelFormat = VideoCore::Surface::PixelFormat;
|
||||||
using ComponentType = VideoCore::Surface::ComponentType;
|
using ComponentType = VideoCore::Surface::ComponentType;
|
||||||
|
|
||||||
struct SurfaceParams {
|
struct SurfaceParams {
|
||||||
|
|
||||||
enum class SurfaceClass {
|
enum class SurfaceClass {
|
||||||
Uploaded,
|
Uploaded,
|
||||||
RenderTarget,
|
RenderTarget,
|
||||||
|
@ -169,20 +168,27 @@ struct SurfaceParams {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 MipBlockDepth(u32 mip_level) const {
|
u32 MipBlockDepth(u32 mip_level) const {
|
||||||
if (mip_level == 0)
|
if (mip_level == 0) {
|
||||||
return block_depth;
|
return block_depth;
|
||||||
if (is_layered)
|
}
|
||||||
|
|
||||||
|
if (is_layered) {
|
||||||
return 1;
|
return 1;
|
||||||
u32 depth = MipDepth(mip_level);
|
}
|
||||||
|
|
||||||
|
const u32 mip_depth = MipDepth(mip_level);
|
||||||
u32 bd = 32;
|
u32 bd = 32;
|
||||||
while (bd > 1 && depth * 2 <= bd) {
|
while (bd > 1 && mip_depth * 2 <= bd) {
|
||||||
bd >>= 1;
|
bd >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bd == 32) {
|
if (bd == 32) {
|
||||||
u32 bh = MipBlockHeight(mip_level);
|
const u32 bh = MipBlockHeight(mip_level);
|
||||||
if (bh >= 4)
|
if (bh >= 4) {
|
||||||
return 16;
|
return 16;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return bd;
|
return bd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue