Limit the tile's width/height to the number of bits specified by mask_s/t. See the detailed noted in BaseRenderer::UpdateTileSnapshots for issues relating to this.
| 590 | // Limit the tile's width/height to the number of bits specified by mask_s/t. |
| 591 | // See the detailed noted in BaseRenderer::UpdateTileSnapshots for issues relating to this. |
| 592 | static inline u16 GetTextureDimension( u16 tile_dimension, u8 mask, bool clamp ) |
| 593 | { |
| 594 | if (mask) |
| 595 | { |
| 596 | u16 mask_dimension {(u16)(1 << mask)}; |
| 597 | |
| 598 | // If clamp is enabled, the maximum addressable texel is the |
| 599 | // smaller of the mask dimension and the tile dimension. |
| 600 | if (clamp) |
| 601 | { |
| 602 | return Min< u16 >( mask_dimension, tile_dimension ); |
| 603 | } |
| 604 | |
| 605 | return mask_dimension; |
| 606 | } |
| 607 | |
| 608 | return tile_dimension; |
| 609 | } |
| 610 | |
| 611 | const TextureInfo & CRDPStateManager::GetUpdatedTextureDescriptor( u32 idx ) |
| 612 | { |