mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Pica: Fix a bug in the register definitions, relating to texture wrapping.
This commit is contained in:
parent
aaf30ca4ee
commit
8bd7a896ea
2 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ struct Regs {
|
||||||
|
|
||||||
union {
|
union {
|
||||||
BitField< 8, 2, WrapMode> wrap_s;
|
BitField< 8, 2, WrapMode> wrap_s;
|
||||||
BitField<11, 2, WrapMode> wrap_t;
|
BitField<12, 2, WrapMode> wrap_t;
|
||||||
};
|
};
|
||||||
|
|
||||||
INSERT_PADDING_WORDS(0x1);
|
INSERT_PADDING_WORDS(0x1);
|
||||||
|
|
|
@ -243,7 +243,7 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
|
||||||
|
|
||||||
int s = (int)(uv[i].u() * float24::FromFloat32(static_cast<float>(texture.config.width))).ToFloat32();
|
int s = (int)(uv[i].u() * float24::FromFloat32(static_cast<float>(texture.config.width))).ToFloat32();
|
||||||
int t = (int)(uv[i].v() * float24::FromFloat32(static_cast<float>(texture.config.height))).ToFloat32();
|
int t = (int)(uv[i].v() * float24::FromFloat32(static_cast<float>(texture.config.height))).ToFloat32();
|
||||||
auto GetWrappedTexCoord = [](Regs::TextureConfig::WrapMode mode, int val, unsigned size) {
|
static auto GetWrappedTexCoord = [](Regs::TextureConfig::WrapMode mode, int val, unsigned size) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Regs::TextureConfig::ClampToEdge:
|
case Regs::TextureConfig::ClampToEdge:
|
||||||
val = std::max(val, 0);
|
val = std::max(val, 0);
|
||||||
|
|
Loading…
Reference in a new issue